https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127316
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> I also think the redeclaration is invalid. So structural_comptypes wrongly
> thinks they are structurally equivalent.
I think if it is a reflection of a parameter (so parameters_of (^^fndecl)[0],
REFLECT_PARM), then if it is a redeclaration of the same function then they
should be the same. Of course, a question is how to determine that when we
still don't know if it will be a redeclaration of the same function or not.
The merging of the different PARM_DECLs is only performed during
duplicate_decls (setting of OLD_PARM_DECL_P).
If it is a variable (so ^^parmname, REFLECT_UNDEF), then I'm less sure about
it.