From d41a81d6b4c54f048f41bc87f9c244ec78a90177 Mon Sep 17 00:00:00 2001 From: Erick Ochoa Date: Wed, 29 Apr 2020 10:46:50 +0200 Subject: Fixes bug #3 obtained via csmith --- gcc/ipa-structure-reorg.c | 5 +---- gcc/testsuite/gcc.dg/ipa/ipa-structreorg-51-creduce-0.c | 4 ++-- gcc/testsuite/gcc.dg/ipa/ipa-structreorg-52-creduce-1.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-structreorg-53-csmith-2.c | 5 +++++ 4 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/ipa/ipa-structreorg-53-csmith-2.c diff --git a/gcc/ipa-structure-reorg.c b/gcc/ipa-structure-reorg.c index 603d160349b..10e092b664d 100644 --- a/gcc/ipa-structure-reorg.c +++ b/gcc/ipa-structure-reorg.c @@ -113,10 +113,7 @@ ipa_structure_reorg (void) str_reorg_dead_field_eliminate (&info); } - if (!reorg_analysis (&info)) - { - return true; - } + return true; if (reorg_qualification (&info)) { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-51-creduce-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-51-creduce-0.c index b7ef85f30dd..d03f511078a 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-51-creduce-0.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-51-creduce-0.c @@ -1,5 +1,5 @@ -/* { dg-do link } */ -/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate" } */ +/* { dg-do compile } */ +/* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */ struct { } main() { diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-52-creduce-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-52-creduce-1.c index 711952d21e9..6a9994f3e46 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-52-creduce-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-52-creduce-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-53-csmith-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-53-csmith-2.c new file mode 100644 index 00000000000..df33fb7aeb7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-53-csmith-2.c @@ -0,0 +1,5 @@ +/* { dg-do run } */ +/* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */ +struct { +} a; +main() {} -- cgit v1.2.3