Hi Chung-Lin!

On 2019-08-20T19:36:56+0800, Chung-Lin Tang <chunglin_t...@mentor.com> wrote:
> --- libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c   
> (nonexistent)
> +++ libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c   
> (working copy)
> @@ -0,0 +1,103 @@
> +/* { dg-do run { target { ! openacc_host_selected } } } */

Curious about that restriction, I removed it, and see that these test
cases then fail (SIGSEGV) for host-fallback execution.  Same in presence
of 'if (false)' clauses, which do get used in real-world OpenACC code
(with proper conditionals, of course).

    Program received signal SIGSEGV, Segmentation fault.
    0x0000000000400fd0 in test1._omp_fn.0 () at 
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c:26
    26            a[i][j] = b[i][j];
    (gdb) bt
    #0  0x0000000000400fd0 in test1._omp_fn.0 () at 
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c:26
    #1  0x00007ffff7bbfdf9 in GOACC_parallel_keyed (flags_m=<optimized out>, 
fn=0x400ef1 <test1._omp_fn.0>, mapnum=2, hostaddrs=0x7fffffffc8c0, 
sizes=0x606290 <.omp_data_sizes.4>, kinds=0x6062a0 <.omp_data_kinds.5>) at 
[...]/source-gcc/libgomp/oacc-parallel.c:221
    #2  0x0000000000400a1c in test1 () at 
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c:22
    #3  0x0000000000400ee0 in main () at 
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/noncontig_array-1.c:97

What does it take to make that work?


Grüße
 Thomas

Attachment: signature.asc
Description: PGP signature

Reply via email to