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

             Bug #: 54253
           Summary: [C++11] constexpr constructor crashes with polymorphic
                    base classes
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: m...@koios.de


Created attachment 28010
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28010
preprocessed source

In _some_ constellations, g++ exits with a segmentation fault:
I could not figure out a pattern to reduce all to a common 'sourceproblem', so
here is a list of what I tried:

* One polymorphic base class:
** implicit base constructor, explicitly called (as in the example): crashes
** implicit base constructor (even with default non-static member assignments),
implicitly called: works
** explicit constexpr base constructor, explicitly called: works
** explicit constexpr base constructor, implicitly called: works

* Multiple Inhertiance, first Base is polymorphic:
nearly the same as above, except that it doesn't crash in the first case but
says
const3.cc: In constructor 'constexpr Derived::Derived()':
const3.cc:15:42: error: uninitialized member 'Derived::<anonymous>' in
'constexpr' constructor
const3.cc:15: confused by earlier errors, bailing out

* Multiple Inhertiance, second Base is polymorphic:
crashes always

Reply via email to