This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2004 13:05:17 -0000
- Subject: [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
- References: <20041207113435.18867.belyshev@lubercy.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-07 13:05 -------
Test this:
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.589
diff -u -p -r1.589 c-common.c
--- c-common.c 29 Nov 2004 23:11:23 -0000 1.589
+++ c-common.c 7 Dec 2004 13:04:57 -0000
@@ -1467,7 +1467,7 @@ check_case_bounds (tree type, tree orig_
tree case_high = case_high_p ? *case_high_p : case_low;
/* If there was a problem with the original type, do nothing. */
- if (orig_type == error_mark_node)
+ if (! INTEGRAL_TYPE_P (orig_type))
return true;
min_value = TYPE_MIN_VALUE (orig_type);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867