gcc/libgomp/testsuite/libgomp.hsa.c/complex-align-2.c
Martin Jambor 51d9ed4890 [hsa] Increase hsa symbol alignment to natural one
2016-05-16  Martin Jambor  <mjambor@suse.cz>

	* hsa-gen.c (fillup_for_decl): Increase alignment to natural one.
	(get_symbol_for_decl): Sorry if a global symbol in under-aligned.

libgomp/
        * testsuite/libgomp.hsa.c/complex-align-2.c: New test.

From-SVN: r236295
2016-05-16 19:49:44 +02:00

28 lines
353 B
C

#pragma omp declare target
_Complex int *g;
#pragma omp end declare target
_Complex float f(void);
int
main ()
{
_Complex int y;
#pragma omp target map(from:y)
{
_Complex int x;
g = &x;
__imag__ x = 1;
__real__ x = 2;
y = x;
}
if ((__imag__ y != 1)
|| (__real__ y != 2))
__builtin_abort ();
return 0;
}