[Bug debug/115543] DWARF call_site_parameter entries are not generated for stack-passed parameters

2024-06-19 Thread spevnev16 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115543

--- Comment #3 from Sergey  ---
(In reply to Jakub Jelinek from comment #1)
> That is not a bug, DW_TAG_call_site_parameter is emitted only when it has
> something relevant to say (like, what value has been passed).  If it isn't
> known how to reconstruct the value or if the compiler is unable to track the
> value passed to it, it can omit it.

I do not see how it is any different from register-passed parameters in its
"relevance", being able to reconstruct or track it. Could you please explain?

[Bug c/115543] New: DWARF call_site_parameter entries are not generated for stack-passed parameters

2024-06-18 Thread spevnev16 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115543

Bug ID: 115543
   Summary: DWARF call_site_parameter entries are not generated
for stack-passed parameters
   Product: gcc
   Version: 14.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: spevnev16 at gmail dot com
  Target Milestone: ---

When compiling a C function with more than 6 parameters on x86_64, its
call_site contains only the first 6 parameters, while the others (which are
passed through stack rather than registers) only have formal_parameters in the
subprogram DIE.

I assume that the number 6 is related to the way parameters are passed on
x86_64 (i.e. only 6 are passed through registers) and thus this number may
differ based on the architecture.

version: 14.1.0
target: x86_64-linux-gnu
configured: /usr/src/gcc/configure --build=x86_64-linux-gnu --disable-multilib
--enable-languages=c,c++,fortran,go
compiled with: gcc -g3 -O1 -Wall -Wextra -pedantic main.c