This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] PR fortran/85357 -- add testcase
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Dec 2018 13:14:29 -0800
- Subject: [Committed] PR fortran/85357 -- add testcase
- Reply-to: sgk at troutmask dot apl dot washington dot edu
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" }