diff mbox series

[Committed] PR fortran/85357 -- add testcase

Message ID 20181226211429.GA164@troutmask.apl.washington.edu
State New
Headers show
Series [Committed] PR fortran/85357 -- add testcase | expand

Commit Message

Steve Kargl Dec. 26, 2018, 9:14 p.m. UTC
After reviewing the PR audit trail, I agree with Janus'
comments #4 and #6, and I have converted his code example
in comment #7 to the committed testcase.  The originally
reported ICE is gone on trunk, branch-7, and branch-8.
However, branch-7 and branch-8, the compilation terminates with 

(null):0: confused by earlier errors, bailing out

That (null) was the original source of the ICE, but the error
machinery now protects against NULL pointer references.

2018-12-26  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/85357
	* gfortran.df/pr85357.f90: New test.
diff mbox series

Patch

Index: gcc/testsuite/gfortran.dg/pr85357.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr85357.f90	(nonexistent)
+++ gcc/testsuite/gfortran.dg/pr85357.f90	(working copy)
@@ -0,0 +1,17 @@ 
+! { dg-do compile }
+module base
+   implicit none
+contains
+   subroutine summation(i)
+      integer, intent(in) :: i
+   end subroutine
+end module
+
+module extended
+   use base
+   implicit none
+contains
+   subroutine summation()  ! { dg-error "is already defined" }
+   end subroutine          ! { dg-error "Expecting END MODULE statement" }
+end module
+! { dg-prune-output "is already defined at" }