Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/gomp/pr70550-1.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR middle-end/70550 */ /* { dg-do compile } */ /* { dg-additional-options "-Wuninitialized" } */ #ifdef __SIZEOF_INT128__ typedef __int128 T; #else typedef long long T; #endif void bar (T); #pragma omp declare target (bar) void foo (void) { { int i; #pragma omp target defaultmap(tofrom:scalar) /* { dg-bogus "is used uninitialized in this function" } */ { i = 26; bar (i); } } { T j; #pragma omp target defaultmap(tofrom:scalar) /* { dg-bogus "is used uninitialized in this function" } */ { j = 37; bar (j); } } { int i; #pragma omp target /* { dg-bogus "is used uninitialized in this function" } */ { i = 26; bar (i); } } { T j; #pragma omp target /* { dg-bogus "is used uninitialized in this function" } */ { j = 37; bar (j); } } { int i; #pragma omp target firstprivate (i) /* { dg-warning "is used uninitialized in this function" } */ { i = 26; bar (i); } } { T j; #pragma omp target firstprivate (j) /* { dg-warning "is used uninitialized in this function" } */ { j = 37; bar (j); } } { int i; #pragma omp target private (i) /* { dg-bogus "is used uninitialized in this function" } */ { i = 26; bar (i); } } { T j; #pragma omp target private (j) /* { dg-bogus "is used uninitialized in this function" } */ { j = 37; bar (j); } } }