public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member
@ 2011-12-19  7:40 reichelt at gcc dot gnu.org
  2011-12-19  8:18 ` [Bug c++/51621] " reichelt at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-19  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51621
           Summary: [c++0x] [4.6/4.7 Regression] ICE with invalid
                    constexpr and array class member
    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 since GCC 4.6.0:

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

struct B
{
  A a[1];
  constexpr B() : a() {}
};
============================

bug.cc: In constructor 'B::B()':
bug.cc:9:24: error: non-constant array initialization
bug.cc:9:24: internal compiler error: in build_vec_init_elt, at cp/tree.c:485
Please submit a full bug report, [etc.]

In GCC 4.5.x, the code was wrongly accepted.


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

* [Bug c++/51621] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member
  2011-12-19  7:40 [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member reichelt at gcc dot gnu.org
@ 2011-12-19  8:18 ` reichelt at gcc dot gnu.org
  2011-12-20 11:21 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-19  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery,
                   |                            |ice-on-invalid-code
   Target Milestone|---                         |4.6.3


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

* [Bug c++/51621] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member
  2011-12-19  7:40 [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member reichelt at gcc dot gnu.org
  2011-12-19  8:18 ` [Bug c++/51621] " reichelt at gcc dot gnu.org
@ 2011-12-20 11:21 ` paolo.carlini at oracle dot com
  2011-12-20 23:53 ` paolo at gcc dot gnu.org
  2011-12-21  1:15 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-20 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-12-20
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-20 11:19:27 UTC ---
On it.


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

* [Bug c++/51621] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member
  2011-12-19  7:40 [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member reichelt at gcc dot gnu.org
  2011-12-19  8:18 ` [Bug c++/51621] " reichelt at gcc dot gnu.org
  2011-12-20 11:21 ` paolo.carlini at oracle dot com
@ 2011-12-20 23:53 ` paolo at gcc dot gnu.org
  2011-12-21  1:15 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-12-20 23:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-12-20 23:51:13 UTC ---
Author: paolo
Date: Tue Dec 20 23:51:09 2011
New Revision: 182556

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182556
Log:
/cp
2011-12-20  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51621
    * tree.c (diagnose_non_constexpr_vec_init): For value initialization
    pass void_type_node, not void_zero_node, to build_vec_init_elt.

/testsuite
2011-12-20  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51621
    * g++.dg/cpp0x/constexpr-ice5.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51621] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member
  2011-12-19  7:40 [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-20 23:53 ` paolo at gcc dot gnu.org
@ 2011-12-21  1:15 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-21  1:15 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.3                       |4.7.0

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-20 23:52:46 UTC ---
Fixed for 4.7.0.


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

end of thread, other threads:[~2011-12-20 23:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19  7:40 [Bug c++/51621] New: [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member reichelt at gcc dot gnu.org
2011-12-19  8:18 ` [Bug c++/51621] " reichelt at gcc dot gnu.org
2011-12-20 11:21 ` paolo.carlini at oracle dot com
2011-12-20 23:53 ` paolo at gcc dot gnu.org
2011-12-21  1:15 ` 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).