public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
@ 2014-02-14 16:18 ` reichelt at gcc dot gnu.org
  2014-02-14 16:20 ` reichelt at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.7.0, 4.8.0
           Keywords|                            |error-recovery,
                   |                            |ice-on-invalid-code
   Last reconfirmed|                            |2014-02-14
                 CC|                            |reichelt at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE on invalid: tree check: |[4.9 Regression] ICE on
                   |expected class 'type', have |invalid: tree check:
                   |'exceptional' (error_mark)  |expected class 'type', have
                   |in tsubst_decl, at          |'exceptional' (error_mark)
                   |cp/pt.c:10798               |in tsubst_decl, at
                   |                            |cp/pt.c:10798
   Target Milestone|---                         |4.9.0
      Known to fail|                            |4.9.0

--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed.

Here's a simplified testcase that produces less error message before crashing:

===============================
template<int> struct A
{
  typedef int ::X;
};

A<0> a;
===============================

The problem might be related to PR60200.


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
  2014-02-14 16:18 ` [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798 reichelt at gcc dot gnu.org
@ 2014-02-14 16:20 ` reichelt at gcc dot gnu.org
  2014-02-14 16:48 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 16:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Output for the testcase from comment#1:

bug.cc:3:17: error: typedef name may not be a nested-name-specifier
   typedef int ::X;
                 ^
bug.cc: In instantiation of 'struct A<0>':
bug.cc:6:6:   required from here
bug.cc:3:17: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10817
0xdc0407 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9243
0x631b69 tree_class_check
        ../../gcc/gcc/tree.h:2832
0x631b69 tsubst_decl
        ../../gcc/gcc/cp/pt.c:10817
0x61be9f tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:11357
0x64a34a instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:9010
0x64a34a instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:9274
0x6db973 complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:134
0x5c4f38 start_decl_1(tree_node*, bool)
        ../../gcc/gcc/cp/decl.c:4719
0x5ede67 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/gcc/cp/decl.c:4682
0x6c7e9e cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16680
0x6c9929 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11205
0x6acc13 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6d3ec2 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10983
0x6d2bb8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10869
0x6d445a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4014
0x6d445a c_parse_file()
        ../../gcc/gcc/cp/parser.c:31536
0x7f37c3 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
  2014-02-14 16:18 ` [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798 reichelt at gcc dot gnu.org
  2014-02-14 16:20 ` reichelt at gcc dot gnu.org
@ 2014-02-14 16:48 ` jakub at gcc dot gnu.org
  2014-02-21 20:43 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-14 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, both the #c0 and #c1 testcases started to ICE with r199779.


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-02-21 20:43 ` jason at gcc dot gnu.org
@ 2014-02-21 20:43 ` jason at gcc dot gnu.org
  2014-02-21 21:44 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-02-14 16:48 ` jakub at gcc dot gnu.org
@ 2014-02-21 20:43 ` jason at gcc dot gnu.org
  2014-02-21 20:43 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
*** Bug 60200 has been marked as a duplicate of this bug. ***


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-02-21 20:43 ` jason at gcc dot gnu.org
@ 2014-02-21 21:44 ` jason at gcc dot gnu.org
  2014-02-22  5:05 ` jason at gcc dot gnu.org
  2014-02-22 21:05 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 21:43:29 2014
New Revision: 208025

URL: http://gcc.gnu.org/viewcvs?rev=208025&root=gcc&view=rev
Log:
    PR c++/59347
    * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
    erroneous typedef.

Added:
    trunk/gcc/testsuite/g++.dg/template/typedef41.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-02-21 21:44 ` jason at gcc dot gnu.org
@ 2014-02-22  5:05 ` jason at gcc dot gnu.org
  2014-02-22 21:05 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-22  5:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


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

* [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798
       [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-02-22  5:05 ` jason at gcc dot gnu.org
@ 2014-02-22 21:05 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-22 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
*** Bug 58448 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2014-02-22 21:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-59347-4@http.gcc.gnu.org/bugzilla/>
2014-02-14 16:18 ` [Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798 reichelt at gcc dot gnu.org
2014-02-14 16:20 ` reichelt at gcc dot gnu.org
2014-02-14 16:48 ` jakub at gcc dot gnu.org
2014-02-21 20:43 ` jason at gcc dot gnu.org
2014-02-21 20:43 ` jason at gcc dot gnu.org
2014-02-21 21:44 ` jason at gcc dot gnu.org
2014-02-22  5:05 ` jason at gcc dot gnu.org
2014-02-22 21:05 ` reichelt 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).