https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77338
--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> --- (In reply to Marek Polacek from comment #1) > I can't reproduce: > > $ ./cc1plus -quiet q.C > q.C:3:51: error: no match for call to ‘(S) (S&)’ > template < typename > auto f (S s)->decltype (s (s)); > ^ > q.C:3:51: error: no match for call to ‘(S) (S&)’ Marek, I still see the ICE with r239693: $ 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 20160823 (experimental) [trunk revision 239693] (GCC) $ $ g++-trunk -c small.cpp small.cpp:3:51: internal compiler error: Segmentation fault template < typename > auto f (S s)->decltype (s (s)); ^ 0xdd6b2f crash_signal ../../gcc-source-trunk/gcc/toplev.c:335 0x749d4b tree_check ../../gcc-source-trunk/gcc/tree.h:3025 0x749d4b is_really_empty_class(tree_node*) ../../gcc-source-trunk/gcc/cp/class.c:8447 0x8b7822 cxx_eval_constant_expression ../../gcc-source-trunk/gcc/cp/constexpr.c:3750 0x8bdb99 cxx_eval_outermost_constant_expr ../../gcc-source-trunk/gcc/cp/constexpr.c:4390 0x8c10ee fold_non_dependent_expr(tree_node*) ../../gcc-source-trunk/gcc/cp/constexpr.c:4669 0x6c98d4 build_non_dependent_expr(tree_node*) ../../gcc-source-trunk/gcc/cp/pt.c:23818 0x821b40 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc-source-trunk/gcc/cp/semantics.c:2329 0x798770 cp_parser_postfix_expression ../../gcc-source-trunk/gcc/cp/parser.c:6937 0x79992d cp_parser_decltype_expr ../../gcc-source-trunk/gcc/cp/parser.c:13266 0x79992d cp_parser_decltype ../../gcc-source-trunk/gcc/cp/parser.c:13367 0x797be7 cp_parser_simple_type_specifier ../../gcc-source-trunk/gcc/cp/parser.c:16258 0x793e61 cp_parser_type_specifier ../../gcc-source-trunk/gcc/cp/parser.c:16049 0x7963d2 cp_parser_type_specifier_seq ../../gcc-source-trunk/gcc/cp/parser.c:20184 0x7a0ab2 cp_parser_type_id_1 ../../gcc-source-trunk/gcc/cp/parser.c:20046 0x7a0276 cp_parser_trailing_type_id ../../gcc-source-trunk/gcc/cp/parser.c:20118 0x7a0276 cp_parser_late_return_type_opt ../../gcc-source-trunk/gcc/cp/parser.c:19958 0x7a0276 cp_parser_direct_declarator ../../gcc-source-trunk/gcc/cp/parser.c:19147 0x7a0276 cp_parser_declarator ../../gcc-source-trunk/gcc/cp/parser.c:18967 0x7b6025 cp_parser_init_declarator ../../gcc-source-trunk/gcc/cp/parser.c:18512 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. $