tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / char_length_9.f90
blob36f724a0e0f8d1b19ae76ebb7255e5c4637819f3
1 ! { dg-do compile }
2 ! Test the fix for a regression caused by the first fix of PR31879.
3 ! Reported by Tobias Burnus <burnus@gcc.gnu.org>
5 MODULE input_val_types
6 IMPLICIT NONE
7 INTEGER, PARAMETER :: default_string_length=80
8 TYPE val_type
9 CHARACTER(len=default_string_length), DIMENSION(:), POINTER :: c_val
10 END TYPE val_type
11 CONTAINS
12 SUBROUTINE val_get (val, c_val)
13 TYPE(val_type), POINTER :: val
14 CHARACTER(LEN=*), INTENT(out) :: c_val
15 INTEGER :: i, l_out
16 i=1
17 c_val((i-1)*default_string_length+1:MIN (l_out, i*default_string_length)) = &
18 val%c_val(i)(1:MIN (80, l_out-(i-1)*default_string_length))
19 END SUBROUTINE val_get
20 END MODULE input_val_types