diff mbox

[Committed] PR fortran/77420 -- revert previous commit

Message ID 20160913170556.GA25145@troutmask.apl.washington.edu
State New
Headers show

Commit Message

Steve Kargl Sept. 13, 2016, 5:05 p.m. UTC
I've reverted my previous fix for PR fortran/77420.
It was causing a regression that could, in principle,
effect a significant nubmer of gfortran users. 

2016-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77420
	* module.c (load_equiv):  Revert revision 240063.

2016-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77420
	* gfortran.dg/pr77420.f90: Revert revision 240063 by removing test.

Comments

Jakub Jelinek Sept. 13, 2016, 5:08 p.m. UTC | #1
On Tue, Sep 13, 2016 at 10:05:56AM -0700, Steve Kargl wrote:
> --- gcc/fortran/module.c	(revision 240117)
> +++ gcc/fortran/module.c	(working copy)
> @@ -4647,7 +4647,7 @@ load_equiv (void)
>        }
>  
>      /* Check for duplicate equivalences being loaded from different modules */
> -    duplicate = gfc_current_ns->equiv ? false:true;

Just a nit.  This would have been better written as !gfc_current_ns->equiv;
and if not, it is badly formatted (it should be ? false : true;).

	Jakub
diff mbox

Patch

Index: gcc/fortran/module.c
===================================================================
--- gcc/fortran/module.c	(revision 240117)
+++ gcc/fortran/module.c	(working copy)
@@ -4647,7 +4647,7 @@  load_equiv (void)
       }
 
     /* Check for duplicate equivalences being loaded from different modules */
-    duplicate = gfc_current_ns->equiv ? false:true;
+    duplicate = false;
     for (equiv = gfc_current_ns->equiv; equiv; equiv = equiv->next)
       {
 	if (equiv->module && head->module
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 240117)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -84,13 +84,6 @@ 
 	PR rtl-optimization/77289
 	* gcc.target/powerpc/pr77289.c: New test.
 
-2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
-
-	PR fortran/77420
-	* module.c (load_equiv): If the current namespace has a list of
-	equivalence statements, initialize duplicate to false and then
-	look for duplicates; otherwise, initialize it to true.
-
 2016-09-09  Martin Sebor  <msebor@redhat.com>
 
 	PR c/77520
@@ -100,11 +93,6 @@ 
 
 2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
 
-	PR fortran/77420
-	* gfortran.dg/pr77420.f90: New test.
-
-2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
-
 	PR fortran/77506
 	* gfortran.dg/pr77506.f90: New test.
 
Index: gcc/testsuite/gfortran.dg/pr77420.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr77420.f90	(revision 240117)
+++ gcc/testsuite/gfortran.dg/pr77420.f90	(nonexistent)
@@ -1,18 +0,0 @@ 
-! { dg-do compile }
-MODULE test_equivalence
-  REAL, PRIVATE, DIMENSION(100) :: array1
-  REAL, PRIVATE, DIMENSION(100) :: array2
-  EQUIVALENCE(array1(1),array2(1))
-END MODULE test_equivalence
-
-MODULE mymodule
-  USE test_equivalence
-  ! declare a local variable with the same name as the (private!)
-  ! variable in module test_equivalence:
-  REAL, DIMENSION(:), ALLOCATABLE :: array1
-END MODULE mymodule
-
-PROGRAM test
-  USE mymodule
-END PROGRAM test
-