public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error
@ 2012-03-16 10:21 mickael.guene at st dot com
  2012-03-16 10:28 ` [Bug c++/52599] ICE on illegal constexpr constructor declaration paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mickael.guene at st dot com @ 2012-03-16 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52599
           Summary: illegal constexpr constructor declaration make g++
                    assert instead of returning an error
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mickael.guene@st.com


Created attachment 26902
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26902
This test make g++ to assert

when compiling attach file with 'g++ -std=c++0x test.cpp' compiler assert in
build_constexpr_constructor_member_initializers function from cp/semantics.c.
g++ should instead return an error since construct is illegal.


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

* [Bug c++/52599] ICE on illegal constexpr constructor declaration
  2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
@ 2012-03-16 10:28 ` paolo.carlini at oracle dot com
  2012-03-16 10:53 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-16 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-16
            Summary|illegal constexpr           |ICE on illegal constexpr
                   |constructor declaration     |constructor declaration
                   |make g++ assert instead of  |
                   |returning an error          |
     Ever Confirmed|0                           |1


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

* [Bug c++/52599] ICE on illegal constexpr constructor declaration
  2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
  2012-03-16 10:28 ` [Bug c++/52599] ICE on illegal constexpr constructor declaration paolo.carlini at oracle dot com
@ 2012-03-16 10:53 ` paolo.carlini at oracle dot com
  2012-04-17 10:42 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-16 10:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|mickael.guene at st dot com |jason at gcc dot gnu.org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-16 10:39:42 UTC ---
Actually, the gcc_assert triggering is that in
build_data_member_initialization: t is a TRY_BLOCK (of course) at that point.

Not sure at the moment if we should diagnose the issue here or earlier. Maybe
Jason has tips..


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

* [Bug c++/52599] ICE on illegal constexpr constructor declaration
  2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
  2012-03-16 10:28 ` [Bug c++/52599] ICE on illegal constexpr constructor declaration paolo.carlini at oracle dot com
  2012-03-16 10:53 ` paolo.carlini at oracle dot com
@ 2012-04-17 10:42 ` paolo.carlini at oracle dot com
  2012-04-17 17:34 ` paolo at gcc dot gnu.org
  2012-04-17 17:35 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-17 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-17 10:41:18 UTC ---
On it.


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

* [Bug c++/52599] ICE on illegal constexpr constructor declaration
  2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
                   ` (2 preceding siblings ...)
  2012-04-17 10:42 ` paolo.carlini at oracle dot com
@ 2012-04-17 17:34 ` paolo at gcc dot gnu.org
  2012-04-17 17:35 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-04-17 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-04-17 17:20:16 UTC ---
Author: paolo
Date: Tue Apr 17 17:20:02 2012
New Revision: 186541

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186541
Log:
/cp
2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/52599
    * semantics.c (build_constexpr_constructor_member_initializers):
    Check for function-try-block as function-body.

/testsuite
2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/52599
    * g++.dg/cpp0x/constexpr-ctor10.C: New.

/cp
2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53003
    * parser.c (cp_parser_member_declaration): Check that
    initializer_token_start is non null before dereferencing it.

/testsuite
2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53003
    * g++.dg/parse/crash59.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor10.C
    trunk/gcc/testsuite/g++.dg/parse/crash59.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/52599] ICE on illegal constexpr constructor declaration
  2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
                   ` (3 preceding siblings ...)
  2012-04-17 17:34 ` paolo at gcc dot gnu.org
@ 2012-04-17 17:35 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-17 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-17 17:21:04 UTC ---
Fixed for 4.8.0.


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

end of thread, other threads:[~2012-04-17 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 10:21 [Bug c++/52599] New: illegal constexpr constructor declaration make g++ assert instead of returning an error mickael.guene at st dot com
2012-03-16 10:28 ` [Bug c++/52599] ICE on illegal constexpr constructor declaration paolo.carlini at oracle dot com
2012-03-16 10:53 ` paolo.carlini at oracle dot com
2012-04-17 10:42 ` paolo.carlini at oracle dot com
2012-04-17 17:34 ` paolo at gcc dot gnu.org
2012-04-17 17:35 ` 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).