aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-12-15 15:26:48 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-12-15 15:26:48 +0000
commit7d7a480eedf0a195318d0fce2c9c57acae43ec9d (patch)
tree927f95856a7b450077c75d2f4bebce0f9d9193c6 /libphobos
parentea7bebff7cc5a5eb780a6ca646cb77cad1b625d6 (diff)
downloadgcc-7d7a480eedf0a195318d0fce2c9c57acae43ec9d.zip
gcc-7d7a480eedf0a195318d0fce2c9c57acae43ec9d.tar.gz
gcc-7d7a480eedf0a195318d0fce2c9c57acae43ec9d.tar.bz2
PR modula2/112946 ICE assignment of string to enumeration or set
This patch introduces type checking during FoldBecomes and also adds set/string/enum checking to the type checker. FoldBecomes has been re-written, tidied up and re-factored. gcc/m2/ChangeLog: PR modula2/112946 * gm2-compiler/M2Check.mod (checkConstMeta): New procedure function. (checkConstEquivalence): New procedure function. (doCheckPair): Add call to checkConstEquivalence. * gm2-compiler/M2GenGCC.mod (ResolveConstantExpressions): Call FoldBecomes with reduced parameters. (FoldBecomes): Re-write. (TryDeclareConst): New procedure. (RemoveQuads): New procedure. (DeclaredOperandsBecomes): New procedure function. (TypeCheckBecomes): New procedure function. (PerformFoldBecomes): New procedure. * gm2-compiler/M2Range.mod (FoldAssignment): Call AssignmentTypeCompatible to check des expr compatibility. * gm2-compiler/M2SymInit.mod (CheckReadBeforeInitQuad): Remove parameter lst. (FilterCheckReadBeforeInitQuad): Remove parameter lst. (CheckReadBeforeInitFirstBasicBlock): Remove parameter lst. Call FilterCheckReadBeforeInitQuad without lst. gcc/testsuite/ChangeLog: PR modula2/112946 * gm2/iso/fail/badassignment.mod: New test. * gm2/iso/fail/badexpression.mod: New test. * gm2/iso/fail/badexpression2.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions