From: Rainer Orth Date: Thu, 21 Nov 2019 16:14:21 +0000 (+0000) Subject: Fix failures on Solaris with -fno-common default X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8e724465b5e1e6c479503f219cd725caaa8e781;p=gcc.git Fix failures on Solaris with -fno-common default gcc/testsuite: * gcc.c-torture/execute/20030913-1.c: Rename glob to g. * gcc.c-torture/execute/960218-1.c: Rename glob to gl. * gcc.c-torture/execute/complex-6.c: Rename err to e. * gcc.dg/torture/ssa-pta-fn-1.c: Rename glob to g. libgomp: * testsuite/libgomp.c/pr39591-1.c: Rename err to e. * testsuite/libgomp.c/pr39591-2.c: Likewise. * testsuite/libgomp.c/pr39591-3.c: Likewise. * testsuite/libgomp.c/private-1.c: Likewise. * testsuite/libgomp.c/task-1.c: Likewise. * testsuite/libgomp.c/task-5.c: Renamed err to serr. From-SVN: r278571 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b4a961937ba..a075a6fbd24 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-11-21 Rainer Orth + + * gcc.c-torture/execute/20030913-1.c: Rename glob to g. + * gcc.c-torture/execute/960218-1.c: Rename glob to gl. + * gcc.c-torture/execute/complex-6.c: Rename err to e. + * gcc.dg/torture/ssa-pta-fn-1.c: Rename glob to g. + 2019-11-21 Marek Polacek PR c++/92450 - ICE with invalid nested name specifier. diff --git a/gcc/testsuite/gcc.c-torture/execute/20030913-1.c b/gcc/testsuite/gcc.c-torture/execute/20030913-1.c index 5e33f50f560..ed8724bc244 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20030913-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20030913-1.c @@ -1,12 +1,12 @@ /* Assignments via pointers pointing to global variables were being killed by SSA-DCE. Test contributed by Paul Brook */ -int glob; +int g; void fn2(int ** q) { - *q = &glob; + *q = &g; } void test() @@ -21,6 +21,6 @@ void test() int main() { test(); - if (glob != 42) abort(); + if (g != 42) abort(); exit (0); } diff --git a/gcc/testsuite/gcc.c-torture/execute/960218-1.c b/gcc/testsuite/gcc.c-torture/execute/960218-1.c index 7301a17b00d..dc94734a81f 100644 --- a/gcc/testsuite/gcc.c-torture/execute/960218-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/960218-1.c @@ -1,8 +1,8 @@ -int glob; +int gl; g (x) { - glob = x; + gl = x; return 0; } @@ -16,7 +16,7 @@ f (x) main () { f (3); - if (glob != -4) + if (gl != -4) abort (); exit (0); } diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-6.c b/gcc/testsuite/gcc.c-torture/execute/complex-6.c index 50fb18ea62e..75f92108088 100644 --- a/gcc/testsuite/gcc.c-torture/execute/complex-6.c +++ b/gcc/testsuite/gcc.c-torture/execute/complex-6.c @@ -6,7 +6,7 @@ #include #include -int err; +int e; #define TEST(TYPE, FUNC) \ __complex__ TYPE \ @@ -31,7 +31,7 @@ test_ ## FUNC (void) \ if (res != 1.0 - 2.0i) \ { \ printf ("test_" #FUNC " failed\n"); \ - ++err; \ + ++e; \ } \ } @@ -46,7 +46,7 @@ int main (void) { - err = 0; + e = 0; test_float (); test_double (); @@ -54,7 +54,7 @@ main (void) test_int (); test_long_int (); - if (err != 0) + if (e != 0) abort (); return 0; diff --git a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c index 7d6da11854e..1f30467b98e 100644 --- a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c +++ b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c @@ -3,7 +3,7 @@ /* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */ extern void abort (void); -int *glob; +int *g; int dummy; int * __attribute__((noinline,const)) @@ -13,7 +13,7 @@ int * __attribute__((noinline,pure)) foo_pure(int *p) { return p + dummy; } int * __attribute__((noinline)) -foo_normal(int *p) { glob = p; return p; } +foo_normal(int *p) { g = p; return p; } void test_const(void) { diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index c739b4179be..65478302ba8 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,12 @@ +2019-11-21 Rainer Orth + + * testsuite/libgomp.c/pr39591-1.c: Rename err to e. + * testsuite/libgomp.c/pr39591-2.c: Likewise. + * testsuite/libgomp.c/pr39591-3.c: Likewise. + * testsuite/libgomp.c/private-1.c: Likewise. + * testsuite/libgomp.c/task-1.c: Likewise. + * testsuite/libgomp.c/task-5.c: Renamed err to serr. + 2019-11-20 Julian Brown * plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock diff --git a/libgomp/testsuite/libgomp.c/pr39591-1.c b/libgomp/testsuite/libgomp.c/pr39591-1.c index df326f85424..a22bc337819 100644 --- a/libgomp/testsuite/libgomp.c/pr39591-1.c +++ b/libgomp/testsuite/libgomp.c/pr39591-1.c @@ -3,7 +3,7 @@ extern void abort (void); -int err; +int e; int main (void) @@ -23,10 +23,10 @@ main (void) for (j = 0; j < sizeof array / sizeof array[0]; j++) if (array[j] != 0x55555555) #pragma omp atomic - err++; + e++; } } - if (err) + if (e) abort (); return 0; } diff --git a/libgomp/testsuite/libgomp.c/pr39591-2.c b/libgomp/testsuite/libgomp.c/pr39591-2.c index 2fe6421aef4..ba8b862f49c 100644 --- a/libgomp/testsuite/libgomp.c/pr39591-2.c +++ b/libgomp/testsuite/libgomp.c/pr39591-2.c @@ -3,7 +3,7 @@ extern void abort (void); -int err; +int e; void __attribute__((noinline)) foo (int *array) @@ -14,7 +14,7 @@ foo (int *array) for (j = 0; j < 40; j++) if (array[j] != 0x55555555) #pragma omp atomic - err++; + e++; } } @@ -32,7 +32,7 @@ main (void) for (i = 0; i < 50; i++) foo (array); } - if (err) + if (e) abort (); return 0; } diff --git a/libgomp/testsuite/libgomp.c/pr39591-3.c b/libgomp/testsuite/libgomp.c/pr39591-3.c index 81e8ca8e497..590553437ea 100644 --- a/libgomp/testsuite/libgomp.c/pr39591-3.c +++ b/libgomp/testsuite/libgomp.c/pr39591-3.c @@ -3,7 +3,7 @@ extern void abort (void); -int err, a[40]; +int e, a[40]; void __attribute__((noinline)) foo (int *array) @@ -14,7 +14,7 @@ foo (int *array) for (j = 0; j < 40; j++) if (array[j] != 0x55555555) #pragma omp atomic - err++; + e++; } } @@ -33,7 +33,7 @@ main (void) for (i = 0; i < 50; i++) foo (a); } - if (err) + if (e) abort (); return 0; } diff --git a/libgomp/testsuite/libgomp.c/private-1.c b/libgomp/testsuite/libgomp.c/private-1.c index 1d3659b25fa..10c092a12c6 100644 --- a/libgomp/testsuite/libgomp.c/private-1.c +++ b/libgomp/testsuite/libgomp.c/private-1.c @@ -20,7 +20,7 @@ f1 (int i, int j, int k) } int v1 = 1, v2 = 2, v5 = 5; -int err; +int e; void f2 (void) @@ -35,11 +35,11 @@ f2 (void) #pragma omp parallel num_threads(1) firstprivate(v1, v2, v3, v4) { if (++v1 != 8 || ++v2 != 3 || ++v3 != 4 || ++v4 != 5 || ++v5 != 6) - err = 1; + e = 1; } if (v1 != 7 || v2 != 2 || v3 != 3 || v4 != 4 || v5 != 6) abort (); - if (err) + if (e) abort (); } } diff --git a/libgomp/testsuite/libgomp.c/task-1.c b/libgomp/testsuite/libgomp.c/task-1.c index 66f58a29b87..d17c3c61c2f 100644 --- a/libgomp/testsuite/libgomp.c/task-1.c +++ b/libgomp/testsuite/libgomp.c/task-1.c @@ -20,7 +20,7 @@ f1 (int i, int j, int k) } int v1 = 1, v2 = 2, v5 = 5; -int err; +int e; void f2 (void) @@ -35,12 +35,12 @@ f2 (void) #pragma omp task { if (++v1 != 8 || ++v2 != 3 || ++v3 != 4 || ++v4 != 5 || ++v5 != 6) - err = 1; + e = 1; } #pragma omp taskwait if (v1 != 7 || v2 != 2 || v3 != 3 || v4 != 4 || v5 != 6) abort (); - if (err) + if (e) abort (); } } diff --git a/libgomp/testsuite/libgomp.c/task-5.c b/libgomp/testsuite/libgomp.c/task-5.c index b1523712760..bf44ddd012b 100644 --- a/libgomp/testsuite/libgomp.c/task-5.c +++ b/libgomp/testsuite/libgomp.c/task-5.c @@ -3,42 +3,42 @@ #include #include -int err; +int serr; int main () { int e; -#pragma omp parallel shared(err) +#pragma omp parallel shared(serr) { if (omp_in_final ()) #pragma omp atomic write - err = 1; - #pragma omp task if (0) shared(err) + serr = 1; + #pragma omp task if (0) shared(serr) { if (omp_in_final ()) #pragma omp atomic write - err = 1; - #pragma omp task if (0) shared(err) + serr = 1; + #pragma omp task if (0) shared(serr) if (omp_in_final ()) #pragma omp atomic write - err = 1; + serr = 1; } - #pragma omp task final (1) shared(err) + #pragma omp task final (1) shared(serr) { if (!omp_in_final ()) #pragma omp atomic write - err = 1; + serr = 1; #pragma omp taskyield #pragma omp taskwait - #pragma omp task shared(err) + #pragma omp task shared(serr) if (!omp_in_final ()) #pragma omp atomic write - err = 1; + serr = 1; } } #pragma omp atomic read - e = err; + e = serr; if (e) abort (); return 0;