[Bug c++/96104] [10/11 Regression] internal compiler error: in finish_expr_stmt, at cp/semantics.c:681

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 7 22:44:45 GMT 2020


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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reduced:

// PR c++/96104

template <typename T> void fn(T &);
class E {};
struct F {
  template <typename T> void mfn(T t) { t, fn(E()); } // { dg-error "cannot
bind non-const lvalue reference" }
};
int
main()
{
  E e;
  F f;
  f.mfn(e);
}


More information about the Gcc-bugs mailing list