Tweak Wstringop-overflow-55.c test.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 27 May 2021 07:32:42 +0000 (09:32 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 27 May 2021 07:32:42 +0000 (09:32 +0200)
On x86-32 warn_ptrdiff_anti_range_add() and warn_int_anti_range()
degrade to the same function so ICF is folding the latter into a call
into the former.  This is causing no warnings to be emitted for
warn_int_anti_range.

Fixed by passing -fno-ipa-icf.

gcc/testsuite/ChangeLog:

* gcc.dg/Wstringop-overflow-55.c: Pass -fno-ipa-icf.

gcc/testsuite/gcc.dg/Wstringop-overflow-55.c

index 8df5cb6..c3c2dbe 100644 (file)
@@ -1,6 +1,6 @@
 /* Verify that offsets in "anti-ranges" are handled correctly.
    { dg-do compile }
-   { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+   { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-icf" } */
 
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 typedef __SIZE_TYPE__    size_t;