[Bug debug/49828] reversed order of inlined function parameters
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 25 11:04:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49828
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-25 11:02:15 UTC ---
I'd argue that gdb should here use the (correct) order of the parameters on the
abstract origin DIE.
I'm afraid the order of vars everywhere in gcc is pretty much random, and as
the concrete instances of the formal parameters (i.e. vars) can be added
through various means, it is hard to ensure the original ordering.
This particular testcase could be "fixed" by adding
vars = nreverse (vars);
before:
declare_inline_vars (id->blocks, vars);
in initialize_inlined_parameters, but that won't help e.g. if a VLA parameter
uses for its size other parameters, or if a function isn't inlined, but cloned
for versioning, etc.
More information about the Gcc-bugs
mailing list