Bug 81341 - trunk/gcc/fortran/class.c:313: redundant condition ?
Summary: trunk/gcc/fortran/class.c:313: redundant condition ?
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: ---
Assignee: Dominique d'Humieres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 16:52 UTC by David Binderman
Modified: 2017-07-09 17:46 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-07-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2017-07-06 16:52:02 UTC
trunk/gcc/fortran/class.c:313] -> [trunk/gcc/fortran/class.c:310]: (style) Same expression on both sides of '&&'.

      else if (ref->next && ref->next->type == REF_ARRAY
            && !ref->next->next
            && ref->type == REF_COMPONENT
            && ref->next->type == REF_ARRAY
            && ref->next->u.ar.type != AR_ELEMENT)
Comment 1 Dominique d'Humieres 2017-07-08 10:26:53 UTC
Testing the obvious fix

--- ../_clean/gcc/fortran/class.c	2017-04-14 23:53:52.000000000 +0200
+++ gcc/fortran/class.c	2017-07-08 12:25:51.000000000 +0200
@@ -310,7 +310,6 @@ class_array_ref_detected (gfc_ref *ref, 
       else if (ref->next && ref->next->type == REF_ARRAY
 	    && !ref->next->next
 	    && ref->type == REF_COMPONENT
-	    && ref->next->type == REF_ARRAY
 	    && ref->next->u.ar.type != AR_ELEMENT)
 	{
 	  with_data = true;
Comment 2 dominiq 2017-07-09 17:42:17 UTC
Author: dominiq
Date: Sun Jul  9 17:41:45 2017
New Revision: 250083

URL: https://gcc.gnu.org/viewcvs?rev=250083&root=gcc&view=rev
Log:
2017-07-09  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/81341
	* class.c (class_array_ref_detected): Remove a redundant
	condition.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/class.c
Comment 3 Dominique d'Humieres 2017-07-09 17:46:42 UTC
Closing as FIXED.