]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fixup tbaa test again
authorSam James <sam@gentoo.org>
Sat, 26 Oct 2024 01:03:43 +0000 (02:03 +0100)
committerSam James <sam@gentoo.org>
Sat, 26 Oct 2024 03:35:39 +0000 (04:35 +0100)
Test was broken until r15-4684-g2d1d6be00257c5 which made it actually
run and r15-4685-g091e45b4e97d1e which applied fixes other than the
trivial rename.

But more is needed: this gets the test working properly in terms of scanning
the dump and handling the interaction w/ LTO with not producing an executable
(did try ltrans scan but that didn't work either).

Unfortunately, the test seems to fail for me on godbolt even going back to
GCC 7.1 or thereabouts, hence XFAIL. However, if I revert r9-3870-g2a98b4bfc3d952,
I do get an ICE in fld_incomplete_type_of -- because we do far more checking
with LTO now on (in)complete types. And reverting it on releases/gcc-9 actually
makes it give 0.

In summary: fix the test fully so it really does run and we get a check
for ICEing at least, and mark the dg-final scan as XFAIL so Honza can
comment on that.

gcc/testsuite/ChangeLog:
PR testsuite/117299

* gcc.dg/lto/tbaa_0.c: Move to...
* gcc.dg/tbaa.c: ...here.

gcc/testsuite/gcc.dg/tbaa.c [moved from gcc/testsuite/gcc.dg/lto/tbaa_0.c with 77% similarity]

similarity index 77%
rename from gcc/testsuite/gcc.dg/lto/tbaa_0.c
rename to gcc/testsuite/gcc.dg/tbaa.c
index eb14ea62b8962de68fa8076f769185d7a2266eed..b336622afd1aa15d8b7aa3729130137542b5936b 100644 (file)
@@ -1,6 +1,6 @@
-/* { dg-lto-do link } */
-/* We need -flto=partition=none to get the dump file for scan-tree-dump-times. */
-/* { dg-lto-options {{ -O2 -flto -flto-partition=none -fdump-tree-evrp -std=gnu89 }} } */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -flto -flto-partition=one -fdump-tree-evrp -std=gnu89" } */
+/* { dg-require-effective-target lto } */
 
 typedef struct rtx_def *rtx;
 typedef struct cselib_val_struct
@@ -40,4 +40,4 @@ discard_useless_locs (x, info)
       n_useless_values++;
     }
 }
-/* { dg-final { scan-tree-dump-times "n_useless_values" 2 "evrp" } } */
+/* { dg-final { scan-tree-dump-times "n_useless_values" 2 "evrp" { xfail *-*-* } } } */