diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/char_expr_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/char_expr_2.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/char_expr_2.f90 b/gcc/testsuite/gfortran.dg/char_expr_2.f90 new file mode 100644 index 000000000..f3bfb04b2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_expr_2.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! PR fortran/36803 +! PR fortran/36795 +! +! "(n)" was simplified to the EXPR_VARIABLE "n" +! and thus "(n)" was judged as definable. +! +interface + subroutine foo(x) + character, intent(out) :: x(:) ! or INTENT(INOUT) + end subroutine foo +end interface +character :: n(5) +call foo( (n) ) ! { dg-error "Non-variable expression" } +end |