PR fortran/48820
* gfortran.dg/assumed_type_1.f90: Correct dg-error.
* gfortran.dg/assumed_type_3.f90: Correct dg-error.
* gfortran.dg/assumed_type_4.f90: Correct dg-error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184856
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-03-03 Tobias Burnus <burnus@net-b.de>
PR fortran/48820
+ * gfortran.dg/assumed_type_1.f90: Correct dg-error.
+ * gfortran.dg/assumed_type_3.f90: Correct dg-error.
+ * gfortran.dg/assumed_type_4.f90: Correct dg-error.
+
+2012-03-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
* gfortran.dg/assumed_type_1.f90: New.
* gfortran.dg/assumed_type_2.f90: New.
* gfortran.dg/assumed_type_3.f90: New.
contains
subroutine foo(x)
type(*):: x(*)
- call MPI_Send(x, 1, 1,1,1,j,i)
call MPI_Send2(x, 1, 1,1,1,j,i)
end
end
!
! Test TYPE(*)
+subroutine fourteen(x)
+ type(*) :: x
+ x = x ! { dg-error "Invalid expression with assumed-type variable" }
+end subroutine fourteen
+
subroutine one(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
type(*), value :: a
end subroutine one
subroutine okay2(x)
type(*) :: x(*)
end subroutine okay2
- subroutine okay2(x,y)
+ subroutine okay3(x,y)
integer :: x
type(*) :: y
- end subroutine okay2
+ end subroutine okay3
end interface
interface two
subroutine okok1(x)
subroutine twelf(x)
type(*) :: x
- call bar(x)
+ call bar(x) ! { dg-error "Type mismatch in argument" }
contains
subroutine bar(x)
- integer :: x ! { dg-error "Type mismatch in argument" }
+ integer :: x
end subroutine bar
end subroutine twelf
print *, ubound(y, dim=x) ! { dg-error "must be INTEGER" }
end subroutine thirteen
-subroutine fourteen(x)
- type(*) :: x
- x = x ! { dg-error "Invalid expression with assumed-type variable" }
-end subroutine fourteen
+
!
! Test TYPE(*)
-subroutine one(a) ! { dg-error "TS 29113: Assumed type" }
- type(*) :: a
+subroutine one(a)
+ type(*) :: a ! { dg-error "TS 29113: Assumed type" }
end subroutine one