]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: lto: fix tbaa_0 test
authorSam James <sam@gentoo.org>
Fri, 25 Oct 2024 16:59:31 +0000 (17:59 +0100)
committerSam James <sam@gentoo.org>
Fri, 25 Oct 2024 21:10:22 +0000 (22:10 +0100)
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

index 74c0496711330758e2b944fe60808273cb7dc7e6..eb14ea62b8962de68fa8076f769185d7a2266eed 100644 (file)
@@ -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" } } */