public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef
@ 2013-09-28 17:14 reichelt at gcc dot gnu.org
  2013-09-30  8:41 ` [Bug c++/58560] [4.9 Regression] [c++11] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-28 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58560
           Summary: [4.7/4.8/4.9 Regression] ICE with auto in typedef
           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 code snippet (compiled with "-std=c++0x") triggers an ICE since
GCC 4.7.0:

========================
typedef auto T;

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

bug.cc:1:14: error: typedef declared 'auto'
 typedef auto T;
              ^
bug.cc: In function 'void foo()':
bug.cc:3:16: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_value_init_noctor, at cp/init.c:377
 void foo() { T(); }
                ^
0xcdbad9 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9225
0x6940e6 tree_class_check
        ../../gcc/gcc/tree.h:2731
0x6940e6 build_value_init_noctor(tree_node*, int)
        ../../gcc/gcc/cp/init.c:377
0x5e4cf1 build_functional_cast(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck2.c:1817
0x649859 cp_parser_functional_cast
        ../../gcc/gcc/cp/parser.c:22734
0x64429d cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5741
0x646acd cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7009
0x6476af cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7701
0x647b6f cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:7937
0x6499d3 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8099
0x64a1ce cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8138
0x64a1ce cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:9429
0x63faf7 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9280
0x640dde cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9552
0x640f26 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9506
0x6522db cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18318
0x6522db cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18354
0x65331f cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22338
0x654027 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22259
0x654027 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16347
Please submit a full bug report, [etc.]


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

* [Bug c++/58560] [4.9 Regression] [c++11] ICE with auto in typedef
  2013-09-28 17:14 [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef reichelt at gcc dot gnu.org
@ 2013-09-30  8:41 ` mpolacek at gcc dot gnu.org
  2013-09-30  8:47 ` [Bug c++/58560] [4.7/4.8/4.9 " mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-30  8:41 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-30
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
            Summary|[4.7/4.8/4.9 Regression]    |[4.9 Regression] [c++11]
                   |[c++11] ICE with auto in    |ICE with auto in typedef
                   |typedef                     |
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This doesn't ICE for me with latest 4.7/4.8.  But trunk ICEs.


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

* [Bug c++/58560] [4.7/4.8/4.9 Regression] [c++11] ICE with auto in typedef
  2013-09-28 17:14 [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef reichelt at gcc dot gnu.org
  2013-09-30  8:41 ` [Bug c++/58560] [4.9 Regression] [c++11] " mpolacek at gcc dot gnu.org
@ 2013-09-30  8:47 ` mpolacek at gcc dot gnu.org
  2013-10-04 23:48 ` paolo at gcc dot gnu.org
  2013-10-04 23:49 ` [Bug c++/58560] [4.7/4.8 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-30  8:47 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9 Regression] [c++11]    |[4.7/4.8/4.9 Regression]
                   |ICE with auto in typedef    |[c++11] ICE with auto in
                   |                            |typedef

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Oops, sorry, --enable-checking=release crept in.


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

* [Bug c++/58560] [4.7/4.8/4.9 Regression] [c++11] ICE with auto in typedef
  2013-09-28 17:14 [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef reichelt at gcc dot gnu.org
  2013-09-30  8:41 ` [Bug c++/58560] [4.9 Regression] [c++11] " mpolacek at gcc dot gnu.org
  2013-09-30  8:47 ` [Bug c++/58560] [4.7/4.8/4.9 " mpolacek at gcc dot gnu.org
@ 2013-10-04 23:48 ` paolo at gcc dot gnu.org
  2013-10-04 23:49 ` [Bug c++/58560] [4.7/4.8 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-04 23:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Oct  4 23:48:29 2013
New Revision: 203220

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

    PR c++/58560
    * typeck2.c (build_functional_cast): Use error_operand_p on exp.

/testsuite
2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58560
    * g++.dg/cpp0x/auto39.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/auto39.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/58560] [4.7/4.8 Regression] [c++11] ICE with auto in typedef
  2013-09-28 17:14 [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-10-04 23:48 ` paolo at gcc dot gnu.org
@ 2013-10-04 23:49 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-04 23:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
            Summary|[4.7/4.8/4.9 Regression]    |[4.7/4.8 Regression]
                   |[c++11] ICE with auto in    |[c++11] ICE with auto in
                   |typedef                     |typedef

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0. I don't think it's worth fixing in 4.7 and 4.8.


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

end of thread, other threads:[~2013-10-04 23:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-28 17:14 [Bug c++/58560] New: [4.7/4.8/4.9 Regression] ICE with auto in typedef reichelt at gcc dot gnu.org
2013-09-30  8:41 ` [Bug c++/58560] [4.9 Regression] [c++11] " mpolacek at gcc dot gnu.org
2013-09-30  8:47 ` [Bug c++/58560] [4.7/4.8/4.9 " mpolacek at gcc dot gnu.org
2013-10-04 23:48 ` paolo at gcc dot gnu.org
2013-10-04 23:49 ` [Bug c++/58560] [4.7/4.8 " 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).