public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54253] New: [C++11] constexpr constructor crashes with polymorphic base classes
@ 2012-08-14 14:15 mrks at koios dot de
  2012-08-14 14:20 ` [Bug c++/54253] " paolo.carlini at oracle dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mrks at koios dot de @ 2012-08-14 14:15 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: mrks@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


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

end of thread, other threads:[~2012-09-10 14:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 14:15 [Bug c++/54253] New: [C++11] constexpr constructor crashes with polymorphic base classes mrks at koios dot de
2012-08-14 14:20 ` [Bug c++/54253] " paolo.carlini at oracle dot com
2012-08-14 14:34 ` paolo.carlini at oracle dot com
2012-08-14 14:45 ` mrks at koios dot de
2012-08-14 14:48 ` paolo.carlini at oracle dot com
2012-08-14 14:49 ` mrks at koios dot de
2012-08-14 14:51 ` mrks at koios dot de
2012-08-21 11:54 ` paolo.carlini at oracle dot com
2012-09-06 16:24 ` jason at gcc dot gnu.org
2012-09-06 16:25 ` jason at gcc dot gnu.org
2012-09-06 16:25 ` jason at gcc dot gnu.org
2012-09-10 14:24 ` jason at gcc dot gnu.org
2012-09-10 14:43 ` 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).