public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58634] New: [c++11] ICE initializing static class member via an anonymous class
@ 2013-10-05 20:36 reichelt at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: reichelt at gcc dot gnu.org @ 2013-10-05 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58634
           Summary: [c++11] ICE initializing static class member via an
                    anonymous class
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code snippet (compiled with "-std=c++0x") triggers an ICE
on trunk (since at least 4.9.0 20130920):

===============================================
struct A
{
  static const int i;
};

const int A::i = (struct { int j=0; }){}.j;
===============================================

bug.cc:6:26: internal compiler error: in nested_anon_class_index, at
cp/mangle.c:1403
 const int A::i = (struct { int j=0; }){}.j;
                          ^
0x6eca7e nested_anon_class_index
        ../../gcc/gcc/cp/mangle.c:1403
0x6eca7e write_unnamed_type_name
        ../../gcc/gcc/cp/mangle.c:1417
0x6eca7e write_unqualified_name
        ../../gcc/gcc/cp/mangle.c:1277
0x6f5937 write_prefix
        ../../gcc/gcc/cp/mangle.c:1059
0x6ed0c6 write_nested_name
        ../../gcc/gcc/cp/mangle.c:963
0x6ed6fc write_name
        ../../gcc/gcc/cp/mangle.c:864
0x6edd7f write_encoding
        ../../gcc/gcc/cp/mangle.c:719
0x6ee10d write_mangled_name
        ../../gcc/gcc/cp/mangle.c:689
0x6f6ac5 mangle_decl_string
        ../../gcc/gcc/cp/mangle.c:3446
0x6f6cf8 get_mangled_id
        ../../gcc/gcc/cp/mangle.c:3468
0x6f6cf8 mangle_decl(tree_node*)
        ../../gcc/gcc/cp/mangle.c:3491
0xcda6d0 decl_assembler_name(tree_node*)
        ../../gcc/gcc/tree.c:546
0x60ff4f comdat_linkage(tree_node*)
        ../../gcc/gcc/cp/decl2.c:1636
0x6b7a25 expand_or_defer_fn_1(tree_node*)
        ../../gcc/gcc/cp/semantics.c:3911
0x6b7f68 expand_or_defer_fn(tree_node*)
        ../../gcc/gcc/cp/semantics.c:3944
0x6e65c7 maybe_clone_body(tree_node*)
        ../../gcc/gcc/cp/optimize.c:428
0x6b798f expand_or_defer_fn_1(tree_node*)
        ../../gcc/gcc/cp/semantics.c:3874
0x6b7f68 expand_or_defer_fn(tree_node*)
        ../../gcc/gcc/cp/semantics.c:3944
0x69e8a1 synthesize_method(tree_node*)
        ../../gcc/gcc/cp/method.c:809
0x615789 mark_used(tree_node*, int)
        ../../gcc/gcc/cp/decl2.c:4719
Please submit a full bug report, [etc.]


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-05 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-05 20:36 [Bug c++/58634] New: [c++11] ICE initializing static class member via an anonymous class reichelt 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).