[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #17 from nathan at gcc dot gnu dot org 2005-10-19 12:50 --- fix for 4.0 2005-10-19 Nathan Sidwell <[EMAIL PROTECTED]> PR c++/22551 * typeck2.c (digest_init): Clear overflow flags on the folded initializer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #16 from cvs-commit at gcc dot gnu dot org 2005-10-19 12:48 --- Subject: Bug 22551 CVSROOT:/cvs/gcc Module name:gcc Branch: gcc-4_0-branch Changes by: [EMAIL PROTECTED] 2005-10-19 12:48:03 Modified files: gcc/cp : ChangeLog typeck2.c Log message: PR c++/22551 * typeck2.c (digest_init): Clear overflow flags on the folded initializer. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.147&r2=1.4648.2.148 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.182.8.1&r2=1.182.8.2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #15 from cvs-commit at gcc dot gnu dot org 2005-10-17 13:57 --- Subject: Bug 22551 CVSROOT:/cvs/gcc Module name:gcc Branch: gcc-4_0-branch Changes by: [EMAIL PROTECTED] 2005-10-17 13:57:37 Modified files: gcc: ChangeLog c-common.c gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/other: switch2.C Log message: .: PR c++/22551 * c-common.c (c_add_case_label): Revert my 2005-10-14 clearing of overflow flags. testsuite: PR c++/22551 * g++.dg/other/switch2.C: Remove expected warnings. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.467&r2=2.7592.2.468 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.606.2.9&r2=1.606.2.10 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.462&r2=1.5084.2.463 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/switch2.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1.2.1&r2=1.1.2.2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #14 from nathan at gcc dot gnu dot org 2005-10-17 13:57 --- refixed 2005-10-17 Nathan Sidwell <[EMAIL PROTECTED]> PR c++/22551 * c-common.c (c_add_case_label): Revert my 2005-10-14 clearing of overflow flags. 2005-10-17 Nathan Sidwell <[EMAIL PROTECTED]> PR c++/22551 * g++.dg/other/switch2.C: Remove expected warnings. -- nathan at gcc dot gnu dot org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #13 from cvs-commit at gcc dot gnu dot org 2005-10-17 13:54 --- Subject: Bug 22551 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-10-17 13:54:34 Modified files: gcc: ChangeLog c-common.c gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/other: switch2.C Log message: .: PR c++/22551 * c-common.c (c_add_case_label): Revert my 2005-10-14 clearing of overflow flags. testsuite: PR c++/22551 * g++.dg/other/switch2.C: Remove expected warnings. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10172&r2=2.10173 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.656&r2=1.657 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6203&r2=1.6204 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/switch2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #12 from nathan at gcc dot gnu dot org 2005-10-17 08:36 --- the overflow happens in the static constant assignment 'int b = 0x8000' assigns an unsigned long to an int, and overflows. The int_cst as b's DCL_INITIAL has the overflow flag set. I rejected clearing the overflow flag at that point, because I was worried about other overflow paths on the case label expression (although I failed to excite any). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #11 from mmitchel at gcc dot gnu dot org 2005-10-16 22:06 --- The new switch2.C test is failing for me. In fact, I'm not sure why we should see overflow warnings on these expressions; isn't "0x8000" INT_MIN? In that case, INT_MIN + 1 does not overflow, does it? The C front end in GCC 3.4.x does not warn about the equivalent C program. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #10 from nathan at gcc dot gnu dot org 2005-10-16 09:02 --- something is not quite right ... -- nathan at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #9 from cvs-commit at gcc dot gnu dot org 2005-10-14 13:00 --- Subject: Bug 22551 CVSROOT:/cvs/gcc Module name:gcc Branch: gcc-4_0-branch Changes by: [EMAIL PROTECTED] 2005-10-14 13:00:38 Modified files: gcc: ChangeLog c-common.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/other: switch2.C Log message: .: PR c++/22551 * c-common.c (c_add_case_label): Clear LOW_VALUE and HIGH_VALUE's overflow flags. Refactor some conditionals. testsuite: PR c++/22551 * g++.dg/other/switch2.C: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.464&r2=2.7592.2.465 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.606.2.8&r2=1.606.2.9 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.455&r2=1.5084.2.456 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/switch2.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #8 from nathan at gcc dot gnu dot org 2005-10-14 13:00 --- fixed mainline and 4.0 2005-10-14 Nathan Sidwell <[EMAIL PROTECTED]> PR c++/22551 * c-common.c (c_add_case_label): Clear LOW_VALUE and HIGH_VALUE's overflow flags. Refactor some conditionals. -- nathan at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Comment #7 from cvs-commit at gcc dot gnu dot org 2005-10-14 12:55 --- Subject: Bug 22551 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-10-14 12:55:33 Modified files: gcc: ChangeLog c-common.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/other: switch2.C Log message: .: PR c++/22551 * c-common.c (c_add_case_label): Clear LOW_VALUE and HIGH_VALUE's overflow flags. Refactor some conditionals. testsuite: PR c++/22551 * g++.dg/other/switch2.C: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10156&r2=2.10157 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.655&r2=1.656 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6190&r2=1.6191 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/switch2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
-- nathan at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-07-18 17:27:27 |2005-10-13 11:52:39 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
-- What|Removed |Added Target Milestone|4.0.2 |4.0.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-12 20:48 --- : Search converges between 2004-08-05-trunk (#505) and 2004-08-06-trunk (#506). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-10 03:17 --- I think the front-end is not remarking the INTEGER_CST's TREE_OVERFLOW to be zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-18 18:05 --- If you add -pedantic and compile your example, you will see that we error out instead of accepting the code. You might want to use unsigned instead of signed as signed overflow is undefined. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Additional Comments From emailwastefilter-bugzillagccorg at yahoo dot com 2005-07-18 18:03 --- (In reply to comment #2) > Hmm, 0x8000+1 overflows which is invalid for constant expressions and really should be > rejected. The warnings seem on the money, but they should not cause the compiler to crash, right? The original code used 0xFFFE in place of 0x8000 and had around 26 warning messages before it crashed. If there are only 4 warning messages, then the compiler completes without crashing. Starting with 0x8000 - 2 lets the compiler complete, as does commenting out one of the case statements. Several obivous ways around this code are to use an enum, an unsigned int, or an if-else if cascasde. These all result in no warnings, the first two justly, the last I'm not so sure. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-18 17:27 --- Hmm, 0x8000+1 overflows which is invalid for constant expressions and really should be rejected. -- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-07-18 17:27:27 date|| Summary|[ICE] in tree_low_cst, at |[4.0/4.1 Regression] [ICE] |tree.c:3843 |in tree_low_cst, at ||tree.c:3843 Target Milestone|--- |4.0.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551