diff options
author | fx <fx@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-12 04:47:46 +0000 |
---|---|---|
committer | fx <fx@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-12 04:47:46 +0000 |
commit | 510f82f009e2c5dcfeb59aa3c327fbf8b6dec5a5 (patch) | |
tree | 8459a0992553b4f04e533adb4a7d374674bf0843 /gcc/f/equiv.c | |
parent | 9aa419c7032c5e691e301dca209c87441cb58d7a (diff) | |
download | gcc-510f82f009e2c5dcfeb59aa3c327fbf8b6dec5a5.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f/equiv.c')
-rw-r--r-- | gcc/f/equiv.c | 19 |
1 files changed, 18 insertions, 1 deletions
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); |