This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53909] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560


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

             Bug #: 53909
           Summary: internal compiler error: in gimplify_init_ctor_eval,
                    at gimplify.c:3560
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tudorb@fb.com


constexpr constructors and multiple inheritance (non-virtual inheritance,
diamond pattern) don't mix; this causes an ICE with gcc 4.6.2 (minimized from
production code):

$ g++ -std=c++0x -g -o Bug Bug.cpp
Bug.cpp: In function ?int main()?:
Bug.cpp:10:19: internal compiler error: in gimplify_init_ctor_eval, at
gimplify.c:3560


struct B { };
struct C1 : B { };
struct C2 : B { };

struct A : C1, C2 {
  constexpr A(int x) { }
};

int main() {
  A a[] = {1, 2, 3};
  return 0;
}


$ g++ --version
g++ (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)
Copyright (C) 2011 Free Software Foundation, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]