From 51d9ed489006f5693cb3d1bddaba431a98aa86c6 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 16 May 2016 19:49:44 +0200 Subject: [hsa] Increase hsa symbol alignment to natural one 2016-05-16 Martin Jambor * 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 --- libgomp/ChangeLog | 4 ++++ libgomp/testsuite/libgomp.hsa.c/complex-align-2.c | 27 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 libgomp/testsuite/libgomp.hsa.c/complex-align-2.c (limited to 'libgomp') 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 + + * testsuite/libgomp.hsa.c/complex-align-2.c: New test. + 2016-05-02 Nathan Sidwell * 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; +} + -- cgit v1.1