[Bug ada/69219] New: [5/6 regression] failed to compile nested subprograms with Inline_Always and Intrinsic
demoonlit at panathenaia dot halfmoon.jp
gcc-bugzilla@gcc.gnu.org
Sun Jan 10 16:12:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69219
Bug ID: 69219
Summary: [5/6 regression] failed to compile nested subprograms
with Inline_Always and Intrinsic
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: demoonlit at panathenaia dot halfmoon.jp
Target Milestone: ---
Created attachment 37297
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37297&action=edit
minimal bug triggering source code
gcc-5 and later have generated no machine-code for subprograms having the
combination of Inline_Always and Intrinsic.
However, this pattern causes <built-in> error for nested subprograms.
procedure nestedinlinealways is -- outer subprogram
procedure NI;
pragma No_Inline (NI);
procedure IA;
pragma Convention (Intrinsic, IA);
pragma Inline_Always (IA);
-- pragma Inline (IA); -- it works fine.
procedure IA is
begin
NI; -- calling other subprogram here is one of the triggers.
end IA;
procedure NI is null;
begin
IA;
end nestedinlinealways;
Please try to compile above code (the attached file):
% gcc -c nestedinlinealways.adb
<built-in>: In function 'nestedinlinealways.ia':
nestedinlinealways.adb:3:14: error: subprogram 'nestedinlinealways.ni' not
marked Inline_Always
nestedinlinealways.adb:11:4: error: parent subprogram cannot be inlined
It will become to be compiled if I replace pragma Inline_Always to normal
Inline or remove pragma Convention.
More information about the Gcc-bugs
mailing list