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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |aoliva at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |aoliva at gcc dot 
gnu.org

--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 45007
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45007&action=edit
combination of two potential fixes

The problem is that tsubst creates a new type variant of reference type for the
template instantiation, and passes it for convert_nontype_argument to create
the indirect_ref(nop_expr(var_decl)) using the reference type for the nop_expr,
but later on, strip_typedefs replaces the canonical reference type in the
nop_expr within the indirect_ref and verify_unstripped_args_1 doesn't like
that.

The attached patchlet fixes both spots, because I can't decide which change is
better.  Canonicalizing the type would save strip_typedefs some effort, but
preserving symbolic typedef names might give us better messages at a later
time.  Thoughts?

Reply via email to