mirror of
https://github.com/autc04/Retro68.git
synced 2025-02-20 02:29:11 +00:00
19 lines
420 B
C
19 lines
420 B
C
/* { dg-skip-if "" { *-*-* } } */
|
|
|
|
#pragma acc routine nohost
|
|
int f1(int x)
|
|
{
|
|
/* Make sure this fails host compilation. */
|
|
#if defined ACC_DEVICE_TYPE_host
|
|
asm ("IT'S A TRAP");
|
|
#elif defined ACC_DEVICE_TYPE_nvidia
|
|
asm ("{\n\t .reg .u32 %tid_x;\n\t mov.u32 %tid_x, %tid.x;\n\t}");
|
|
#elif defined ACC_DEVICE_TYPE_radeon
|
|
asm ("s_nop 0");
|
|
#else
|
|
# error Not ported to this ACC_DEVICE_TYPE
|
|
#endif
|
|
|
|
return 2 * x;
|
|
}
|