diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/stmt.c | 3 |
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. @@ -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 |