https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129180
Bug ID: 129180
Summary: wrong code with Ada variable-size record accessed from
inlined bodies
Product: gcc
Version: 16.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: liam at liampwll dot com
Target Milestone: ---
Created attachment 66352
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66352&action=edit
reproducer
I'm really not sure what's going on here as LTO isn't an area of the codebase
I'm familiar with at all, I just know that this code should obviously print
True but it prints False instead when using LTO.
Compile and run with:
gnatmake -f -O2 -flto -eI3 lto.adb && ./lto~3 x
I'm aware the attached code is a bit silly, it was pulled out of a much larger
codebase and stripped down were I instead hit an assertion error since our
compiler builds all have assertions enabled.