[PATCH] testsuite: add -fno-tree-fre in gcc.dg/guality

Hu Jiangping hujiangping@cn.fujitsu.com
Thu Aug 27 01:36:36 GMT 2020


This patch add -fno-tree-fre to dg-options in gcc.dg/guality/sra-1.c,
to make the following testcases passed.

FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4       
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14      
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 21 a.j == 14                                        
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 32 a[1] == 14                                       
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 43 a.j == 14                                        

The detail error logs like this:
> Spawning: gdb -nx -nw -quiet -batch -x sra-1.gdb ./sra-1.exe                      
> spawn gdb -nx -nw -quiet -batch -x sra-1.gdb ./sra-1.exe                        
> Breakpoint 1 at 0x40074c: file /home/build_gcc/gcc-a64fx-1-a/gcc/testsuite/gcc.dg/guality/sra-1.c, line 43. 
>  
> Breakpoint 1, f3 (k=k@entry=7) at /home/build_gcc/gcc-a64fx-1-a/gcc/testsuite/gcc.dg/guality/sra-1.c:43
> 43        bar (a.j);            /* { dg-final { gdb-test . "a.j" "14" } } */
> $1 = <optimized out>
> $2 = 4
> <optimized out> != 4

Tested on aarch64.

Regards!
hujp

---
 gcc/testsuite/gcc.dg/guality/sra-1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/guality/sra-1.c b/gcc/testsuite/gcc.dg/guality/sra-1.c
index 8ad57cf3f8e..94ea29dd727 100644
--- a/gcc/testsuite/gcc.dg/guality/sra-1.c
+++ b/gcc/testsuite/gcc.dg/guality/sra-1.c
@@ -1,6 +1,6 @@
 /* PR debug/43983 */
 /* { dg-do run } */
-/* { dg-options "-g -fno-ipa-icf" } */
+/* { dg-options "-g -fno-tree-fre -fno-ipa-icf" } */
 
 struct A { int i; int j; };
 struct B { int : 4; int i : 12; int j : 12; int : 4; };
-- 
2.17.1





More information about the Gcc-patches mailing list