https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110161
Bug ID: 110161
Summary: Comparing a typed procedure variable to 0 gives ICE or
assertions
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
In the following example:
MODULE foo;
TYPE xProc = PROCEDURE(): BOOLEAN;
VAR x: xProc;
BEGIN
IF x = 0 THEN END;
END foo.
I get:
cc1gm2: internal compiler error: assert failed
(unfortunately without any line number information).
Same happens when comparing to NIL or PROC(0). Only xProc(0) works.