> Actually I'd say it's a frontend bug then setting DECL_ARG_TYPE to the > wrong type. Quoting: > > /* For a PARM_DECL, records the data type used to pass the argument, > which may be different from the type seen in the program. */ > #define DECL_ARG_TYPE(NODE) (PARM_DECL_CHECK (NODE)->decl_common.initial) > > if the type doesn't end up coming from DECL_ARG_TYPE but the value > then I'd agree - we should always look at the main variant here. Expansion > is quite twisty here so catching all cases is going to be interesting as > well as evaluating ABI side-effects - that's much easier to determine when > you change one target at a time...
FWIW SPARC 64-bit is very likely affected too, but I'm not sure we would want to change the ABI (it's a GCC extension after all). IMO the underlying issue is to allow variants with different alignments (for strict-alignment targets at least), this seems fundamentally broken to me. -- Eric Botcazou