Fix 980616-0.f:
authorCraig Burley <burley@gnu.org>
Sun, 12 Jul 1998 04:47:46 +0000 (00:47 -0400)
committerDave Love <fx@gcc.gnu.org>
Sun, 12 Jul 1998 04:47:46 +0000 (04:47 +0000)
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

gcc/f/ChangeLog
gcc/f/equiv.c

index 16be6911f25696783397b8b1766a35a7b3131c61..fad88e680aff60f30f60cd85f51de1957c2c26ca 100644 (file)
@@ -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
index 8c0975128c19488e57afa2e9777a5e3a135c18ff..a9de49d15120419bc2e4cb7de118b054339f0113 100644 (file)
@@ -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);