public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type
@ 2013-10-19 23:09 reichelt at gcc dot gnu.org
  2013-10-19 23:09 ` [Bug c++/58811] " reichelt at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-19 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58811
           Summary: [4.9 Regression] ICE with member variable of invalid
                    type
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet triggers an ICE on trunk (since at least 
4.9.0 2013-09-20):

========================
struct B
{
  struct A a;
};

void foo()
{
  B();
}
========================

bug.cc:3:12: error: field 'a' has incomplete type 'A'
   struct A a;
            ^
bug.cc: In function 'void foo()':
bug.cc:7:5: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_value_init_noctor, at cp/init.c:377
   B();
     ^
0xd162a6 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9352
0x6a3906 tree_class_check
        ../../gcc/gcc/tree.h:2797
0x6a3906 build_value_init_noctor(tree_node*, int)
        ../../gcc/gcc/cp/init.c:377
0x6a35fc build_value_init_noctor(tree_node*, int)
        ../../gcc/gcc/cp/init.c:414
0x5ee92b build_functional_cast(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck2.c:1854
0x6533a9 cp_parser_functional_cast
        ../../gcc/gcc/cp/parser.c:22848
0x64d7cd cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5792
0x64ff8d cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7066
0x650b5f cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7758
0x65103f cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:7996
0x653523 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8158
0x653d2e cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8197
0x653d2e cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:9488
0x648fd7 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9339
0x64a2c2 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9611
0x64a406 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9565
0x65da5b cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18408
0x65da5b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18444
0x661e5f cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22452
0x662c32 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22373
Please submit a full bug report, [etc.]


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

* [Bug c++/58811] [4.9 Regression] ICE with member variable of invalid type
  2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
@ 2013-10-19 23:09 ` reichelt at gcc dot gnu.org
  2013-11-05 15:06 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-19 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery,
                   |                            |ice-on-invalid-code
      Known to work|                            |4.8.0
   Target Milestone|---                         |4.9.0
      Known to fail|                            |4.9.0


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

* [Bug c++/58811] [4.9 Regression] ICE with member variable of invalid type
  2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
  2013-10-19 23:09 ` [Bug c++/58811] " reichelt at gcc dot gnu.org
@ 2013-11-05 15:06 ` rguenth at gcc dot gnu.org
  2014-01-17 10:23 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5


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

* [Bug c++/58811] [4.9 Regression] ICE with member variable of invalid type
  2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
  2013-10-19 23:09 ` [Bug c++/58811] " reichelt at gcc dot gnu.org
  2013-11-05 15:06 ` rguenth at gcc dot gnu.org
@ 2014-01-17 10:23 ` paolo.carlini at oracle dot com
  2014-01-17 20:25 ` paolo at gcc dot gnu.org
  2014-01-17 20:26 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-17 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-01-17
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed by the same patchlet which fixes c++/59270.


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

* [Bug c++/58811] [4.9 Regression] ICE with member variable of invalid type
  2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-01-17 10:23 ` paolo.carlini at oracle dot com
@ 2014-01-17 20:25 ` paolo at gcc dot gnu.org
  2014-01-17 20:26 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-01-17 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Jan 17 20:25:01 2014
New Revision: 206731

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

    PR c++/59270
    PR c++/58811
    * init.c (build_value_init_noctor): Don't pass error_mark_node to
    build_value_init.

/testsuite
2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/59270
    PR c++/58811
    * g++.dg/cpp0x/decltype-incomplete1.C: New.
    * g++.dg/init/pr58811.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C
    trunk/gcc/testsuite/g++.dg/init/pr58811.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/58811] [4.9 Regression] ICE with member variable of invalid type
  2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-17 20:25 ` paolo at gcc dot gnu.org
@ 2014-01-17 20:26 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-17 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


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

end of thread, other threads:[~2014-01-17 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-19 23:09 [Bug c++/58811] New: [4.9 Regression] ICE with member variable of invalid type reichelt at gcc dot gnu.org
2013-10-19 23:09 ` [Bug c++/58811] " reichelt at gcc dot gnu.org
2013-11-05 15:06 ` rguenth at gcc dot gnu.org
2014-01-17 10:23 ` paolo.carlini at oracle dot com
2014-01-17 20:25 ` paolo at gcc dot gnu.org
2014-01-17 20:26 ` 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).