]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/114294 expression causes ICE
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 14 Mar 2024 19:09:34 +0000 (19:09 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 14 Mar 2024 19:09:34 +0000 (19:09 +0000)
commit6dbf0d252f69ab2924256e6778ba7dc55d5b6915
tree3ab3950e3d85d7035e0f787a938a3810bcf657b1
parent53fd0f5b1fd737a208c12909fa1188281cb370a3
PR modula2/114294 expression causes ICE

This patch fixes an ICE when encountering an expression:
1 + HIGH (a[0]).  The fix was to assign a type to the constant
created by BuildConstHighFromSym in M2Quads.mod.

gcc/m2/ChangeLog:

PR modula2/114294
* gm2-compiler/M2Quads.mod (BuildConstHighFromSym):
Call PutConst to assign the type Cardinal in the result
constant.

gcc/testsuite/ChangeLog:

PR modula2/114294
* gm2/pim/pass/log: Removed.
* gm2/pim/pass/highexp.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2Quads.mod
gcc/testsuite/gm2/pim/pass/highexp.mod [new file with mode: 0644]
gcc/testsuite/gm2/pim/pass/log [deleted file]