public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46852] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947
@ 2010-12-08 16:38 gcc at abeckmann dot de
  2010-12-08 16:56 ` [Bug c++/46852] " froydnj at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gcc at abeckmann dot de @ 2010-12-08 16:38 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE: tree check: expected class ‘type’, have
                    ‘exceptional’ (error_mark) in
                    cp_parser_class_specifier, at cp/parser.c:16947
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@abeckmann.de


The following code fragment gives an ICE in trunk:

===== 8< =====
template
<
class
{
===== >8 =====

$ g++-trunk -c -v ice-cp_parser_class_specifier.min.ii
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/software/x86_64/gcc-trunk
--program-suffix=-trunk --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.6.0 20101207 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus
-fpreprocessed ice-cp_parser_class_specifier.min.ii -quiet -dumpbase
ice-cp_parser_class_specifier.min.ii -mtune=generic -march=x86-64 -auxbase
ice-cp_parser_class_specifier.min -version -o /tmp/ccKrOsa0.s
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 58dd45b357216c1e9d23aab2b8f87581
ice-cp_parser_class_specifier.min.ii:4:1: error: types may not be defined in
parameter types
ice-cp_parser_class_specifier.min.ii:4:1: error: definition of
‘class<anonymous>’ inside template parameter list
ice-cp_parser_class_specifier.min.ii:4:1: error: expected ‘}’ at end of input
ice-cp_parser_class_specifier.min.ii:4:1: internal compiler error: tree check:
expected class ‘type’, have ‘exceptional’ (error_mark) in
cp_parser_class_specifier, at cp/parser.c:16947
Please submit a full bug report,


This is a regression from 4.5.x which properly gives these errors:

$ g++-4.5.x -c ice-cp_parser_class_specifier.min.ii
ice-cp_parser_class_specifier.min.ii:4:1: error: types may not be defined in
parameter types
ice-cp_parser_class_specifier.min.ii:4:1: error: definition of
‘class<anonymous>’ inside template parameter list
ice-cp_parser_class_specifier.min.ii:4:1: error: expected ‘}’ at end of input
ice-cp_parser_class_specifier.min.ii:4:1: error: expected ‘>’ at end of input
ice-cp_parser_class_specifier.min.ii:4:1: error: expected unqualified-id at end
of input

Andreas


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

* [Bug c++/46852] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947
  2010-12-08 16:38 [Bug c++/46852] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947 gcc at abeckmann dot de
@ 2010-12-08 16:56 ` froydnj at gcc dot gnu.org
  2010-12-16  1:33 ` [Bug c++/46852] [4.6 Regression] " froydnj at gcc dot gnu.org
  2010-12-17 15:14 ` froydnj at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-12-08 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Froyd <froydnj at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |froydnj at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |froydnj at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.0

--- Comment #1 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-12-08 16:56:46 UTC ---
This is due to my changes to detect missing semicolons.  I will fix it.


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

* [Bug c++/46852] [4.6 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947
  2010-12-08 16:38 [Bug c++/46852] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947 gcc at abeckmann dot de
  2010-12-08 16:56 ` [Bug c++/46852] " froydnj at gcc dot gnu.org
@ 2010-12-16  1:33 ` froydnj at gcc dot gnu.org
  2010-12-17 15:14 ` froydnj at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-12-16  1:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-12-16 01:33:07 UTC ---
Author: froydnj
Date: Thu Dec 16 01:33:03 2010
New Revision: 167894

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167894
Log:
gcc/cp/
    PR c++/46852
    * parser.c (cp_parser_class_specifier): Check for TYPE_P.

gcc/testsuite/
    PR c++/46852
    * g++.dg/pr46852.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/pr46852.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/46852] [4.6 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947
  2010-12-08 16:38 [Bug c++/46852] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947 gcc at abeckmann dot de
  2010-12-08 16:56 ` [Bug c++/46852] " froydnj at gcc dot gnu.org
  2010-12-16  1:33 ` [Bug c++/46852] [4.6 Regression] " froydnj at gcc dot gnu.org
@ 2010-12-17 15:14 ` froydnj at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-12-17 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Froyd <froydnj at gcc dot gnu.org> changed:

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

--- Comment #3 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-12-17 15:14:03 UTC ---
Fixed.


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

end of thread, other threads:[~2010-12-17 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 16:38 [Bug c++/46852] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947 gcc at abeckmann dot de
2010-12-08 16:56 ` [Bug c++/46852] " froydnj at gcc dot gnu.org
2010-12-16  1:33 ` [Bug c++/46852] [4.6 Regression] " froydnj at gcc dot gnu.org
2010-12-17 15:14 ` froydnj 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).