arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / duplicate_type_2.f90
blob0fd9258fe8098e7b77b0558f0fe65339118a31f5
1 ! { dg-do compile }
2 ! { dg-options "-std=gnu -Wsurprising" }
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