From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18124 invoked by alias); 23 Apr 2013 08:21:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17478 invoked by uid 48); 23 Apr 2013 08:21:43 -0000 From: "slayoo at staszic dot waw.pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57041] New: ICE in lookup_field_1, at cp/search.c:376 (with dot-prefixed structure initialisation) Date: Tue, 23 Apr 2013 08:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slayoo at staszic dot waw.pl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01925.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57041 Bug #: 57041 Summary: ICE in lookup_field_1, at cp/search.c:376 (with dot-prefixed structure initialisation) Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: slayoo@staszic.waw.pl Hi, $ cat bug.cpp #include #include template void setopts(T &p) { p.outvars = {{0, {.name = "psi", .unit = "1"}}}; } int main() { struct { struct info { std::string name, unit; }; std::map outvars; } p; setopts(p); } $ /usr/lib/gcc-snapshot/bin/g++ -std=c++11 bug.cpp bug.cpp: In instantiation of 'void setopts(T&) [with T = main()::]': bug.cpp:17:12: required from here bug.cpp:7:13: error: 'name' was not declared in this scope p.outvars = {{0, {.name = "psi", .unit = "1"}}}; ^ bug.cpp:7:13: error: 'unit' was not declared in this scope bug.cpp:7:13: internal compiler error: in lookup_field_1, at cp/search.c:376 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccLInnuE.out file, please attach this to your bugreport. $ /usr/lib/gcc-snapshot/bin/g++ --version g++ (Debian 20130209-1) 4.8.0 20130209 Clang compiles it with no warnings or errors. HTH, Sylwester