From: Craig Burley Date: Sun, 12 Jul 1998 04:47:46 +0000 (-0400) Subject: Fix 980616-0.f: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fe911f597208c0e51ff6081cd380badc3689e79;p=gcc.git Fix 980616-0.f: Sat Jul 11 19:24:32 1998 Craig Burley Fix 980616-0.f: * equiv.c (ffeequiv_offset_): Don't crash on various possible ANY operands. From-SVN: r21079 --- diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 16be6911f25..fad88e680af 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,9 @@ +Sat Jul 11 19:24:32 1998 Craig Burley + + 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 * com.c (ffecom_expr_) [FFEBLD_opCONTER]: Die if padding diff --git a/gcc/f/equiv.c b/gcc/f/equiv.c index 8c0975128c1..a9de49d1512 100644 --- a/gcc/f/equiv.c +++ b/gcc/f/equiv.c @@ -1,5 +1,5 @@ /* 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);