public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels
@ 2004-11-15 3:22 fn_x at hotmail dot com
2004-11-15 3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: fn_x at hotmail dot com @ 2004-11-15 3:22 UTC (permalink / raw)
To: gcc-bugs
Hi,
int main() {
goto bug;
switch(0) {
bug: return 0;
}
}
This program doesn't compile with gcc 3.4.3. It gives this error message:
/tmp/ccetXBGt.o(.text+0x1d): In function `main':
: undefined reference to `.L2'
However, this:
int main() {
goto bug;
switch(0) {
bug: return 0;
default: ;
}
}
does compile without a problem.
gcc 2.95.3 and 3.3.4 compile both examples.
I searched to see if anyone else reported this, and only found bug #17078. I
don't know if it's related or just similar. Sorry if I overlooked another bug
report.
--
Summary: gcc doesn't like switch blocks without case/default
labels
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fn_x at hotmail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
@ 2004-11-15 3:30 ` pinskia at gcc dot gnu dot org
2004-11-27 18:40 ` roger at eyesopen dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-15 3:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-15 03:29 -------
Confirmed only effects the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c |middle-end
Ever Confirmed| |1
Keywords| |wrong-code
Known to fail| |3.4.0
Known to work| |3.3.3 4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2004-11-15 03:29:58
date| |
Summary|gcc doesn't like switch |[3.4 Regression] gcc doesn't
|blocks without case/default |like switch blocks without
|labels |case/default labels
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
2004-11-15 3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-27 18:40 ` roger at eyesopen dot com
2004-12-14 9:02 ` ebotcazou at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: roger at eyesopen dot com @ 2004-11-27 18:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From roger at eyesopen dot com 2004-11-27 18:40 -------
Patch here http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02309.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
2004-11-15 3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-11-27 18:40 ` roger at eyesopen dot com
@ 2004-12-14 9:02 ` ebotcazou at gcc dot gnu dot org
2004-12-16 14:43 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-14 9:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-14 09:01 -------
Assigning to Roger since he posted a patch.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |sayle at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
` (2 preceding siblings ...)
2004-12-14 9:02 ` ebotcazou at gcc dot gnu dot org
@ 2004-12-16 14:43 ` cvs-commit at gcc dot gnu dot org
2004-12-16 16:25 ` pinskia at gcc dot gnu dot org
2004-12-16 17:52 ` 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-16 14:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-16 14:43 -------
Subject: Bug 18493
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: sayle@gcc.gnu.org 2004-12-16 14:42:50
Modified files:
gcc : ChangeLog c-typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: switch-4.c
Log message:
PR middle-end/18493
* c-typeck.c (c_finish_case): Rechain statements if we didn't
encounter any case labels or a default.
* gcc.dg/switch-4.c: New test case.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.744&r2=2.2326.2.745
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.272.2.10&r2=1.272.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.328&r2=1.3389.2.329
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/switch-4.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.22.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
` (3 preceding siblings ...)
2004-12-16 14:43 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-16 16:25 ` pinskia at gcc dot gnu dot org
2004-12-16 17:52 ` cvs-commit at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-16 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-16 16:25 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/18493] [3.4 Regression] gcc doesn't like switch blocks without case/default labels
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
` (4 preceding siblings ...)
2004-12-16 16:25 ` pinskia at gcc dot gnu dot org
@ 2004-12-16 17:52 ` 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-16 17:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-16 17:52 -------
Subject: Bug 18493
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2004-12-16 17:52:02
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: switch-8.c
Log message:
PR middle-end/18493
* gcc.dg/switch-8.c: New test case.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4769&r2=1.4770
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/switch-8.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18493
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-12-16 17:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15 3:22 [Bug c/18493] New: gcc doesn't like switch blocks without case/default labels fn_x at hotmail dot com
2004-11-15 3:30 ` [Bug middle-end/18493] [3.4 Regression] " pinskia at gcc dot gnu dot org
2004-11-27 18:40 ` roger at eyesopen dot com
2004-12-14 9:02 ` ebotcazou at gcc dot gnu dot org
2004-12-16 14:43 ` cvs-commit at gcc dot gnu dot org
2004-12-16 16:25 ` pinskia at gcc dot gnu dot org
2004-12-16 17:52 ` 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).