Debian Codegraph @

gcc/testsuite/gfortran.dg/char_array_constructor_5.f90

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-std=gnu" }
3 !
4 ! PR fortran/93289
5 !
6 ! Contributed by Tobias Burnus
7
8 character(len=*), parameter :: str = "abj", str2 = "1234"
9 print *, [character(5) :: str, "ab", "hjf333"]
10 print *, [character(5) :: str, str2]
11 print *, [str, "ab", "hjf333"] ! { dg-warning "must have the same length" }
12 print *, [str, str2] ! { dg-warning "must have the same length" }
13 end