This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/81956] New: [7 regression] calling a null procedure is not skipped
- From: "demoonlit at panathenaia dot halfmoon.jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Aug 2017 21:53:29 +0000
- Subject: [Bug ada/81956] New: [7 regression] calling a null procedure is not skipped
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81956
Bug ID: 81956
Summary: [7 regression] calling a null procedure is not skipped
Product: gcc
Version: 7.2.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: ---
Hello. Has the behavior of null procedures been changed from gcc-7?
package p is
procedure Null_Proc is null;
end p;
with p;
procedure main is
begin
p.Null_Proc;
end main;
With gcc-7.2, the calling Null_Proc is generated into the object code.
$ gcc -c -O1 main.adb
$ nm main.o
0000000000000010 s EH_frame1
0000000000000000 S __ada_main
U _p__null_proc
With gcc-6.2, this calling Null_Proc has been skipped. I think this behavior is
desirable.
$ gcc -c -O1 main.adb
$ nm main.o
0000000000000008 s EH_frame1
0000000000000000 S __ada_main