1 /* Verify that OpenACC 'declare' cleans up for VLAs. */
2
3 /* { dg-additional-options "-fdump-tree-gimple" } */
4
f1(void)5 void f1 (void)
6 {
7 #define N_f1 1000
8 int A_f1[N_f1];
9 #pragma acc declare copy(A_f1)
10 /* { dg-final { scan-tree-dump-times {#pragma omp target oacc_declare map\(to:A_f1} 1 gimple } }
11 { dg-final { scan-tree-dump-times {#pragma omp target oacc_declare map\(from:A_f1} 1 gimple } } */
12 }
13
f2(void)14 void f2 (void)
15 {
16 int N_f2 = 1000;
17 int A_f2[N_f2];
18 #pragma acc declare copy(A_f2)
19 /* { dg-final { scan-tree-dump-times {#pragma omp target oacc_declare map\(to:\(\*A_f2} 1 gimple } }
20 { dg-final { scan-tree-dump-times {#pragma omp target oacc_declare map\(from:\(\*A_f2} 1 gimple } } */
21 }
22