This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] PR fortran/88228 -- ICE with -fdec and logical op on integers
- 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: Sun, 9 Dec 2018 10:35:47 -0800
- Subject: [Committed] PR fortran/88228 -- ICE with -fdec and logical op on integers
- Reply-to: sgk at troutmask dot apl dot washington dot edu
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
+