public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52905] New: [C++0x] ice on invalid brace-enclosed initializer of vector of enums
@ 2012-04-08 15:50 dirkmoermans at gmail dot com
  2012-04-08 16:18 ` [Bug c++/52905] " dirkmoermans at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dirkmoermans at gmail dot com @ 2012-04-08 15:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52905

             Bug #: 52905
           Summary: [C++0x] ice on invalid brace-enclosed initializer of
                    vector of enums
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dirkmoermans@gmail.com


The invalid code below ICEs on gcc 4.6.1 and gcc 4.7.0.

It is caused by passing an int as an initializer to a vector of enums.

===
#include <vector>

enum ev {a,b,c};
std::vector<ev> v{a,-1}; // ICE
// std::vector<ev> v{a,b}; // passes
===

The messages are:

internal compiler error: in joust, at cp/call.c:7642 (g++-4.6.1)

internal compiler error: in joust, at cp/call.c:8009 (g++-4.7)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-31 14:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-08 15:50 [Bug c++/52905] New: [C++0x] ice on invalid brace-enclosed initializer of vector of enums dirkmoermans at gmail dot com
2012-04-08 16:18 ` [Bug c++/52905] " dirkmoermans at gmail dot com
2012-04-08 18:02 ` redi at gcc dot gnu.org
2012-04-13 17:03 ` jason at gcc dot gnu.org
2012-04-13 19:44 ` jason at gcc dot gnu.org
2012-04-13 19:52 ` jason at gcc dot gnu.org
2012-05-31 14:29 ` jason at gcc dot gnu.org
2012-05-31 14:39 ` 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).