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

--- Comment #4 from Zhendong Su <su at cs dot ucdavis.edu> ---
A simpler test that triggers the same ICE: 

$ 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 20160730 (experimental) [trunk revision 238903] (GCC) 
$ 
$ g++-trunk small.cpp
small.cpp: In function ‘int main()’:
small.cpp:7:15: internal compiler error: in arg_assoc_type, at
cp/name-lookup.c:5695
   f (g < int >);
               ^
0x87f0b2 arg_assoc_type
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5695
0x87f046 arg_assoc_args
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5706
0x87f046 arg_assoc_type
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5678
0x87e8ad arg_assoc
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5777
0x87ea78 arg_assoc
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5765
0x883eb1 arg_assoc_args_vec
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5721
0x883eb1 lookup_arg_dependent_1
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5826
0x883eb1 lookup_arg_dependent(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../gcc-source-trunk/gcc/cp/name-lookup.c:5854
0x81c1d4 perform_koenig_lookup(cp_expr, vec<tree_node*, va_gc, vl_embed>*, int)
        ../../gcc-source-trunk/gcc/cp/semantics.c:2244
0x79886b cp_parser_postfix_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:6854
0x7a0dec cp_parser_unary_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:8012
0x7a1647 cp_parser_cast_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:8689
0x7a1c45 cp_parser_binary_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:8791
0x7a2530 cp_parser_assignment_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:9079
0x7a4e29 cp_parser_expression
        ../../gcc-source-trunk/gcc/cp/parser.c:9246
0x7a559f cp_parser_expression_statement
        ../../gcc-source-trunk/gcc/cp/parser.c:10709
0x7933cb cp_parser_statement
        ../../gcc-source-trunk/gcc/cp/parser.c:10560
0x79408c cp_parser_statement_seq_opt
        ../../gcc-source-trunk/gcc/cp/parser.c:10832
0x79417f cp_parser_compound_statement
        ../../gcc-source-trunk/gcc/cp/parser.c:10786
0x7b2a1f cp_parser_function_body
        ../../gcc-source-trunk/gcc/cp/parser.c:20743
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.
$ 


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


void f (void (*) (int, int)) {}

template < typename T > void g (T x, __typeof__ x) {}

int main ()
{
  f (g < int >); 
  return 0; 
}

Reply via email to