Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/pr93464.f90

raw
1 ! { dg-additional-options -Wuninitialized }
2 !
3 ! PR fortran/93464
4 !
5 ! Contributed by G. Steinmetz
6 !
7 ! Did before ICE in gfc_omp_check_optional_argument
8
9 ! Additionally, check for uninitialized warnings.
10 ! Compiled with -O (as done here), no show up;
11 ! for -O0, see testcase file 'pr93464-1.f90'.
12
13 program p
14 character :: c(2) = 'a'
15 character, allocatable :: z(:)
16 !$acc parallel
17 !$omp target
18 ! Remark: As run-time check, required either 'c' being allocated or if(allocated(c)':
19 z = c
20 !$acc end parallel
21 !$omp end target
22 print *, z
23 end