]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/119192 ICE if TBITSIZE is used in an expression
authorGaius Mulley <gaiusmod2@gmail.com>
Mon, 10 Mar 2025 17:37:41 +0000 (17:37 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Mon, 10 Mar 2025 17:37:41 +0000 (17:37 +0000)
commit40a4f3dead623db86bc8f7255cbe524701f4aeb0
tree76c4a2ff6450c4daecd6c81ec736e470c426a976
parent85b46d0795ac76bc192cb8f88b646a647acf98c1
PR modula2/119192 ICE if TBITSIZE is used in an expression

This patch fixes an ICE which will occur is TBITSIZE is used
within an expression.

gcc/m2/ChangeLog:

PR modula2/119192
* gm2-compiler/M2GCCDeclare.def (TryDeclareType): New procedure.
* gm2-compiler/M2GCCDeclare.mod (IsAnyType): New procedure.
(TryDeclareType): Ditto.
* gm2-compiler/M2GenGCC.mod (FoldTBitsize): New procedure.
(FoldStandardFunction): Call FoldTBitsize.
* gm2-gcc/m2expr.cc (BuildTBitSize): Improve comment.
(m2expr_BuildSystemTBitSize): New function.
* gm2-gcc/m2expr.def (BuildSystemTBitSize): New procedure
function.
* gm2-gcc/m2expr.h (m2expr_BuildSystemTBitSize): New function
prototype.

gcc/testsuite/ChangeLog:

PR modula2/119192
* gm2/sets/run/pass/simplepacked.mod: Uncomment asserts.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2GCCDeclare.def
gcc/m2/gm2-compiler/M2GCCDeclare.mod
gcc/m2/gm2-compiler/M2GenGCC.mod
gcc/m2/gm2-gcc/m2expr.cc
gcc/m2/gm2-gcc/m2expr.def
gcc/m2/gm2-gcc/m2expr.h
gcc/testsuite/gm2/sets/run/pass/simplepacked.mod