aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2024-04-20 14:35:18 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2024-04-20 14:35:18 +0100
commitf9a48fe7032d9894e88d0d121ba6f75b08ea5dcb (patch)
tree3ae1fa24d2c2d684382135ed2200d6836017e9fb /libgcc
parent1690e47e101c1e273b1ee052de21d5214257c13a (diff)
downloadgcc-f9a48fe7032d9894e88d0d121ba6f75b08ea5dcb.zip
gcc-f9a48fe7032d9894e88d0d121ba6f75b08ea5dcb.tar.gz
gcc-f9a48fe7032d9894e88d0d121ba6f75b08ea5dcb.tar.bz2
PR modula2/112893 full type checking between proctype and procedure not implemented
This patch implements full type checking between proctype and procedures. The change implements an associated proc type built for each procedure. M2Check.mod will request GetProcedureProcType if it encounters a procedure. Before this patch a procedure was associated with the type ADDRESS in the type checking module M2Check. The gm2/pim/pass/proccard.mod have been corrected now this assumption has been removed. gcc/m2/ChangeLog: PR modula2/112893 * gm2-compiler/M2Check.mod (GetProcedureProcType): Import. (getType): Return value using GetProcedureProcType if sym is a procedure. * gm2-compiler/M2Range.mod (FoldTypeExpr): Remove quad if expression is type compatible. * gm2-compiler/SymbolTable.def (GetProcedureProcType): New procedure function. * gm2-compiler/SymbolTable.mod (Procedure): Add ProcedureType. (MakeProcedure): Initialize ProcedureType. (PutParam): Call AddProcedureProcTypeParam. (PutVarParam): Call AddProcedureProcTypeParam. (AddProcedureProcTypeParam): New procedure. (GetProcedureProcType): New procedure function. gcc/testsuite/ChangeLog: PR modula2/112893 * gm2/pim/pass/another.mod: Correct bug exposed by type checker. Swap ProcA and ProcB assignments. * gm2/pim/pass/proccard.mod: Use VAL to convert procedure into a cardinal. * gm2/iso/const/fail/castproctype.mod: New test. * gm2/pim/fail/badproctype.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions