https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23551
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org --- Comment #20 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Matthew Fortune from comment #19) > I have one further case that may be worth adding to this ticket which > relates to the order of formal paramters emitted for an inlined subroutine > in debug info. > > GCC currently emits formal parameter DIEs for an inlined subroutine in > reverse order to the function's parameters. The DWARF spec is slightly > unclear in this area but does indicate that formal parameters must appear in > the same order as listed in the function prototype in both abstract and > concrete instances. > > One potential fix would be to change setup_one_parameter in tree-inline.c to > append each new VAR_DECL to the vars list instead of prepend them. There may > however be a more elegant approach by modifying the dwarf engine to detect > and re-order VAR_DECLs that relate to formal paramters and emit them in the > correct order. > > If this would be best as a separate ticket then I will open one. If a separate ticket would let us close this one, then yes, please open one.