https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124228
Bug ID: 124228
Summary: comparison of protected procedure to null as itype
causes crash
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: liam at liampwll dot com
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Reproducer and bug box on master below, this also impacts 15:
procedure Example is
protected Fallback_Hit_Counter is
procedure Handler;
end Fallback_Hit_Counter;
protected body Fallback_Hit_Counter is
procedure Handler is
begin
null;
end Handler;
end Fallback_Hit_Counter;
Bug : Boolean := Fallback_Hit_Counter.Handler'Access = null;
begin
null;
end Example;
+===========================GNAT BUG DETECTED==============================+
| 16.0.1 20260224 (experimental) (x86_64-linux-gnu) Assert_Failure failed
precondition from einfo-entities.ads:219|
| Error detected at example.adb:13:49 |
| Compiling <source> |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ . |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box in the report. |
| Include the exact command that you entered. |
| Also include sources listed below. |
+==========================================================================+