aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-10-25 17:59:31 +0100
committerSam James <sam@gentoo.org>2024-10-25 22:10:22 +0100
commit091e45b4e97d1ecf765bf3afb58cecda23fee23c (patch)
tree6c8f2ad18d14a462f28c0d636800a71edc360ff8
parent2d1d6be00257c5ad9031986ac2f6f3d0a96d935a (diff)
downloadgcc-091e45b4e97d1ecf765bf3afb58cecda23fee23c.zip
gcc-091e45b4e97d1ecf765bf3afb58cecda23fee23c.tar.gz
gcc-091e45b4e97d1ecf765bf3afb58cecda23fee23c.tar.bz2
testsuite: lto: fix tbaa_0 test
These failures were hidden until we started to run the test by fixing the filename earlier: use dg-lto directives, pass -std=gnu89 for implicit-int, and use -flto-partition=none like c-c++-common/hwasan/builtin-special-handling.c. gcc/testsuite/ChangeLog: * gcc.dg/lto/tbaa_0.c: Use dg-lto directives, pass -std=gnu89, and use -flto-partition=none.
-rw-r--r--gcc/testsuite/gcc.dg/lto/tbaa_0.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/tbaa_0.c b/gcc/testsuite/gcc.dg/lto/tbaa_0.c
index 74c0496..eb14ea6 100644
--- a/gcc/testsuite/gcc.dg/lto/tbaa_0.c
+++ b/gcc/testsuite/gcc.dg/lto/tbaa_0.c
@@ -1,5 +1,7 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -flto -fdump-tree-evrp" } */
+/* { 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 }} } */
+
typedef struct rtx_def *rtx;
typedef struct cselib_val_struct
{
@@ -38,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" } } */