2 ! { dg-options "-std=f95" }
3 ! { dg-shouldfail "Fortran 2003 feature with -std=f95" }
4 ! Test whether import does not work with -std=f95
13 if(x%i /= 7) call abort()
25 if(y /= 8) call abort()
26 if(x%i /= 2) call abort()
33 integer, parameter :: kind = 8
39 import ! { dg-error "Fortran 2003: IMPORT statement" }
40 type(modType) :: y ! { dg-error "not been declared within the interface" }
41 real(kind) :: x ! { dg-error "has not been declared" }
47 integer, parameter :: dp = 8
58 import ! { dg-error "Fortran 2003: IMPORT statement" }
59 type(myType) :: x ! { dg-error "not been declared within the interface" }
60 integer(dp) :: y ! { dg-error "has not been declared" }
63 import :: myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
64 import myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
65 type(myType3) :: x ! { dg-error "not been declared within the interface" }
74 call bar(y,i8) ! { dg-error "Type/rank mismatch in argument" }
75 if(y%i /= 5 .or. i8/= 42) call abort()
77 call test(z) ! { dg-error "Type/rank mismatch in argument" }
78 if(z%i /= 1) call abort()
80 ! { dg-final { cleanup-modules "testmod" } }