public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51327] New: [4.7 Regression] ICE with invalid constexpr parameter
@ 2011-11-27 22:07 reichelt at gcc dot gnu.org
  2011-11-27 22:15 ` [Bug c++/51327] [c++0x] " reichelt at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-27 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51327
           Summary: [4.7 Regression] ICE with invalid constexpr parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following invalid code snippet triggers an ICE on trunk (when compiled with
"-std=c++0x"):

=======================================
struct A
{
  A(int);
};

struct B : A {};

constexpr int foo(B) { return 0; }
=======================================

bug.cc: In function 'constexpr int foo(B)':
bug.cc:8:15: error: invalid type for parameter 1 of constexpr function
'constexpr int foo(B)'
bug.cc:6:8: note: 'B' is not literal because:
bug.cc:6:8: note:   'B' is not an aggregate, does not have a trivial default
constructor, and has no constexpr constructor that is not a copy or move
constructor
bug.cc:8:34: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


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

end of thread, other threads:[~2012-01-29 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-27 22:07 [Bug c++/51327] New: [4.7 Regression] ICE with invalid constexpr parameter reichelt at gcc dot gnu.org
2011-11-27 22:15 ` [Bug c++/51327] [c++0x] " reichelt at gcc dot gnu.org
2011-11-30 19:56 ` pinskia at gcc dot gnu.org
2011-11-30 21:31 ` paolo.carlini at oracle dot com
2011-12-06 14:23 ` rguenth at gcc dot gnu.org
2012-01-29 22:25 ` paolo at gcc dot gnu.org
2012-01-29 22:37 ` paolo at gcc dot gnu.org
2012-01-29 22:40 ` paolo.carlini at oracle dot com

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).