]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix gcc.dg/ipa/pr120295.c on Solaris
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 3 Jul 2025 12:05:59 +0000 (14:05 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 3 Jul 2025 12:05:59 +0000 (14:05 +0200)
gcc.dg/ipa/pr120295.c FAILs on Solaris:

FAIL: gcc.dg/ipa/pr120295.c (test for excess errors)

Excess errors:
ld: warning: symbol 'glob' has differing types:
        (file /var/tmp//ccsDR59c.o type=OBJT; file /lib/libc.so type=FUNC);
        /var/tmp//ccsDR59c.o definition taken

Fixed by renaming the glob variable to glob_ to avoid the conflict.

Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.

gcc/testsuite:
* gcc.dg/ipa/pr120295.c (glob): Rename to glob_.

gcc/testsuite/gcc.dg/ipa/pr120295.c

index 2033ee9493d2da5cdea66675f4e9ac8b1558536b..4d5a2661a734ae6e4e230b4eef81b6e20a8f7f2a 100644 (file)
@@ -9,10 +9,10 @@ char c, k, g, e;
 short d[2] = {0};
 int *i = &j;
 
-volatile int glob;
+volatile int glob_;
 void __attribute__((noipa)) sth (const char *, int a)
 {
-  glob = a;
+  glob_ = a;
   return;
 }