https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95343
Bug ID: 95343 Summary: IPA-SRA can result in bad debug info about removed function arguments Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: jamborm at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux Target: x86_64-linux Created attachment 48608 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48608&action=edit Testcase ipa_param_adjustments::modify_call does not properly account for extra arguments left over from clone materialization when recording debug info. Therefore, when the attached testcase is compiled with -O2 or higher and run in gdb with a breakpoint is set at line 20 where we examine the value of parameter i, it incorrectly reports 4, even though it should be 2.