[Bug c++/64931] ICE on function with deduced return type and input is instantiated template class

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 23 14:02:00 GMT 2015


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

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

template<typename T>
struct S {
  T data[32];
};

auto
foo (S<int> & x)
{
  return x;
}

The problem is that we create a RESULT_DECL with NULL DECL_SIZE, and gimplifier
ICEs on that.  The RESULT_DECL is created in convert_for_initialization called
from check_return_expr I think.



More information about the Gcc-bugs mailing list