Bug 70695 - [C++14] ICE in a herdly complicated compile-time metaprogramming
Summary: [C++14] ICE in a herdly complicated compile-time metaprogramming
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.3.0
: P3 normal
Target Milestone: 6.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-16 16:09 UTC by functional.yy
Modified: 2017-10-28 23:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 5.3.0, 6.0
Last reconfirmed: 2016-04-18 00:00:00


Attachments
preprocessed source file (96.58 KB, text/plain)
2016-04-16 16:09 UTC, functional.yy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description functional.yy 2016-04-16 16:09:34 UTC
Created attachment 38290 [details]
preprocessed source file

> g++ -Wall -pedantic -std=c++14 a.cpp
Internal compiler error: Error reporting routines re-entered.
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
Comment 1 Richard Biener 2016-04-18 08:18:29 UTC
Confirmed with GCC 5 and GCC 6.

Internal compiler error: Error reporting routines re-entered.
0x81dafd push_tinst_level_loc(tree_node*, unsigned int)
        /space/rguenther/src/svn/trunk3/gcc/cp/pt.c:9075
0x81dabf push_tinst_level(tree_node*)
        /space/rguenther/src/svn/trunk3/gcc/cp/pt.c:9059
0x849f1b fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
        /space/rguenther/src/svn/trunk3/gcc/cp/pt.c:17738
0x781368 add_template_candidate_real
        /space/rguenther/src/svn/trunk3/gcc/cp/call.c:3093
0x7817ef add_template_candidate
        /space/rguenther/src/svn/trunk3/gcc/cp/call.c:3171
0x7894c8 add_candidates
        /space/rguenther/src/svn/trunk3/gcc/cp/call.c:5344
0x7956b8 build_new_method_call_1
        /space/rguenther/src/svn/trunk3/gcc/cp/call.c:8293
0x7964fe build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int)
        /space/rguenther/src/svn/trunk3/gcc/cp/call.c:8489
0x844c12 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
        /space/rguenther/src/svn/trunk3/gcc/cp/pt.c:16620
0x833b43 tsubst(tree_node*, tree_node*, int, tree_node*)
        /space/rguenther/src/svn/trunk3/gcc/cp/pt.c:13528
0x8c177b dump_template_bindings
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:351
0x8c883f dump_substitution
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:1452
0x8c9ab6 dump_function_decl
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:1592
0x8c7674 dump_decl
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:1198
0x8cfb42 decl_to_string
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:2957
0x8d1b98 cp_printer
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:3537
0x1b0959e pp_format(pretty_printer*, text_info*)
        /space/rguenther/src/svn/trunk3/gcc/pretty-print.c:634
0x1b09999 pp_format_verbatim(pretty_printer*, text_info*)
        /space/rguenther/src/svn/trunk3/gcc/pretty-print.c:692
0x1b09ff1 pp_verbatim(pretty_printer*, char const*, ...)
        /space/rguenther/src/svn/trunk3/gcc/pretty-print.c:893
0x8d14e1 print_instantiation_partial_context_line
        /space/rguenther/src/svn/trunk3/gcc/cp/error.c:3362
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.
Comment 2 Paolo Carlini 2017-10-28 23:14:49 UTC
This seems fixed in 6.2.0, no ICE anymore. But I didn't try to reduce the large testcase and I'm using -m32 with linux-x86_64, not the same target. In case, please re-open and provide details about the target.