aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2024-03-11 15:21:42 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2024-03-11 15:21:42 +0000
commit8410402272038aae7e4b2bd76df38607a78cad95 (patch)
treeec575c9ca17829a63583aaf39a2250af5059a05c /gcc/tree-vect-loop.cc
parent4e1fcf44bdc582e71408175d75e025f5be8b0e55 (diff)
downloadgcc-8410402272038aae7e4b2bd76df38607a78cad95.zip
gcc-8410402272038aae7e4b2bd76df38607a78cad95.tar.gz
gcc-8410402272038aae7e4b2bd76df38607a78cad95.tar.bz2
PR modula2/114295 Incorrect location if compiling implementation without definition
This patch fixes a bug which occurred if gm2 was asked to compile an implementation module and could not find the definition module. The error location would be set to the SYSTEM module. The bug occurred as the module sym was created during the peep phase after which the few tokens are destroyed and recreated during parsing. The bug fix is to call PutDeclared when the module is encountered during parsing which updates the tokenno associated with the module. gcc/m2/ChangeLog: PR modula2/114295 * gm2-compiler/M2Batch.mod (MakeProgramSource): Call PutDeclared if the module is known. (MakeDefinitionSource): Ditto. (MakeImplementationSource): Ditto. * gm2-compiler/M2Comp.mod (ExamineHeader): New procedure. (ExamineCompilationUnit): Rewrite. (PeepInto): Rewrite. * gm2-compiler/M2Error.mod (NewError): Remove default call to GetTokenNo. * gm2-compiler/M2Quads.mod (callRequestDependant): Push tokno with Adr. (BuildStringAdrParam): Ditto. (doBuildBinaryOp): Push OperatorPos on the bool stack. (BuildRelOp): Ditto. * gm2-compiler/P2Build.bnf (SetType): Pass set token pos to BuildSetType. (PointerType): Pass pointer token pos to BuildPointerType. * gm2-compiler/P2SymBuild.def (BuildPointerType): Add parameter pointerpos. (BuildSetType): Add parameter setpos. * gm2-compiler/P2SymBuild.mod (BuildPointerType): Add parameter pointerpos. Build combined token and use it when creating a pointer type. (BuildSetType): Add parameter setpos. Build combined token and use it when creating a set type. * gm2-compiler/SymbolTable.mod (DebugUnknownToken): New constant. (CheckTok): New procedure function. (MakeProcedure): Call CheckTok. (MakeRecord): Ditto. (MakeVarient): Ditto. (MakeEnumeration): Ditto. (MakeHiddenType): Ditto. (MakeConstant): Ditto. (MakeConstStringCnul): Ditto. (MakeSubrange): Ditto. (MakeTemporary): Ditto. (MakeVariableForParam): Ditto. (MakeParameterHeapVar): Ditto. (MakePointer): Ditto. (MakeSet): Ditto. (MakeUnbounded): Ditto. (MakeProcType): Ditto. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions