This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] PR fortran/85357 -- add testcase


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.

 
-- 
Steve
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" }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]