diff options
author | Craig Burley <burley@gnu.org> | 1998-07-12 00:47:46 -0400 |
---|---|---|
committer | Dave Love <fx@gcc.gnu.org> | 1998-07-12 04:47:46 +0000 |
commit | 4fe911f597208c0e51ff6081cd380badc3689e79 (patch) | |
tree | 8459a0992553b4f04e533adb4a7d374674bf0843 | |
parent | c264f1132eff86fec981bbbbfe2527663b82e941 (diff) | |
download | gcc-4fe911f597208c0e51ff6081cd380badc3689e79.zip gcc-4fe911f597208c0e51ff6081cd380badc3689e79.tar.gz gcc-4fe911f597208c0e51ff6081cd380badc3689e79.tar.bz2 |
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
-rw-r--r-- | gcc/f/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/f/equiv.c | 19 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 16be691..fad88e6 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/f/equiv.c b/gcc/f/equiv.c index 8c09751..a9de49d 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); |