diff options
author | Martin Jambor <mjambor@suse.cz> | 2016-05-16 19:49:44 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2016-05-16 19:49:44 +0200 |
commit | 51d9ed489006f5693cb3d1bddaba431a98aa86c6 (patch) | |
tree | 5ed5bcd7d4b7df31c135b193a9f9d59d92b00c1b /libgomp | |
parent | 538374e1396abe947817191a4da34ecc0ad3fb19 (diff) | |
download | gcc-51d9ed489006f5693cb3d1bddaba431a98aa86c6.zip gcc-51d9ed489006f5693cb3d1bddaba431a98aa86c6.tar.gz gcc-51d9ed489006f5693cb3d1bddaba431a98aa86c6.tar.bz2 |
[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
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 4 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.hsa.c/complex-align-2.c | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 9de04f5..f509114 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2016-05-16 Martin Jambor <mjambor@suse.cz> + + * testsuite/libgomp.hsa.c/complex-align-2.c: New test. + 2016-05-02 Nathan Sidwell <nathan@codesourcery.com> * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust 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 0000000..b2d7acf --- /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; +} + |