* fold-const.c (make_range): Don't try to reverse an unbounded range.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 4 Jan 2000 08:36:51 +0000 (08:36 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 4 Jan 2000 08:36:51 +0000 (01:36 -0700)
From-SVN: r31197

gcc/ChangeLog
gcc/fold-const.c

index fe4c381fba8cda3c9848ba8c273a57c176155196..3d0561133b6bc5cc9ba46f1d3cccdc973a75e8f0 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jan  4 01:35:13 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * fold-const.c (make_range): Don't try to reverse an unbounded range.
+
 Tue Jan  4 00:18:46 2000  Jeffrey A Law  (law@cygnus.com)
 
        * regclass.c (regclass): Properly compute loop_cost.  Adjust
index 8f94161d8252b883ea1fe61cc2307db18ccc9e86..c540b19214c894397ab906d2c27f3afee2b14595 100644 (file)
@@ -1,5 +1,5 @@
 /* Fold a constant sub-tree into a single node for C-compiler
-   Copyright (C) 1987, 88, 92-98, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 92-98, 1999, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -3315,9 +3315,10 @@ make_range (exp, pin_p, plow, phigh)
 
              in_p = n_in_p, low = n_low, high = n_high;
 
-             /* If the high bound is missing, reverse the range so it
-                goes from zero to the low bound minus 1.  */
-             if (high == 0)
+             /* If the high bound is missing, but we
+                have a low bound, reverse the range so
+                it goes from zero to the low bound minus 1.  */
+             if (high == 0 && low)
                {
                  in_p = ! in_p;
                  high = range_binop (MINUS_EXPR, NULL_TREE, low, 0,