PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.dg / duplicate_type_1.f90
blobc76c45d18e08b0811d3d322cc643a7501971023c
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR fortran/30239
5 ! Check for errors when a symbol gets declared a type twice, even if it
6 ! is the same.
8 INTEGER FUNCTION foo ()
9 IMPLICIT NONE
10 INTEGER :: foo ! { dg-error "basic type of" }
11 INTEGER :: foo ! { dg-error "basic type of" }
12 foo = 42
13 END FUNCTION foo
15 INTEGER FUNCTION bar () RESULT (x)
16 IMPLICIT NONE
17 INTEGER :: x ! { dg-error "basic type of" }
19 INTEGER :: y
20 INTEGER :: y ! { dg-error "basic type of" }
22 x = 42
23 END FUNCTION bar