https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110161
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:26b627810a2e307d0eacf4bf290daf548feb517c commit r13-7680-g26b627810a2e307d0eacf4bf290daf548feb517c Author: Gaius Mulley <gaiusm...@gmail.com> Date: Wed Aug 2 00:42:06 2023 +0100 PR modula2/110161 Comparing a typed procedure variable to 0 gives ICE or assertion This patch allows a proc type to be compared against an address. gcc/m2/ChangeLog: PR modula2/110161 * gm2-compiler/M2Check.mod (checkProcTypeEquivalence): New procedure function. (checkTypeKindEquivalence): Call checkProcTypeEquivalence if either left or right is a proc type. * gm2-compiler/M2Quads.mod (BuildRelOp): Create combinedTok prior to creating the range check quadruple. Use combinedTok when creating the range check quadruple. gcc/testsuite/ChangeLog: PR modula2/110161 * gm2/pim/fail/badxproc.mod: New test. (cherry picked from commit 8bf244e32a0d505720396fbb7df26f824c7f77eb) Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>