public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14476] New: [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
@ 2004-03-08  4:45 pinskia at gcc dot gnu dot org
  2004-03-08  4:46 ` [Bug c++/14476] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08  4:45 UTC (permalink / raw)
  To: gcc-bugs

struct tree_common
{
  enum tree_code code : 8;
};

This used to work correctly in 2.95.3

-- 
           Summary: [3.3/3.4/3.5 Regression] ICE after error about enum not
                    being defined when using it as a bit field
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
@ 2004-03-08  4:46 ` pinskia at gcc dot gnu dot org
  2004-03-08  4:49 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08  4:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.0.4 3.3.3 3.4.0 3.5.0
      Known to work|                            |2.95.3
   Target Milestone|---                         |3.3.4
            Version|tree-ssa                    |3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
  2004-03-08  4:46 ` [Bug c++/14476] " pinskia at gcc dot gnu dot org
@ 2004-03-08  4:49 ` pinskia at gcc dot gnu dot org
  2004-03-08  4:57 ` gdr at integrable-solutions dot net
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08  4:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 04:48 -------
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.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
  2004-03-08  4:46 ` [Bug c++/14476] " pinskia at gcc dot gnu dot org
  2004-03-08  4:49 ` pinskia at gcc dot gnu dot org
@ 2004-03-08  4:57 ` gdr at integrable-solutions dot net
  2004-03-08 14:57 ` bangerth at dealii dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-03-08  4:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-08 04:57 -------
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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (2 preceding siblings ...)
  2004-03-08  4:57 ` gdr at integrable-solutions dot net
@ 2004-03-08 14:57 ` bangerth at dealii dot org
  2004-03-11  8:37 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-03-08 14:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-08 14:57 -------
Confirmed. We started ICEing in in or before 3.2.3, but it worked in 
2.95. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|3.0.4 3.3.3 3.4.0 3.5.0     |3.0.4 3.2.3 3.3.3 3.4.0
                   |                            |3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-08 14:57:55
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (3 preceding siblings ...)
  2004-03-08 14:57 ` bangerth at dealii dot org
@ 2004-03-11  8:37 ` cvs-commit at gcc dot gnu dot org
  2004-03-11  8:40 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-11  8:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-11 08:37 -------
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



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3/3.4/3.5 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (4 preceding siblings ...)
  2004-03-11  8:37 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-11  8:40 ` cvs-commit at gcc dot gnu dot org
  2004-03-11  8:44 ` [Bug c++/14476] [3.3 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-11  8:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-11 08:40 -------
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



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (5 preceding siblings ...)
  2004-03-11  8:40 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-11  8:44 ` mmitchel at gcc dot gnu dot org
  2004-03-13  3:16 ` cvs-commit at gcc dot gnu dot org
  2004-03-13  3:16 ` gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-11  8:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-11 08:44 -------
Fixed in GCC 3.4 and GCC 3.5.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3/3.4/3.5 Regression] ICE|[3.3 Regression] ICE after
                   |after error about enum not  |error about enum not being
                   |being defined when using it |defined when using it as a
                   |as a bit field              |bit field


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (7 preceding siblings ...)
  2004-03-13  3:16 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13  3:16 ` gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-03-13  3:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-03-13 03:16 -------
Applied patch to GCC-3.3.4 too.

-- Gaby


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/14476] [3.3 Regression] ICE after error about enum not being defined when using it as a bit field
  2004-03-08  4:45 [Bug c++/14476] New: [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
                   ` (6 preceding siblings ...)
  2004-03-11  8:44 ` [Bug c++/14476] [3.3 " mmitchel at gcc dot gnu dot org
@ 2004-03-13  3:16 ` cvs-commit at gcc dot gnu dot org
  2004-03-13  3:16 ` gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13  3:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 03:16 -------
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



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14476


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-03-13  3:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-08  4:45 [Bug c++/14476] New: [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
2004-03-08  4:46 ` [Bug c++/14476] " pinskia at gcc dot gnu dot org
2004-03-08  4:49 ` pinskia at gcc dot gnu dot org
2004-03-08  4:57 ` gdr at integrable-solutions dot net
2004-03-08 14:57 ` bangerth at dealii dot org
2004-03-11  8:37 ` cvs-commit at gcc dot gnu dot org
2004-03-11  8:40 ` cvs-commit at gcc dot gnu dot org
2004-03-11  8:44 ` [Bug c++/14476] [3.3 " mmitchel at gcc dot gnu dot org
2004-03-13  3:16 ` cvs-commit at gcc dot gnu dot org
2004-03-13  3:16 ` gdr 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).