This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/49828] reversed order of inlined function parameters
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jul 2011 11:03:55 +0000
- Subject: [Bug debug/49828] reversed order of inlined function parameters
- Auto-submitted: auto-generated
- References: <bug-49828-4@http.gcc.gnu.org/bugzilla/>
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.