aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>2000-03-13 19:35:38 +0000
committerBernd Schmidt <crux@gcc.gnu.org>2000-03-13 19:35:38 +0000
commitf0c988c8238ee6c46c86200cda553592c97a6679 (patch)
tree3856ea30946d782b083a8d40bdc068ea5162f840 /gcc
parent93ca4ba7663487de66e5aff1dc46722079f84e4d (diff)
downloadgcc-f0c988c8238ee6c46c86200cda553592c97a6679.zip
gcc-f0c988c8238ee6c46c86200cda553592c97a6679.tar.gz
gcc-f0c988c8238ee6c46c86200cda553592c97a6679.tar.bz2
Fix recently introduced error in expand_end_case.
From-SVN: r32511
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stmt.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a6faefc..1589abd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-13 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * stmt.c (expand_end_case): RANGE may be signed, and when checking
+ whether it is too large we must also verify that it isn't negative.
+
2000-03-13 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md: Remove all traces of TARGET_LIVE_G0.
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 9be159d..e919cd2 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -5402,6 +5402,9 @@ expand_end_case (orig_index)
else if (count < CASE_VALUES_THRESHOLD
|| compare_tree_int (range, 10 * count) > 0
+ /* RANGE may be signed, and really large ranges will show up
+ as negative numbers. */
+ || compare_tree_int (range, 0) < 0
#ifndef ASM_OUTPUT_ADDR_DIFF_ELT
|| flag_pic
#endif