diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2024-03-14 11:23:42 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2024-03-14 11:23:42 +0000 |
commit | b7f70cfdb6f7ab369ecca14a99a0064d2a11ddd2 (patch) | |
tree | b61a26fb86444cf55c83ab48a79cd7efac603387 /ar-lib | |
parent | ddf852dac2abaca317c10b8323f338123b0585c8 (diff) | |
download | gcc-b7f70cfdb6f7ab369ecca14a99a0064d2a11ddd2.zip gcc-b7f70cfdb6f7ab369ecca14a99a0064d2a11ddd2.tar.gz gcc-b7f70cfdb6f7ab369ecca14a99a0064d2a11ddd2.tar.bz2 |
PR modula2/114333 set type comparison against a cardinal should cause an error
The type checker M2Check.mod needs extending to detect if a set, array or
record is in either operand at the end of the cascaded test list.
gcc/m2/ChangeLog:
PR modula2/114333
* gm2-compiler/M2Check.mod (checkUnbounded): New procedure
function.
(checkArrayTypeEquivalence): Extend checking to cover unbounded
arrays, arrays and constants.
(IsTyped): Simplified the expression and corrected a test for
IsConstructor.
(checkTypeKindViolation): New procedure function.
(doCheckPair): Call checkTypeKindViolation.
* gm2-compiler/M2GenGCC.mod (CodeStatement): Remove parameters
to CodeEqu and CodeNotEqu.
(PerformCodeIfEqu): New procedure.
(CodeIfEqu): Rewrite.
(PerformCodeIfNotEqu): New procedure.
(CodeIfNotEqu): Rewrite.
* gm2-compiler/M2Quads.mod (BuildRelOpFromBoolean): Correct
comment.
gcc/testsuite/ChangeLog:
PR modula2/114333
* gm2/cse/pass/testcse54.mod: New test.
* gm2/iso/run/pass/array9.mod: New test.
* gm2/iso/run/pass/strcons3.mod: New test.
* gm2/iso/run/pass/strcons4.mod: New test.
* gm2/pim/fail/badset1.mod: New test.
* gm2/pim/fail/badset2.mod: New test.
* gm2/pim/fail/badset3.mod: New test.
* gm2/pim/fail/badset4.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'ar-lib')
0 files changed, 0 insertions, 0 deletions