[PR 82416] Do not extend operands to at least 32 bits
[official-gcc.git] / libgomp / testsuite / libgomp.hsa.c / pr82416.c
blobb89d421e8f3a647ee987cc9a0402e47874eb55a0
1 char __attribute__ ((noipa))
2 toup (char X)
4 if (X >= 97 && X <= 122)
5 return X - 32;
6 else
7 return X;
10 char __attribute__ ((noipa))
11 target_toup (char X)
13 char r;
14 #pragma omp target map(to:X) map(from:r)
16 if (X >= 97 && X <= 122)
17 r = X - 32;
18 else
19 r = X;
21 return r;
24 int main (int argc, char **argv)
26 char a = 'a';
27 if (toup (a) != target_toup (a))
28 __builtin_abort ();
29 a = 'Z';
30 if (toup (a) != target_toup (a))
31 __builtin_abort ();
32 a = 5;
33 if (toup (a) != target_toup (a))
34 __builtin_abort ();
36 return 0;