OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / duplicate_type_2.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=gnu -Wsurprising" }
3
4 ! PR fortran/30239
5 ! Check for errors when a symbol gets declared a type twice, even if it
6 ! is the same.
7
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
14
15 INTEGER FUNCTION bar () RESULT (x)
16   IMPLICIT NONE
17   INTEGER :: x ! { dg-error "basic type of" }
18
19   INTEGER :: y
20   INTEGER :: y ! { dg-error "basic type of" }
21
22   x = 42
23 END FUNCTION bar