2 ! Tests the fix for PR31219, in which the character length of
3 ! the functions in the array constructor was not being obtained
4 ! correctly and this caused an ICE.
6 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
9 CHARACTER(LEN = 8) :: str
11 write (str,'(2A4)') (/( F(I, J), I = 1, 2)/)
12 IF (str .NE. " ODD EVE") call abort ()
14 ! Comment #1 from F-X Coudert (noted by T. Burnus) that
15 ! actually exercises a different part of the bug.
19 FUNCTION F (K,J) RESULT(I)
21 CHARACTER(LEN = J) :: I
22 IF (MODULO (K, 2) .EQ. 0) THEN
29 function g(k) result(i)
31 character(len = k) :: i
35 character(*),dimension(1) :: a
36 if(len (a) /= 3) call abort ()
37 if(a(1) /= '123') call abort ()