aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2016-05-16 19:49:44 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2016-05-16 19:49:44 +0200
commit51d9ed489006f5693cb3d1bddaba431a98aa86c6 (patch)
tree5ed5bcd7d4b7df31c135b193a9f9d59d92b00c1b /libgomp/testsuite
parent538374e1396abe947817191a4da34ecc0ad3fb19 (diff)
downloadgcc-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/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.hsa.c/complex-align-2.c27
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 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;
+}
+