Bug 14475 - [tree-ssa] [regression] ICE on bit enum field when enum is not defined
Summary: [tree-ssa] [regression] ICE on bit enum field when enum is not defined
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: tree-ssa
: P2 normal
Target Milestone: tree-ssa
Assignee: Andrew Pinski
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2004-03-08 04:43 UTC by Andrew Pinski
Modified: 2004-10-30 21:10 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.0 4.0.0
Known to fail:
Last reconfirmed: 2004-03-08 12:06:53


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2004-03-08 04:43:05 UTC
struct tree_common
{
  enum tree_code code : 8;
};
The C front-end just ICEs right away on this code.
Comment 1 Andrew Pinski 2004-03-08 16:08:49 UTC
ICE on invalid are not that critical.
Comment 2 Andrew Pinski 2004-03-10 18:19:07 UTC
I have a fix.
Comment 3 CVS Commits 2004-03-10 18:37:53 UTC
Subject: Bug 14475

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	pinskia@gcc.gnu.org	2004-03-10 18:37:50

Modified files:
	gcc            : ChangeLog.tree-ssa c-decl.c 
	gcc/testsuite  : ChangeLog.tree-ssa 
Added files:
	gcc/testsuite/gcc.dg: pr14475.c 

Log message:
	2004-03-10  Andrew Pinski  <apinski@apple.com>
	
	PR c/14475
	* gcc.dg/pr14475.c: New test.
	
	2004-03-10  Andrew Pinski  <apinski@apple.com
	
	PR c/14475
	* c-decl.c (check_bitfield_type_and_width): Check for null
	lang_type_specific when check the precision of an enum.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1265&r2=1.1.2.1266
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.334.2.84&r2=1.334.2.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.187&r2=1.1.2.188
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14475.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=NONE&r2=1.1.2.1

Comment 4 Andrew Pinski 2004-03-10 18:38:33 UTC
Fixed.