<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59977>59977</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[OpenMP] buggy printf in target regions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
openmp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
jdoerfert
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ye-luo
</td>
</tr>
</table>
<pre>
printf.c
```C
#include <stdio.h>
int main()
{
size_t a = 1;
size_t b = 2;
size_t c = 3;
size_t d = 4;
#pragma omp target
{
printf("%d %u %zu\n", a, b, c);
printf("%d %u %zu %d\n", a, b, c, d);
}
}
```
```bash
clang -fopenmp -fopenmp-targets=nvptx64 printf.c
./a.out
1 0 %zu
1 0 2 1027130000
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U9uOnDAM_RrzEg0KDtcHHnaH8la1f1AFCJBVSFAuq85-fcWlM92pWgkdYh_l2McY7pyctBA1ZK-A-DYYYUdhPSBC1kQ8-NnY-iYuKpioM8OtXq3Ufox7oA3QF8jp8VzPGJnUvQqDIMCuzg_SxDOwLye7o9SeLFxqwBKwOpni9TgQ4uSH-OEJJ8AakgB7JrqdwAdx5vs9z_6-MOxE-gcByFbLp4UTs6zEczsJf-funRxO9y4RMBsIYBY2-AiQXfWevRK-QbdBv7l5FCH_E9hw-JfKlQyfpaBofo-peZr7U9hxNx-pXnE9kctoVqGX9X64HG4dsEa_r_5nnpLPXzQGbHlsgidHnBB6er6HSBKKRcIopc_1o6FmQ8UqHok6yQuW5RRTFs11VZZjVWLaFzxlxUizUmCSp7QrMReMVZGskSKjSYKYZDRlcVlUWYqsYkWSjmNRQkrFwqWKlXpfYmOnSDoXRJ1VVVFEindCuXONuzAdcwXEw_a5z7beLl-6MDlIqZLOu4ecl17tP8K3Veiv3yFrSBem6XYOiEh9rgqxYpJGuyhYVc_erw7YC2AL2E7Sz6GLe7MAtpvy-bqs1ryJ3gO2e9cOsN0b_xUAAP__9jL2lg">