Bug 28256 - [4.1 regression] ICE with empty initializer
Summary: [4.1 regression] ICE with empty initializer
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P2 normal
Target Milestone: 4.1.2
Assignee: Steve Ellcey
URL:
Keywords: ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2006-07-04 23:37 UTC by Volker Reichelt
Modified: 2006-08-03 17:02 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-08-01 16:47:38


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2006-07-04 23:37:56 UTC
The following invalid testcase triggers a segfault since GCC 4.1.0:

=========================================
int i = {};
=========================================

bug.cc: In function 'void foo()':
bug.cc:1: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
Comment 1 Steve Ellcey 2006-08-01 16:31:55 UTC
Subject: Bug 28256

Author: sje
Date: Tue Aug  1 16:31:40 2006
New Revision: 115856

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115856
Log:
	PR c++/28256
	* decl.c (check_initializer): Check for 1 initializer on scalar types.
	* g++.dg/init/brace2.C: Change expected error message, add empty init.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/init/brace2.C

Comment 2 Steve Ellcey 2006-08-03 16:58:01 UTC
Subject: Bug 28256

Author: sje
Date: Thu Aug  3 16:57:54 2006
New Revision: 115905

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115905
Log:
	PR c++/28256
	* decl.c (check_initializer): Check for 1 initializer on scalar types.
	* g++.dg/init/brace2.C: Change expected error message, add empty init.

Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/init/brace2.C

Comment 3 Steve Ellcey 2006-08-03 17:02:38 UTC
Fix is now on mainline and the 4.1 branch.