Summary: | [3.3 Regression] ICE after error about enum not being defined when using it as a bit field | ||
---|---|---|---|
Product: | gcc | Reporter: | Andrew Pinski <pinskia> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | gcc-bugs |
Priority: | P2 | Keywords: | error-recovery, ice-on-invalid-code |
Version: | 4.0.0 | ||
Target Milestone: | 3.3.4 | ||
Host: | Target: | ||
Build: | Known to work: | 2.95.3 3.4.0 4.0.0 | |
Known to fail: | 3.0.4 3.2.3 3.3.3 | Last reconfirmed: | 2004-03-08 14:57:55 |
Description
Andrew Pinski
2004-03-08 04:45:40 UTC
Forgot to say this is the ICE I get on the mainline: test5.c:3: error: use of enum `tree_code' without previous declaration test5.c:3: error: field `code' has incomplete type test5.c:2: internal compiler error: tree check: expected class 't', have 'x' (error_mark) in layout_class_type, at cp/class.c:4626 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Subject: Re: [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: | Forgot to say this is the ICE I get on the mainline: | test5.c:3: error: use of enum `tree_code' without previous declaration | test5.c:3: error: field `code' has incomplete type | test5.c:2: internal compiler error: tree check: expected class 't', have 'x' (error_mark) in | layout_class_type, at cp/class.c:4626 This is ICE caused by the compiler trying to be overly helpful in thinking that by recording "code" as member he would be able to "process more". It could just ignore "code" after issuing the error. -- Gaby Confirmed. We started ICEing in in or before 3.2.3, but it worked in 2.95. W. Subject: Bug 14476 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-03-11 08:37:03 Modified files: gcc/cp : ChangeLog decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/lookup: enum1.C Log message: PR c++/14476 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs. PR c++/14476 * g++.dg/lookup/enum1.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.80&r2=1.3892.2.81 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.13&r2=1.1174.2.14 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.138&r2=1.3389.2.139 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/enum1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.8.1 Subject: Bug 14476 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-03-11 08:40:08 Modified files: gcc/cp : decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/lookup: enum1.C Log message: PR c++/14476 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs. PR c++/14476 * g++.dg/lookup/enum1.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1194&r2=1.1195 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3594&r2=1.3595 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/enum1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 Fixed in GCC 3.4 and GCC 3.5. Subject: Bug 14476 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: gdr@gcc.gnu.org 2004-03-13 03:15:58 Modified files: gcc/cp : ChangeLog decl.c Added files: gcc/testsuite/g++.dg/lookup: enum2.C Log message: Backport: 2004-03-11 Mark Mitchell <mark@codesourcery.com> PR c++/14476 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.262&r2=1.3076.2.263 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.965.2.78&r2=1.965.2.79 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/enum2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1 Applied patch to GCC-3.3.4 too. -- Gaby |