public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17657] New: ICE in expand_case
@ 2004-09-24 16:19 jakub at gcc dot gnu dot org
2004-09-24 16:22 ` [Bug c++/17657] " arjanv at redhat dot com
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-09-24 16:19 UTC (permalink / raw)
To: gcc-bugs
// { dg-do compile }
// { dg-options "-O2" }
extern int foo (int);
void
bar (void)
{
char tmp = foo (0);
switch (tmp)
{
case 1: foo (1); break;
case 2: foo (2); break;
case 3: foo (3); break;
case 4: foo (4); break;
case 5: foo (5); break;
case 6: foo (6); break;
case 7: foo (7); break;
case 255: foo (8); break;
default: break;
}
}
ICEs at -O2 while it works with GCC 3.4.2. The ICE is in expand_case which
calls tree_low_cst on !host_integerp () INTEGER_CST.
In C this generates warning, but compiles it without ICEing.
--
Summary: ICE in expand_case
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/17657] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
@ 2004-09-24 16:22 ` arjanv at redhat dot com
2004-09-24 17:19 ` [Bug middle-end/17657] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: arjanv at redhat dot com @ 2004-09-24 16:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |arjanv at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
2004-09-24 16:22 ` [Bug c++/17657] " arjanv at redhat dot com
@ 2004-09-24 17:19 ` pinskia at gcc dot gnu dot org
2004-09-24 17:28 ` [Bug middle-end/17657] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-24 17:19 -------
Hmm, I thought I filed one like this before.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|c++ |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
2004-09-24 16:22 ` [Bug c++/17657] " arjanv at redhat dot com
2004-09-24 17:19 ` [Bug middle-end/17657] " pinskia at gcc dot gnu dot org
@ 2004-09-24 17:28 ` pinskia at gcc dot gnu dot org
2004-10-04 4:07 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 17:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-24 17:27 -------
: Search converges between 2004-09-12-trunk (#538) and 2004-09-14-trunk (#539).
Confirmed, this is a recent regression.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-09-24 17:27:59
date| |
Summary|ICE in expand_case |[4.0 Regression] ICE in
| |expand_case
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-09-24 17:28 ` [Bug middle-end/17657] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-10-04 4:07 ` pinskia at gcc dot gnu dot org
2004-10-04 4:15 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 4:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 04:07 -------
This was caused by:
PR c++/16254
* fold-const.c (fold) <case CLEANUP_POINT_EXPR>: Remove.
* tree.c, tree.h (has_cleanups): Remove.
cp/
* semantics.c (maybe_cleanup_point_expr): Don't call fold.
* typeck.c (condition_conversion): Likewise.
Because we don't unwrap the cleanup_point_expr from the cond of the switch statement, so we don't
remove the extra cast. Which causes us not to add the case 255.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-04 4:07 ` pinskia at gcc dot gnu dot org
@ 2004-10-04 4:15 ` pinskia at gcc dot gnu dot org
2004-10-04 8:43 ` steven at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 4:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 04:15 -------
But that does not matter because I can reproduce the failure with both the C and C++ front-end with:
extern int foo (int);
void
bar (void)
{
signed char tmp = foo (0);
int t1 = tmp;
switch (t1)
{
case 1: foo (1); break;
case 2: foo (2); break;
case 3: foo (3); break;
case 4: foo (4); break;
case 5: foo (5); break;
case 6: foo (6); break;
case 7: foo (7); break;
case 255: foo (8); break;
default: break;
}
}
: Search converges between 2004-07-20-trunk (#491) and 2004-07-21-trunk (#492).
Which was caused by:
2004-07-20 Steven Bosscher <stevenb@suse.de>
* c-common.h (check_case_value): Remove prototype.
(c_add_case_label): Adjust prototype.
* c-common.c (check_case_value): Make static.
(check_case_bounds): New function.
(c_add_case_label): Use it. Take new argument orig_type.
* c-typeck.c (struct c_switch): New orig_type field.
(c_start_case): Set it.
(do_case): Pass it to c_add_case_label.
* expr.c (expand_expr_real_1): Don't warn for out-of-bounds
cases from here. Add the labels in reverse order.
* stmt.c (struct case_node): Adjust comment. Remove balance field.
(add_case_node): Return nothing, don't check for duplicate cases.
Insert new case nodes in a list, not in an AVL tree.
(expand_end_case_type): Don't turn a case tree into a case list.
(case_tree2list): Remove.
* tree.h (add_case_node): Adjust prototype.
Steven you remove the code to reject the case statements which was importrant for the testcase above
and now the C++ testcase, could you fix this?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-04 4:15 ` pinskia at gcc dot gnu dot org
@ 2004-10-04 8:43 ` steven at gcc dot gnu dot org
2004-10-06 13:12 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-10-04 8:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-10-04 08:43 -------
What surprises me is that the tree that is passed to expand_case is,
switch ((signed charD.9) D.1481)
{
case 1: goto <L0>;
case 2: goto <L1>;
case 3: goto <L2>;
case 4: goto <L3>;
case 5: goto <L4>;
case 6: goto <L5>;
case 7: goto <L6>;
case 255: goto <L7>;
default : goto <L8>;
}
so somewhere we decided to replace the int t1 with a signed char case
condition, and yes, 255 doesn't fit in a signed char so this replacement
doesn't look right either.
Hmm...
--
What |Removed |Added
----------------------------------------------------------------------------
CC|steven at gcc dot gnu dot |
|org |
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-04 8:43 ` steven at gcc dot gnu dot org
@ 2004-10-06 13:12 ` pinskia at gcc dot gnu dot org
2004-10-06 13:24 ` stevenb at suse dot de
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-06 13:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-06 13:12 -------
Here is another example except we will not have a cast at all when it comes to expand time:
extern signed char foo (int);
void
bar (void)
{
signed char tmp = foo (0);
int t1 = tmp;
switch (t1)
{
case 1: foo (1); break;
case 2: foo (2); break;
case 3: foo (3); break;
case 4: foo (4); break;
case 5: foo (5); break;
case 6: foo (6); break;
case 7: foo (7); break;
case 255: foo (8); break;
default: break;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-06 13:12 ` pinskia at gcc dot gnu dot org
@ 2004-10-06 13:24 ` stevenb at suse dot de
2004-10-06 13:26 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: stevenb at suse dot de @ 2004-10-06 13:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From stevenb at suse dot de 2004-10-06 13:24 -------
Subject: Re: [4.0 Regression] ICE in expand_case
> void
> bar (void)
> {
> signed char tmp = foo (0);
> int t1 = tmp;
> switch (t1)
The problem is not the cast, but the fact that here in the source
t1 is an int so the case 255 can match, but somewhere along the
way the switch condition is turned into a signed int.
I claim that is an invalid transformation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-06 13:24 ` stevenb at suse dot de
@ 2004-10-06 13:26 ` pinskia at gcc dot gnu dot org
2004-10-09 18:22 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-06 13:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-06 13:26 -------
The patch for the C++ part is here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00491.html>,
but the middle-end still has the problem see comments #4 and #6.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-06 13:26 ` pinskia at gcc dot gnu dot org
@ 2004-10-09 18:22 ` pinskia at gcc dot gnu dot org
2004-10-11 3:42 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-09 18:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-09 18:22 -------
Newest patch for the C++ problem here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/
msg00832.html>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-10-09 18:22 ` pinskia at gcc dot gnu dot org
@ 2004-10-11 3:42 ` pinskia at gcc dot gnu dot org
2004-10-11 3:42 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-11 3:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-11 03:42 -------
Subject: Bug 17657
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-11 03:42:09
Modified files:
gcc : ChangeLog fold-const.c tree.h
gcc/cp : ChangeLog semantics.c typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: for3.C
gcc/testsuite/g++.dg/opt: switch2.C
gcc/testsuite/g++.dg/warn: Wreturn-2.C
Log message:
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17554
part of c++/17657
middle-end/17703
* semantics.c (maybe_cleanup_point_expr): Call
fold_build_cleanup_point_expr.
(maybe_cleanup_point_expr_void): New function.
(add_decl_expr): Call maybe_cleanup_point_expr_void.
(finish_expr_stmt): Likewise.
(finish_return_stmt): Likewise.
(finish_for_expr): Likewise.
(finish_asm_stmt): Likewise.
* typeck.c (condition_conversion): Call
fold_build_cleanup_point_expr.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17703
part of PR c++/17657
* fold-const.c (fold_build_cleanup_point_expr): New function.
* tree.h (fold_build_cleanup_point_expr): Prototype.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17554
* g++.dg/init/for3.C: New test.
PR c++/17657
* g++.dg/opt/switch2.C: New test.
PR middle-end/17703
* g++.dg/warn/Wreturn-2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5829&r2=2.5830
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.467&r2=1.468
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.636&r2=1.637
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4420&r2=1.4421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.444&r2=1.445
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.581&r2=1.582
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4432&r2=1.4433
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/for3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/switch2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wreturn-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-11 03:42 -------
The orginal testcase is now fixed by the patch to the C++ front-end.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-10-11 3:42 ` pinskia at gcc dot gnu dot org
@ 2004-10-11 3:42 ` cvs-commit at gcc dot gnu dot org
2004-10-11 16:11 ` cvs-commit at gcc dot gnu dot org
2004-10-11 17:02 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-11 3:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-11 03:42 -------
Subject: Bug 17657
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-11 03:42:09
Modified files:
gcc : ChangeLog fold-const.c tree.h
gcc/cp : ChangeLog semantics.c typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: for3.C
gcc/testsuite/g++.dg/opt: switch2.C
gcc/testsuite/g++.dg/warn: Wreturn-2.C
Log message:
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17554
part of c++/17657
middle-end/17703
* semantics.c (maybe_cleanup_point_expr): Call
fold_build_cleanup_point_expr.
(maybe_cleanup_point_expr_void): New function.
(add_decl_expr): Call maybe_cleanup_point_expr_void.
(finish_expr_stmt): Likewise.
(finish_return_stmt): Likewise.
(finish_for_expr): Likewise.
(finish_asm_stmt): Likewise.
* typeck.c (condition_conversion): Call
fold_build_cleanup_point_expr.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17703
part of PR c++/17657
* fold-const.c (fold_build_cleanup_point_expr): New function.
* tree.h (fold_build_cleanup_point_expr): Prototype.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17554
* g++.dg/init/for3.C: New test.
PR c++/17657
* g++.dg/opt/switch2.C: New test.
PR middle-end/17703
* g++.dg/warn/Wreturn-2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5829&r2=2.5830
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.467&r2=1.468
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.636&r2=1.637
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4420&r2=1.4421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.444&r2=1.445
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.581&r2=1.582
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4432&r2=1.4433
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/for3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/switch2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wreturn-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-10-11 3:42 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-11 16:11 ` cvs-commit at gcc dot gnu dot org
2004-10-11 17:02 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-11 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-11 03:42 -------
The orginal testcase is now fixed by the patch to the C++ front-end.
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-11 16:11 -------
Subject: Bug 17657
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2004-10-11 16:11:37
Modified files:
gcc : ChangeLog stmt.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: switch-4.c
Log message:
PR middle-end/17657
* stmt.c (add_case_node): Add additional type argument. Declare
as static to match prototype. Convert the upper and lower bounds
to the specified index type. Optimize away case ranges/values
that are outside the index type's bounds. Truncate case ranges
that span the index type's bounds.
(expand_case): Avoid unnessary computation and memory allocation
when index type is error_mark_node. Pass index_type as required
by change to add_case_node API. No need to convert case range
bounds to index_type, this is now done by add_case_node.
* gcc.dg/switch-4.c: New test case.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5834&r2=2.5835
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stmt.c.diff?cvsroot=gcc&r1=1.397&r2=1.398
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4434&r2=1.4435
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/switch-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/17657] [4.0 Regression] ICE in expand_case
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-10-11 16:11 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-11 17:02 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-11 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-11 17:02 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17657
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-10-11 17:02 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 16:19 [Bug c++/17657] New: ICE in expand_case jakub at gcc dot gnu dot org
2004-09-24 16:22 ` [Bug c++/17657] " arjanv at redhat dot com
2004-09-24 17:19 ` [Bug middle-end/17657] " pinskia at gcc dot gnu dot org
2004-09-24 17:28 ` [Bug middle-end/17657] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-04 4:07 ` pinskia at gcc dot gnu dot org
2004-10-04 4:15 ` pinskia at gcc dot gnu dot org
2004-10-04 8:43 ` steven at gcc dot gnu dot org
2004-10-06 13:12 ` pinskia at gcc dot gnu dot org
2004-10-06 13:24 ` stevenb at suse dot de
2004-10-06 13:26 ` pinskia at gcc dot gnu dot org
2004-10-09 18:22 ` pinskia at gcc dot gnu dot org
2004-10-11 3:42 ` pinskia at gcc dot gnu dot org
2004-10-11 3:42 ` cvs-commit at gcc dot gnu dot org
2004-10-11 16:11 ` cvs-commit at gcc dot gnu dot org
2004-10-11 17:02 ` pinskia 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).