diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2025-03-28 15:25:55 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2025-03-28 15:25:55 +0000 |
commit | b69945d511b394ef092c888c6475f8c72bee0c03 (patch) | |
tree | 546b8167b0f94a6074b7a4d55adbd8ce28a422e2 /libcpp/files.cc | |
parent | b9f08c8631c2c1a393d7d2bdd41b1b0fe76b1663 (diff) | |
download | gcc-b69945d511b394ef092c888c6475f8c72bee0c03.zip gcc-b69945d511b394ef092c888c6475f8c72bee0c03.tar.gz gcc-b69945d511b394ef092c888c6475f8c72bee0c03.tar.bz2 |
PR modula2/119504: ICE when attempting to access an element of a constant string
This patch prevents an ICE and generates an error if an array access to a
constant string is attempted. The patch also allows HIGH ("string").
gcc/m2/ChangeLog:
PR modula2/119504
* gm2-compiler/M2Quads.mod (BuildHighFunction): Defend against
Type = NulSym and fall into BuildConstHighFromSym.
(BuildDesignatorArray): Rewrite to detect an array access to
a constant string.
(BuildDesignatorArrayStaticDynamic): New procedure.
gcc/testsuite/ChangeLog:
PR modula2/119504
* gm2/iso/fail/conststrarray2.mod: New test.
* gm2/iso/run/pass/constarray2.mod: New test.
* gm2/pim/pass/hexstring.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions