public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/50261] New: [c++0x] ICE on brace-initialize an array member @ 2011-09-01 8:00 kikairoya at gmail dot com 2011-09-24 20:55 ` [Bug c++/50261] [C++0x] " paolo.carlini at oracle dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: kikairoya at gmail dot com @ 2011-09-01 8:00 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50261 Bug #: 50261 Summary: [c++0x] ICE on brace-initialize an array member Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: kikairoya@gmail.com An ICE occurs with this code: template <typename T> struct ca { T elem[1]; // ICE occurs ... ca(const T (&s)[1]): elem{{s}} { } // here //ca(const T (&s)[1]): elem({{s}}) { } // or here. //ca(const T (&s)[1]): elem(s) { } // but not here (rejects correctly.) //ca(const T (&s)[1]): elem{s} { } // also rejects correctly. // also occurs ... ca(const T &v): elem{{v}} { } // here //ca(const T &v): elem{{{v}}} { } // and here, or more braces. //ca(const T &v): elem{v} { } // pass. //ca(const T &v): elem({v}) { } // pass (with warning). }; int main() { int a[1] = {0}; ca<int> d(a); ca<int> e(a[0]); } causes: test.cc: In instantiation of 'ca<T>::ca(const T (&)[1]) [with T = int]': test.cc:20:13: required from here test.cc:6:31: internal compiler error: in cxx_eval_bare_aggregate, at cp/semantics.c:6679 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions. tested: gcc version 4.6.1 (Debian 4.6.1-3) gcc version 4.7.0 20110816 (experimental) [trunk revision 177785] (Debian 20110816-1) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/50261] [C++0x] ICE on brace-initialize an array member 2011-09-01 8:00 [Bug c++/50261] New: [c++0x] ICE on brace-initialize an array member kikairoya at gmail dot com @ 2011-09-24 20:55 ` paolo.carlini at oracle dot com 2012-01-28 6:29 ` pinskia at gcc dot gnu.org 2013-04-25 17:51 ` jason at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2011-09-24 20:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50261 --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-24 20:30:48 UTC --- Now many of these do not ice anymore for me, only the second of the second block does. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/50261] [C++0x] ICE on brace-initialize an array member 2011-09-01 8:00 [Bug c++/50261] New: [c++0x] ICE on brace-initialize an array member kikairoya at gmail dot com 2011-09-24 20:55 ` [Bug c++/50261] [C++0x] " paolo.carlini at oracle dot com @ 2012-01-28 6:29 ` pinskia at gcc dot gnu.org 2013-04-25 17:51 ` jason at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-01-28 6:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50261 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2012-01-28 Ever Confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 05:54:41 UTC --- Confirmed, the only one that ICEs on the trunk is: template <typename T> struct ca { T elem[1]; ca(const T (&s)[1]): elem{{s}} { } // here ca(const T &v): elem{{{v}}} { } // and here, or more braces. }; int main() { int a[1] = {0}; ca<int> d(a); ca<int> e(a[0]); } ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/50261] [C++0x] ICE on brace-initialize an array member 2011-09-01 8:00 [Bug c++/50261] New: [c++0x] ICE on brace-initialize an array member kikairoya at gmail dot com 2011-09-24 20:55 ` [Bug c++/50261] [C++0x] " paolo.carlini at oracle dot com 2012-01-28 6:29 ` pinskia at gcc dot gnu.org @ 2013-04-25 17:51 ` jason at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jason at gcc dot gnu.org @ 2013-04-25 17:51 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50261 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jason at gcc dot gnu.org Resolution| |FIXED AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | Target Milestone|--- |4.8.1 --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-25 17:51:35 UTC --- Fixed for 4.8.1. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-25 17:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-09-01 8:00 [Bug c++/50261] New: [c++0x] ICE on brace-initialize an array member kikairoya at gmail dot com 2011-09-24 20:55 ` [Bug c++/50261] [C++0x] " paolo.carlini at oracle dot com 2012-01-28 6:29 ` pinskia at gcc dot gnu.org 2013-04-25 17:51 ` jason at gcc dot gnu.org
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).