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

Zhendong Su <su at cs dot ucdavis.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |su at cs dot ucdavis.edu

--- Comment #4 from Zhendong Su <su at cs dot ucdavis.edu> ---
This still fails for the current trunk. Below is another almost the same, but
slightly simpler test: 

$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160707 (experimental) [trunk revision 238117] (GCC) 
$ 
$ clang++-3.8 -c -std=c++11 small.cpp
$ 
$ g++-trunk -c small.cpp
small.cpp: In substitution of ‘template<class ... T> int f(A<T, T ...>...)
[with T = <missing>]’:
small.cpp:4:28:   required from here
small.cpp:4:28: internal compiler error: tree check: expected class
‘expression’, have ‘type’ (integer_type) in tree_operand_check, at tree.h:3528
 int a = f (A < int, int >());
                            ^
0x105fd87 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc-source-trunk/gcc/tree.c:9802
0x5d8171 expr_check
        ../../gcc-source-trunk/gcc/tree.h:3199
0x5d8171 tree_operand_check
        ../../gcc-source-trunk/gcc/tree.h:3528
0x70513f tree_operand_check
        ../../gcc-source-trunk/gcc/tree.h:3144
0x70513f unify_pack_expansion
        ../../gcc-source-trunk/gcc/cp/pt.c:19216
0x7085c8 unify
        ../../gcc-source-trunk/gcc/cp/pt.c:20014
0x70734a unify
        ../../gcc-source-trunk/gcc/cp/pt.c:19910
0x707e96 unify
        ../../gcc-source-trunk/gcc/cp/pt.c:20006
0x5d8680 try_class_unification
        ../../gcc-source-trunk/gcc/cp/pt.c:19010
0x70711f unify
        ../../gcc-source-trunk/gcc/cp/pt.c:20044
0x7035bd unify_one_argument
        ../../gcc-source-trunk/gcc/cp/pt.c:18337
0x7046d4 unify_pack_expansion
        ../../gcc-source-trunk/gcc/cp/pt.c:19248
0x706139 type_unification_real
        ../../gcc-source-trunk/gcc/cp/pt.c:18431
0x713ce4 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
        ../../gcc-source-trunk/gcc/cp/pt.c:17856
0x67468b add_template_candidate_real
        ../../gcc-source-trunk/gcc/cp/call.c:3110
0x6753bc add_template_candidate
        ../../gcc-source-trunk/gcc/cp/call.c:3188
0x6753bc add_candidates
        ../../gcc-source-trunk/gcc/cp/call.c:5361
0x6779b9 perform_overload_resolution
        ../../gcc-source-trunk/gcc/cp/call.c:4045
0x679eae build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc-source-trunk/gcc/cp/call.c:4122
0x818000 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc-source-trunk/gcc/cp/semantics.c:2433
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.
$ 


----------------------------------------------------------


template < typename ... T > struct A {};
template < typename ... T > int f (A < T, T ... > ...);

int a = f (A < int, int >());

Reply via email to