Bug 50443 - ICE when using brace-enclosed initializer for C-style array in constructor
Summary: ICE when using brace-enclosed initializer for C-style array in constructor
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-17 11:55 UTC by Kerrek SB
Modified: 2011-09-22 23:04 UTC (History)
0 users

See Also:
Host: x86
Target: x86
Build:
Known to work: 4.6.2, 4.7.0
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kerrek SB 2011-09-17 11:55:15 UTC
The following code causes GCC 4.6.1 with -std=c++0x to crash:

struct Foo
{
  Foo() : a{{5,7,3}} { }
  int a[3];
};


Message: "internal compiler error: in cxx_eval_bare_aggregate, at cp/semantics.c:6539"
Comment 1 Jonathan Wakely 2011-09-17 20:49:21 UTC
works fine with
gcc version 4.7.0 20110917 (experimental) [trunk revision 178930] (GCC) 
and
gcc version 4.6.2 20110917 (prerelease) [gcc-4_6-branch revision 178930] (GCC)
Comment 2 Jonathan Wakely 2011-09-17 20:55:14 UTC
by "works fine" I mean no ICE, there's an error because it should be a{5,7,3}
Comment 3 Kerrek SB 2011-09-17 21:50:05 UTC
Alright, if it's fixed already, that's fine. I only have the full release versions, so I didn't test anything newer than 4.6.1. Thanks!
Comment 4 Paolo Carlini 2011-09-22 23:04:26 UTC
Ok.