]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid IPA opts around guality plumbing
authorRichard Biener <rguenther@suse.de>
Tue, 8 Jul 2025 11:46:01 +0000 (13:46 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 8 Jul 2025 13:44:39 +0000 (15:44 +0200)
The following avoids inlining the actual main() (renamed to
guality_main) into the guality plumbing.  This can cause
jump threading opportunities to appear and generally increase
the chance what we actually test isn't what we think.  Likewise
make guality_check noipa instead of just noinline.

gcc/testsuite/
* gcc.dg/guality/guality.h (guality_main): Declare noipa.
(guality_check): Likewise.

gcc/testsuite/gcc.dg/guality/guality.h

index d41327c24d50b518f4600ae9f68f93ebd7d21748..48b59d2e3242f61b363c8b8fe0dcc74c3bcf4abe 100644 (file)
@@ -204,9 +204,10 @@ int volatile guality_attached;
    of this wrapping, guality_main may not have an empty argument
    list.  */
 
-extern int guality_main (int argc, char *argv[]);
+extern int __attribute__((noipa))
+guality_main (int argc, char *argv[]);
 
-static void __attribute__((noinline))
+static void __attribute__((noipa))
 guality_check (const char *name, gualchk_t value, int unknown_ok);
 
 /* Set things up, run guality_main, then print a summary and quit.  */