]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix afdo-crossmodule-1b.c [PR120859]
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 20 Jul 2025 02:11:09 +0000 (19:11 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sun, 20 Jul 2025 02:36:57 +0000 (19:36 -0700)
The problem here is that the testcase is part of another
testcase but dg-final does not work across source files
so it needs its own dg-* headers to that match up with
afdo-crossmodule-1.c.

Pushed as preapproved in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120859#c4 .

PR testsuite/120859
gcc/testsuite/ChangeLog:

* gcc.dg/tree-prof/afdo-crossmodule-1b.c: Add some dg-*
commands like what is in afdo-crossmodule-1.c

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/gcc.dg/tree-prof/afdo-crossmodule-1b.c

index dd532952f9739a18609323bb3652ac8a1949f4ed..79ba529c7475f8bfa542e5bb6e02d2d0622181dd 100644 (file)
@@ -1,3 +1,8 @@
+/* { dg-require-effective-target lto } */
+/* { dg-additional-sources "afdo-crossmodule-1.c" } */
+/* { dg-options "-O3 -flto -fdump-ipa-afdo_offline -fdump-tree-einline-details" } */
+/* { dg-require-profiling "-fauto-profile" } */
+
 extern int foo2 ();
 
 int bar (int (*fooptr) (int (*)()))