blob: d0d2fa53e0374e09141e45b61bfcfbc71e26d27c [file] [log] [blame]
/* 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" } */
{
i = 26;
bar (i);
}
}
{
T j;
#pragma omp target defaultmap(tofrom:scalar) /* { dg-bogus "is used uninitialized" } */
{
j = 37;
bar (j);
}
}
{
int i;
#pragma omp target /* { dg-bogus "is used uninitialized" } */
{
i = 26;
bar (i);
}
}
{
T j;
#pragma omp target /* { dg-bogus "is used uninitialized" } */
{
j = 37;
bar (j);
}
}
{
int i;
#pragma omp target firstprivate (i) /* { dg-warning "is used uninitialized" } */
{
i = 26;
bar (i);
}
}
{
T j;
#pragma omp target firstprivate (j) /* { dg-warning "is used uninitialized" } */
{
j = 37;
bar (j);
}
}
{
int i;
#pragma omp target private (i) /* { dg-bogus "is used uninitialized" } */
{
i = 26;
bar (i);
}
}
{
T j;
#pragma omp target private (j) /* { dg-bogus "is used uninitialized" } */
{
j = 37;
bar (j);
}
}
}