public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function @ 2012-11-08 14:34 bisqwit at iki dot fi 2012-11-08 14:49 ` [Bug c++/55240] " redi at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: bisqwit at iki dot fi @ 2012-11-08 14:34 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Bug #: 55240 Summary: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: bisqwit@iki.fi This code causes an ICE in GCC 4.7.1 and 4.7.2: int main() { int q = 1; struct test { int x = q; } instance; } tmpq.cc: In constructor 'constexpr main()::test::test()': tmpq.cc:4:12: internal compiler error: in expand_expr_real_1, at expr.c:9122 It is notable that if the code is written like this, the error message changes. int main() { int q = 1; struct test { int x; test():x(q){} } instance; } tmpq.cc:5:35: error: use of 'auto' variable from containing function tmpq.cc:3:9: error: 'int q' declared here ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi @ 2012-11-08 14:49 ` redi at gcc dot gnu.org 2012-11-08 21:34 ` daniel.kruegler at googlemail dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2012-11-08 14:49 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-11-08 Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi 2012-11-08 14:49 ` [Bug c++/55240] " redi at gcc dot gnu.org @ 2012-11-08 21:34 ` daniel.kruegler at googlemail dot com 2013-02-15 19:33 ` jason at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: daniel.kruegler at googlemail dot com @ 2012-11-08 21:34 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-11-08 21:33:48 UTC --- The ICE also exists for gcc 4.8.0 20121104 (experimental): "4|internal compiler error: in expand_expr_real_1, at expr.c:9280|" ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi 2012-11-08 14:49 ` [Bug c++/55240] " redi at gcc dot gnu.org 2012-11-08 21:34 ` daniel.kruegler at googlemail dot com @ 2013-02-15 19:33 ` jason at gcc dot gnu.org 2013-03-17 2:35 ` jason at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2013-02-15 19:33 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-15 19:33:33 UTC --- Created attachment 29475 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29475 55240.patch Patch waiting for 4.8 to branch. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi ` (2 preceding siblings ...) 2013-02-15 19:33 ` jason at gcc dot gnu.org @ 2013-03-17 2:35 ` jason at gcc dot gnu.org 2013-04-01 21:06 ` jason at gcc dot gnu.org 2013-05-05 12:09 ` paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2013-03-17 2:35 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-17 02:35:01 UTC --- Author: jason Date: Sun Mar 17 02:34:45 2013 New Revision: 196727 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196727 Log: PR c++/55240 * parser.c (parsing_nsdmi): New. * semantics.c (outer_automatic_var_p): Check it. (finish_id_expression): Likewise. * cp-tree.h: Declare it. Added: trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/parser.c trunk/gcc/cp/semantics.c ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi ` (3 preceding siblings ...) 2013-03-17 2:35 ` jason at gcc dot gnu.org @ 2013-04-01 21:06 ` jason at gcc dot gnu.org 2013-05-05 12:09 ` paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: jason at gcc dot gnu.org @ 2013-04-01 21:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.9.0 --- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-01 21:06:20 UTC --- Fixed for 4.9. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55240] [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi ` (4 preceding siblings ...) 2013-04-01 21:06 ` jason at gcc dot gnu.org @ 2013-05-05 12:09 ` paolo.carlini at oracle dot com 5 siblings, 0 replies; 7+ messages in thread From: paolo.carlini at oracle dot com @ 2013-05-05 12:09 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55240 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yuzurufag+gcc at gmail dot | |com --- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-05-05 12:09:35 UTC --- *** Bug 53150 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-05 12:09 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-11-08 14:34 [Bug c++/55240] New: [c++0x] ICE on non-static data member initialization using 'auto' variable from containing function bisqwit at iki dot fi 2012-11-08 14:49 ` [Bug c++/55240] " redi at gcc dot gnu.org 2012-11-08 21:34 ` daniel.kruegler at googlemail dot com 2013-02-15 19:33 ` jason at gcc dot gnu.org 2013-03-17 2:35 ` jason at gcc dot gnu.org 2013-04-01 21:06 ` jason at gcc dot gnu.org 2013-05-05 12:09 ` paolo.carlini at oracle dot com
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).