diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/char_length_18.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/char_length_18.f90 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/char_length_18.f90 b/gcc/testsuite/gfortran.dg/char_length_18.f90 new file mode 100644 index 000000000..9fd31c862 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_length_18.f90 @@ -0,0 +1,9 @@ +! { dg-do compile } +! PR 45576 - no ICE for missing optional argument +! Test case supplied by Joost VandeVondele +SUBROUTINE get_r_val() + INTEGER, PARAMETER :: default_string_length=128 + CHARACTER(len=default_string_length) :: c_val + LOGICAL :: check + check = c_val(LEN_TRIM(c_val):LEN_TRIM(c_val))=="]" +END SUBROUTINE get_r_val |