aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-12-07 13:10:49 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2023-12-07 13:10:49 +0000
commitf8c8aebc597611b8d37edce165a891d00e23a9c1 (patch)
tree095ac9e84fa1beb397633e9e3720662dea308258 /gcc/testsuite/c-c++-common
parentabded9bf3e1ebc1789d47ac2c445f5b613981a0e (diff)
downloadgcc-f8c8aebc597611b8d37edce165a891d00e23a9c1.zip
gcc-f8c8aebc597611b8d37edce165a891d00e23a9c1.tar.gz
gcc-f8c8aebc597611b8d37edce165a891d00e23a9c1.tar.bz2
PR modula2/112893 detect procedure address incompatible with cardinal in iso
In ISO m2 the type cardinal is assignment incompatible with address (but it is allowed in PIM). The patch also extends the type checker to include procedures (which appear as having GetType () = address). At some point this should be be improved to use a pointer to proc type. Perhaps in the next stage1. For now this will catch procedures being passed as actual parameters into a formal cardinal parameter in ISO m2 (for example). gcc/m2/ChangeLog: PR modula2/112893 * gm2-compiler/M2Base.mod (Ass): Extend array to include proc row and column. Allow PIM to assign cardinal variables to address variables. (Expr): Ditto. (Comp): Ditto. * gm2-compiler/M2Check.mod (getSType): New procedure function. Replace all occurances of GetSType with getSType. * gm2-compiler/M2GenGCC.mod (CodeParam): Rewrite format specifier error message. * gm2-compiler/M2Quads.mod (CheckProcTypeAndProcedure): Add tokno parameter. * gm2-compiler/M2Range.def (InitTypesParameterCheck): Add tokno parameter. (InitParameterRangeCheck): Add tokno parameter. Remove EXPORT QUALIFIED list. (InitParameterRangeCheck): Add tokno parameter. * gm2-compiler/M2Range.mod (InitTypesParameterCheck): Add tokno parameter and pass tokno to PutRangeParam. (InitParameterRangeCheck): Add tokno parameter and pass tokno to PutRangeParam. (PutRangeParam): Add tokno parameter and assign to tokenNo. (FoldTypeParam): Rewrite format string. gcc/testsuite/ChangeLog: PR modula2/112893 * gm2/iso/fail/proccard.mod: New test. * gm2/pim/pass/proccard.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/testsuite/c-c++-common')
0 files changed, 0 insertions, 0 deletions