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.
-/* { 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
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 *-*-* } } } */