diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2024-12-10 20:47:36 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2024-12-10 20:47:36 +0000 |
commit | e0ab8816ea53e2a343f7e945f4718172bff5ce95 (patch) | |
tree | c4074c22ce1dc3602b27bee0cc20bcdd832824fe /contrib/gcc-changelog/git_commit.py | |
parent | b26d92f4f71594206385d6f645ff626c0bf9b59c (diff) | |
download | gcc-e0ab8816ea53e2a343f7e945f4718172bff5ce95.zip gcc-e0ab8816ea53e2a343f7e945f4718172bff5ce95.tar.gz gcc-e0ab8816ea53e2a343f7e945f4718172bff5ce95.tar.bz2 |
PR modula2/117120: case ch with a nul char constant causes ICE
This patch fixes the ICE caused when a case clause contains
a character constant ''. The fix was to walk the caselist and
convert any 0 length string into a char constant of value 0.
gcc/m2/ChangeLog:
PR modula2/117120
* gm2-compiler/M2CaseList.mod (CaseBoundsResolved): Rewrite.
(ConvertNulStr2NulChar): New procedure function.
(NulStr2NulChar): Ditto.
(GetCaseExpression): Ditto.
(OverlappingCaseBound): Rewrite.
* gm2-compiler/M2GCCDeclare.mod (CheckResolveSubrange): Allow
'' to be used as the subrange low limit.
* gm2-compiler/M2GenGCC.mod (FoldConvert): Rewrite.
(PopKindTree): Ditto.
(BuildHighFromString): Reformat.
* gm2-compiler/SymbolTable.mod (PushConstString): Add test for
length 0 and PushChar (nul).
gcc/testsuite/ChangeLog:
PR modula2/117120
* gm2/pim/pass/forloopnulchar.mod: New test.
* gm2/pim/pass/nulcharcase.mod: New test.
* gm2/pim/pass/nulcharvar.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions