gcc/testsuite/gfortran.dg/bounds_check_array_ctor_6.f90
raw| 1 | ! { dg-do run } |
| 2 | ! { dg-options "-fbounds-check" } |
| 3 | ! { dg-shouldfail "foo" } |
| 4 | ! |
| 5 | ! PR 36112 |
| 6 | ! Check correct bounds-checking behavior for character-array-constructors. |
| 7 | |
| 8 | call test ("short", "also5") |
| 9 | contains |
| 10 | subroutine test(r, s) |
| 11 | character(len=*) :: r, s |
| 12 | character(len=128) :: arr(3) |
| 13 | arr = (/ r, s, "this is too long" /) |
| 14 | end subroutine test |
| 15 | end |
| 16 | ! { dg-output "Different CHARACTER lengths \\(5/16\\) in array constructor" } |