http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23551
Matthew Fortune <mfortune at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mfortune at gmail dot com --- Comment #19 from Matthew Fortune <mfortune at gmail dot com> 2011-04-21 14:07:35 UTC --- 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.