https://gcc.gnu.org/g:40fedaf35fa99a9728d5b84d47035f4c92e1ba90
commit r15-4692-g40fedaf35fa99a9728d5b84d47035f4c92e1ba90 Author: Sam James <s...@gentoo.org> Date: Sat Oct 26 02:03:43 2024 +0100 testsuite: fixup tbaa test again 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. Diff: --- gcc/testsuite/gcc.dg/{lto/tbaa_0.c => tbaa.c} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/lto/tbaa_0.c b/gcc/testsuite/gcc.dg/tbaa.c similarity index 77% rename from gcc/testsuite/gcc.dg/lto/tbaa_0.c rename to gcc/testsuite/gcc.dg/tbaa.c index eb14ea62b896..b336622afd1a 100644 --- a/gcc/testsuite/gcc.dg/lto/tbaa_0.c +++ b/gcc/testsuite/gcc.dg/tbaa.c @@ -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 *-*-* } } } */