Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF
breaks user debugging experience"), which make guality tests clztest.c,
ctztest.c and sra-1.c unsupported for option combination "-O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects". F.i., in clztest.c foo and bar are
merged, and gdb can set a breakpoint on a line in foo, but trying to set a
breakpoint on a line in bar results in a breakpoint in main instead.
This patch works around the problem by adding -fno-ipa-icf (as is already done
in csttest.c and pr43077-1.c) to those testcases:
...
-UNSUPPORTED: gcc.dg/guality/clztest.c ... line . g == f
+PASS: gcc.dg/guality/clztest.c ... line . g == f
-UNSUPPORTED: gcc.dg/guality/ctztest.c ... line . g == f
+PASS: gcc.dg/guality/ctztest.c ... line . g == f
-UNSUPPORTED: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
+PASS: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
-UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14
+PASS: gcc.dg/guality/sra-1.c ... line . a[1] == 14
...
Tested on x86_64.
2018-07-13 Tom de Vries <tdevries@suse.de>
* gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options.
* gcc.dg/guality/ctztest.c: Same.
* gcc.dg/guality/sra-1.c: Same.
From-SVN: r262631
+2018-07-13 Tom de Vries <tdevries@suse.de>
+
+ * gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options.
+ * gcc.dg/guality/ctztest.c: Same.
+ * gcc.dg/guality/sra-1.c: Same.
+
2018-07-13 Tom de Vries <tdevries@suse.de>
* gcc.dg/vla-1.c: Update.
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fno-ipa-icf" } */
volatile int vv;
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fno-ipa-icf" } */
volatile int vv;
/* PR debug/43983 */
/* { dg-do run } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fno-ipa-icf" } */
struct A { int i; int j; };
struct B { int : 4; int i : 12; int j : 12; int : 4; };