public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity
@ 2004-12-07 11:34 belyshev at lubercy dot com
2004-12-07 11:35 ` [Bug c/18867] " belyshev at lubercy dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: belyshev at lubercy dot com @ 2004-12-07 11:34 UTC (permalink / raw)
To: gcc-bugs
current mainline crashes on this invalid code:
----------------------------------------------------------------------------------------
void f()
{
float x;
switch (x) {case 0: break;};
}
----------------------------------------------------------------------------------------
bug.c: In function `f':
bug.c:4: error: switch quantity not an integer
bug.c:4: internal compiler error: Segmentation fault
: Search converges between 2004-07-20-trunk (#491) and 2004-07-21-trunk (#492).
--
Summary: [4.0 Regression] ICE on invalid switch quantity
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at lubercy dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
@ 2004-12-07 11:35 ` belyshev at lubercy dot com
2004-12-07 12:57 ` steven at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: belyshev at lubercy dot com @ 2004-12-07 11:35 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.0
Known to work| |3.4.4
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
2004-12-07 11:35 ` [Bug c/18867] " belyshev at lubercy dot com
@ 2004-12-07 12:57 ` steven at gcc dot gnu dot org
2004-12-07 13:05 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07 12:57 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
2004-12-07 11:35 ` [Bug c/18867] " belyshev at lubercy dot com
2004-12-07 12:57 ` steven at gcc dot gnu dot org
@ 2004-12-07 13:05 ` steven at gcc dot gnu dot org
2004-12-08 0:12 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07 13:05 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
` (2 preceding siblings ...)
2004-12-07 13:05 ` steven at gcc dot gnu dot org
@ 2004-12-08 0:12 ` cvs-commit at gcc dot gnu dot org
2004-12-08 0:15 ` steven at gcc dot gnu dot org
2004-12-08 7:41 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-08 0:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-08 00:12 -------
Subject: Bug 18867
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: steven@gcc.gnu.org 2004-12-08 00:12:06
Modified files:
gcc : c-typeck.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/noncompile: 20041207.c
Log message:
PR c/18867
* c-typeck.c (c_start_case): Set orig_type to error_mark_node
when the type of the controlling expression is not a valid type.
testsuite/
* gcc.dg/noncompile/20041207.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.402&r2=1.403
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6738&r2=2.6739
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/noncompile/20041207.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4719&r2=1.4720
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
` (3 preceding siblings ...)
2004-12-08 0:12 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-08 0:15 ` steven at gcc dot gnu dot org
2004-12-08 7:41 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-08 0:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-08 00:15 -------
.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/18867] [4.0 Regression] ICE on invalid switch quantity
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
` (4 preceding siblings ...)
2004-12-08 0:15 ` steven at gcc dot gnu dot org
@ 2004-12-08 7:41 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-08 7:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-08 07:41 -------
Subject: Bug 18867
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: hp@gcc.gnu.org 2004-12-08 07:41:32
Modified files:
gcc/testsuite : ChangeLog
gcc/testsuite/gcc.dg/noncompile: 20041207.c
Log message:
PR c/18867
* gcc.dg/noncompile/20041207.c: Fix typo in dg directive.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4720&r2=1.4721
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/noncompile/20041207.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18867
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-12-08 7:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-07 11:34 [Bug c/18867] New: [4.0 Regression] ICE on invalid switch quantity belyshev at lubercy dot com
2004-12-07 11:35 ` [Bug c/18867] " belyshev at lubercy dot com
2004-12-07 12:57 ` steven at gcc dot gnu dot org
2004-12-07 13:05 ` steven at gcc dot gnu dot org
2004-12-08 0:12 ` cvs-commit at gcc dot gnu dot org
2004-12-08 0:15 ` steven at gcc dot gnu dot org
2004-12-08 7:41 ` cvs-commit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).