Commit 4fe911f5 by Craig Burley Committed by Dave Love

Fix 980616-0.f:

Sat Jul 11 19:24:32 1998  Craig Burley  <burley@gnu.org>
	Fix 980616-0.f:
	* equiv.c (ffeequiv_offset_): Don't crash on various
	possible ANY operands.

From-SVN: r21079
parent c264f113
Sat Jul 11 19:24:32 1998 Craig Burley <burley@gnu.org>
Fix 980616-0.f:
* equiv.c (ffeequiv_offset_): Don't crash on various
possible ANY operands.
Sat Jul 11 18:24:37 1998 Craig Burley <burley@gnu.org>
* com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding
......
/* equiv.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995-1997 Free Software Foundation, Inc.
Copyright (C) 1995-1998 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.org).
This file is part of GNU Fortran.
......@@ -698,6 +698,9 @@ again: /* :::::::::::::::::::: */
subscript = ffebld_head (subscripts);
dim = ffebld_head (dims);
if (ffebld_op (subscript) == FFEBLD_opANY)
return FALSE;
assert (ffebld_op (subscript) == FFEBLD_opCONTER);
assert (ffeinfo_basictype (ffebld_info (subscript))
== FFEINFO_basictypeINTEGER);
......@@ -706,6 +709,9 @@ again: /* :::::::::::::::::::: */
arrayval = ffebld_constant_integerdefault (ffebld_conter
(subscript));
if (ffebld_op (dim) == FFEBLD_opANY)
return FALSE;
assert (ffebld_op (dim) == FFEBLD_opBOUNDS);
low = ffebld_left (dim);
high = ffebld_right (dim);
......@@ -714,6 +720,10 @@ again: /* :::::::::::::::::::: */
lowbound = 1;
else
{
if (ffebld_op (low) == FFEBLD_opANY)
return FALSE;
assert (ffebld_op (low) == FFEBLD_opCONTER);
assert (ffeinfo_basictype (ffebld_info (low))
== FFEINFO_basictypeINTEGER);
assert (ffeinfo_kindtype (ffebld_info (low))
......@@ -722,6 +732,9 @@ again: /* :::::::::::::::::::: */
= ffebld_constant_integerdefault (ffebld_conter (low));
}
if (ffebld_op (high) == FFEBLD_opANY)
return FALSE;
assert (ffebld_op (high) == FFEBLD_opCONTER);
assert (ffeinfo_basictype (ffebld_info (high))
== FFEINFO_basictypeINTEGER);
......@@ -766,6 +779,8 @@ again: /* :::::::::::::::::::: */
ffebld begin = ffebld_head (ffebld_right (expr));
expr = ffebld_left (expr);
if (ffebld_op (expr) == FFEBLD_opANY)
return FALSE;
if (ffebld_op (expr) == FFEBLD_opARRAYREF)
sym = ffebld_symter (ffebld_left (expr));
else if (ffebld_op (expr) == FFEBLD_opSYMTER)
......@@ -781,6 +796,8 @@ again: /* :::::::::::::::::::: */
value = 0;
else
{
if (ffebld_op (begin) == FFEBLD_opANY)
return FALSE;
assert (ffebld_op (begin) == FFEBLD_opCONTER);
assert (ffeinfo_basictype (ffebld_info (begin))
== FFEINFO_basictypeINTEGER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment