diff mbox series

[COMMITTED,5/8] testsuite: lto: fix tbaa_0 test

Message ID f5f2aa7a0085e8dcac746a314ca0a72e8fed0a52.1729890564.git.sam@gentoo.org
State New
Headers show
Series [COMMITTED,1/8] testsuite: lto: rename pr95677 test | expand

Commit Message

Sam James Oct. 25, 2024, 9:09 p.m. UTC
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.
---
 gcc/testsuite/gcc.dg/lto/tbaa_0.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/lto/tbaa_0.c b/gcc/testsuite/gcc.dg/lto/tbaa_0.c
index 74c049671133..eb14ea62b896 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" } } */