diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_8.f03')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_8.f03 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_8.f03 b/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_8.f03 new file mode 100644 index 000000000..1784ccefa --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_8.f03 @@ -0,0 +1,30 @@ +! { dg-do compile } + +! PR fortran/37429 +! This used to ICE, check that is fixed. + +MODULE touching + IMPLICIT NONE + + TYPE :: EqnSys33 + CONTAINS + PROCEDURE, NOPASS :: solve1 + END TYPE EqnSys33 + +CONTAINS + + FUNCTION solve1 () + IMPLICIT NONE + REAL :: solve1(3) + solve1 = 0.0 + END FUNCTION solve1 + + SUBROUTINE fill_gap () + IMPLICIT NONE + TYPE(EqnSys33) :: sys + REAL :: res + + res = sys%solve1 () ! { dg-error "Incompatible rank" } + END SUBROUTINE fill_gap + +END MODULE touching |