diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-16 17:49:44 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-16 17:49:44 +0000 |
commit | 194c8884e5818c0b43fe521562f4ac3978449756 (patch) | |
tree | 5ed5bcd7d4b7df31c135b193a9f9d59d92b00c1b /libgomp/testsuite | |
parent | 8539887b2d7c85bdbea112f837779fc587e95eb0 (diff) | |
download | gcc-194c8884e5818c0b43fe521562f4ac3978449756.tar.gz |
[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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/libgomp.hsa.c/complex-align-2.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.hsa.c/complex-align-2.c b/libgomp/testsuite/libgomp.hsa.c/complex-align-2.c new file mode 100644 index 00000000000..b2d7acff443 --- /dev/null +++ b/libgomp/testsuite/libgomp.hsa.c/complex-align-2.c @@ -0,0 +1,27 @@ +#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; +} + |