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/88228 -- ICE with -fdec and logical op on integers


I committed attached patch to trunk, branch-8, and branch-7.

2018-12-09  Fritz Reese  <fritzoreese@gmail.com>

	PR fortran/88228
	* resolve.c (resolve_operator):  Do not call resolve_function.
	Break like other cases.

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

	PR fortran/88228
	* gfortran.dg/pr88228.f90: New test.

-- 
Steve
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 266925)
+++ gcc/fortran/resolve.c	(working copy)
@@ -4004,7 +4004,7 @@ resolve_operator (gfc_expr *e)
 	  if (op2->ts.type != e->ts.type || op2->ts.kind != e->ts.kind)
 	    gfc_convert_type (op2, &e->ts, 1);
 	  e = logical_to_bitwise (e);
-	  return resolve_function (e);
+	  break;
 	}
 
       sprintf (msg, _("Operands of logical operator %%<%s%%> at %%L are %s/%s"),
@@ -4020,7 +4020,7 @@ resolve_operator (gfc_expr *e)
 	  e->ts.type = BT_INTEGER;
 	  e->ts.kind = op1->ts.kind;
 	  e = logical_to_bitwise (e);
-	  return resolve_function (e);
+	  break;
 	}
 
       if (op1->ts.type == BT_LOGICAL)
Index: gcc/testsuite/gfortran.dg/pr88228.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr88228.f90	(nonexistent)
+++ gcc/testsuite/gfortran.dg/pr88228.f90	(working copy)
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! { dg-options "-fdec" }
+! PR fortran/88228
+program p
+   integer :: n = .not. 1
+   integer :: j = .true. .or. 1
+end
+

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