c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_fail_7.f90
blob6a8dafc27a81d6a4748e848ff3e602bcec194821
1 ! { dg-do run }
2 ! { dg-additional-options "-fcheck=bounds -g" }
3 ! { dg-output "At line 18 .*" }
4 ! { dg-shouldfail "Different CHARACTER lengths (32/0) in array constructor" }
6 ! PR fortran/70231 - CHARACTER lengths in array constructors
8 program p
9 implicit none
10 integer, parameter :: char_len = 32
11 integer :: l = 0
12 character(char_len) :: ch = "a"
13 character(char_len), allocatable :: ch_array(:), res1(:), res2(:)
15 allocate(ch_array(0))
16 res1 = [ ch_array, ch ] ! was false positive
17 print *, res1
18 res2 = [[ch_array, ch(1:l)], ch(1:l)] ! was false negative on x86
19 print *, res2
20 end