PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / implicit_9.f90
blob04b7afa4ed82b98b11ebbc7878dd493d7746e70c
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
4 ! Tests patch for PR29373, in which the implicit character
5 ! statement messes up the function declaration because the
6 ! requisite functions in decl.c were told nothing about
7 ! implicit types.
9 ! Contributed by Tobias Schlueter <tobi@gcc.gnu.org>
11 implicit character*32 (a-z)
12 CHARACTER(len=255), DIMENSION(1,2) :: a
14 ! Reporters original, which triggers another error:
15 ! gfc_todo: Not Implemented: complex character array
16 ! constructors.=> PR29431
17 ! a = reshape((/ to_string(1.0) /), (/ 1, 2 /))
19 a = to_string(1.0)
20 print *, a
21 CONTAINS
22 CHARACTER*(32) FUNCTION to_string(x)
23 REAL, INTENT(in) :: x
24 WRITE(to_string, FMT="(F6.3)") x
25 END FUNCTION
26 END PROGRAM