public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65340] New: [C++14]ICE in mark_used, at decl2.c:5040
@ 2015-03-07  6:44 lucdanton at free dot fr
  2015-03-16  9:24 ` [Bug c++/65340] [5 Regression] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: lucdanton at free dot fr @ 2015-03-07  6:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65340

            Bug ID: 65340
           Summary: [C++14]ICE in mark_used, at decl2.c:5040
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr

Created attachment 34981
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34981&action=edit
Reduced testcase

This is an ICE on invalid code.

$ g++-trunk --version
g++-trunk (GCC) 5.0.0 20150307 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++-trunk -std=c++14 main.cpp
main.cpp:4:34: error: expected identifier before ',' token
 struct recurse { auto operator()(, ) }
                                  ^
main.cpp:4:36: error: expected identifier before ')' token
 struct recurse { auto operator()(, ) }
                                    ^
main.cpp:4:36: error: expected ';' at end of member declaration
main.cpp:4:38: error: expected ';' after struct definition
 struct recurse { auto operator()(, ) }
                                      ^
main.cpp:6:37: error: found ':' in nested-name-specifier, expected '::'
 auto &recurse = constant < functors : recurse >
                                     ^
main.cpp:7:1: error: expected ',' or ';' before '}' token
 }
 ^
main.cpp:12:44: error: found ':' in nested-name-specifier, expected '::'
                                            : recurse(0, 0));
                                            ^
main.cpp:13:1: error: expected ';' after struct definition
 }
 ^
main.cpp:15:38: error: found ':' in nested-name-specifier, expected '::'
 auto &traverse = constant < functors : traverse > ;
                                      ^
main.cpp: In substitution of 'template<class Algo, class Value> decltype
(reflect::recurse(0, 0)) functors::traverse::operator()(Algo, Value) [with Algo
= int; Value = int]':
main.cpp:16:37:   required from here
main.cpp:12:53: error: use of 'auto reflect::functors::recurse::operator()(int,
int)' before deduction of 'auto'
                                            : recurse(0, 0));
                                                     ^
'
Internal compiler error: Error reporting routines re-entered.
0x641409 mark_used(tree_node*, int)
    ../../gcc/gcc/cp/decl2.c:5040
0x5da949 build_over_call
    ../../gcc/gcc/cp/call.c:7489
0x5e3e69 build_op_call_1
    ../../gcc/gcc/cp/call.c:4335
0x5e3e69 build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
    ../../gcc/gcc/cp/call.c:4358
0x6ad497 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
    ../../gcc/gcc/cp/semantics.c:2424
0x60ddf5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/gcc/cp/pt.c:15211
0x60ef45 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../../gcc/gcc/cp/pt.c:12530
0x646f4c dump_template_bindings
    ../../gcc/gcc/cp/error.c:369
0x646f4c dump_substitution
    ../../gcc/gcc/cp/error.c:1448
0x648da6 decl_to_string
    ../../gcc/gcc/cp/error.c:2910
0x648da6 cp_printer
    ../../gcc/gcc/cp/error.c:3494
0x108eb6b pp_format(pretty_printer*, text_info*)
    ../../gcc/gcc/pretty-print.c:613
0x108c5f8 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
    ../../gcc/gcc/diagnostic.c:865
0x108d1c2 error(char const*, ...)
    ../../gcc/gcc/diagnostic.c:1137
0x641409 mark_used(tree_node*, int)
    ../../gcc/gcc/cp/decl2.c:5040
0x5da949 build_over_call
    ../../gcc/gcc/cp/call.c:7489
0x5e3e69 build_op_call_1
    ../../gcc/gcc/cp/call.c:4335
0x5e3e69 build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
    ../../gcc/gcc/cp/call.c:4358
0x6ad497 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
    ../../gcc/gcc/cp/semantics.c:2424
0x66046a cp_parser_postfix_expression
    ../../gcc/gcc/cp/parser.c:6375
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

end of thread, other threads:[~2015-03-18 10:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-07  6:44 [Bug c++/65340] New: [C++14]ICE in mark_used, at decl2.c:5040 lucdanton at free dot fr
2015-03-16  9:24 ` [Bug c++/65340] [5 Regression] " mpolacek at gcc dot gnu.org
2015-03-16 10:35 ` jakub at gcc dot gnu.org
2015-03-17 16:00 ` paolo.carlini at oracle dot com
2015-03-18 10:32 ` paolo at gcc dot gnu.org
2015-03-18 10:32 ` 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).