]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH] PR modula2/121164: Modula 2 build failure followup
authorGaius Mulley <gaiusmod2@gmail.com>
Sat, 26 Jul 2025 12:19:29 +0000 (13:19 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Sat, 26 Jul 2025 12:19:29 +0000 (13:19 +0100)
This is a followup patch for PR modula2/121164 to
fix the location for the error message attributed to cc1gm2.
The Patch has been cherry picked, but without the forced -Wall option
in libgm2.

gcc/m2/ChangeLog:

PR modula2/121164
* gm2-compiler/P1SymBuild.mod: Remove PutProcTypeParam.
Remove PutProcTypeParam.
(CheckFileName): Remove.
(P1EndBuildDefinitionModule): Correct spelling.
(P1EndBuildImplementationModule): Ditto.
(P1EndBuildProgramModule): Ditto.
(EndBuildInnerModule): Ditto.
* gm2-compiler/P2SymBuild.mod (P2EndBuildDefModule): Correct
spelling.
(P2EndBuildImplementationModule): Ditto.
(P2EndBuildProgramModule): Ditto.
(EndBuildInnerModule): Ditto.
(CheckFormalParameterSection): Ditto.
* gm2-compiler/P3SymBuild.mod (P3EndBuildDefModule): Ditto.
* gm2-compiler/PCSymBuild.mod (PCEndBuildDefModule): Ditto.
(fixupProcedureType): Pass tok to PutProcTypeVarParam.
Pass tok to PutProcTypeParam.
* gm2-compiler/SymbolTable.def (PutProcTypeParam): Add tok
parameter.
(PutProcTypeVarParam): Ditto.
* gm2-compiler/SymbolTable.mod (SymParam): At change type to
CARDINAL.
New field FullTok.
New field Scope.
(SymVarParam): At change type to CARDINAL.
New field FullTok.
New field Scope.
(GetVarDeclTok): Check ShadowVar for NulSym and return At.
(PutParam): Initialize FullTok.
Initialize At.
Initialize Scope.
(PutVarParam): Initialize FullTok.
Assign At.
Initialize Scope.
(AddProcedureProcTypeParam): Add tok parameter.
(GetScope): Add ParamSym and VarParamSym clause.
(PutProcTypeVarParam): Add tok parameter.
Initialize At.
Initialize FullTok.
(GetDeclaredDefinition): Clause ParamSym return At.
Clause VarParamSym return At.
(GetDeclaredModule): Ditto.
(PutDeclaredDefinition): Remove clause ParamSym.
Remove clause VarParamSym.
(PutDeclaredModule): Remove clause ParamSym.
Remove clause VarParamSym.

gcc/testsuite/ChangeLog:

PR modula2/121164
* gm2/switches/pedantic-params/fail/arrayofchar.def: New test.
* gm2/switches/pedantic-params/fail/arrayofchar.mod: New test.

(cherry picked from commit ab5a89c0b4f1ead202dee072e16690607b810111)

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/P1SymBuild.mod
gcc/m2/gm2-compiler/P2SymBuild.mod
gcc/m2/gm2-compiler/P3SymBuild.mod
gcc/m2/gm2-compiler/PCSymBuild.mod
gcc/m2/gm2-compiler/SymbolTable.def
gcc/m2/gm2-compiler/SymbolTable.mod
gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.def [new file with mode: 0644]
gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.mod [new file with mode: 0644]

index 02d4ac7f75147d97268fa6161b8c8d68b30f22e6..08a0fc3f9eb0599daee2442498d53dbefcd30aae 100644 (file)
@@ -79,7 +79,6 @@ FROM SymbolTable IMPORT NulSym,
                         MakeSubscript, PutSubscript,
                         PutArray, GetType, IsArray,
                         IsProcType, MakeProcType,
-                        PutProcTypeVarParam, PutProcTypeParam,
                         PutProcedureBuiltin, PutProcedureInline,
                         GetSymName,
                         ResolveImports, PutDeclared,
@@ -108,42 +107,6 @@ VAR
    importStatementCount: CARDINAL ;
 
 
-(*
-   CheckFileName - checks to see that the module name matches the file name.
-*)
-
-(*
-PROCEDURE CheckFileName (tok: CARDINAL; name: Name; ModuleType: ARRAY OF CHAR) ;
-VAR
-   ext,
-   basename: INTEGER ;
-   s,
-   FileName: String ;
-BEGIN
-   FileName := GetFileName() ;
-   basename := RIndex(FileName, '/', 0) ;
-   IF basename=-1
-   THEN
-      basename := 0
-   END ;
-   ext := RIndex(FileName, '.', 0) ;
-   IF ext=-1
-   THEN
-      ext := 0
-   END ;
-   FileName := Slice(FileName, basename, ext) ;
-   IF EqualCharStar(FileName, KeyToCharStar(name))
-   THEN
-      FileName := KillString(FileName)
-   ELSE
-      s := ConCat (InitString (ModuleType),
-                   Mark (InitString (" module name {%1Ea} is inconsistant with the filename {%F{%2a}}"))) ;
-      MetaErrorString2 (s, MakeError (tok, name), MakeErrorS (tok, FileName))
-   END
-END CheckFileName ;
-*)
-
-
 (*
    StartBuildDefinitionModule - Creates a definition module and starts
                                 a new scope.
@@ -227,7 +190,7 @@ BEGIN
    END ;
    IF NameStart#NameEnd
    THEN
-      MetaError1 ('inconsistant definition module name {%1Wa}', MakeError (start, NameStart))
+      MetaError1 ('inconsistent definition module name {%1Wa}', MakeError (start, NameStart))
    END ;
    LeaveBlock
 END P1EndBuildDefinitionModule ;
@@ -301,7 +264,7 @@ BEGIN
    IF NameStart#NameEnd
    THEN
       MetaErrorT1 (end,
-                   'inconsistant implementation module name {%1Wa}', MakeError (start, NameStart))
+                   'inconsistent implementation module name {%1Wa}', MakeError (start, NameStart))
    END ;
    LeaveBlock
 END P1EndBuildImplementationModule ;
@@ -381,7 +344,7 @@ BEGIN
    IF NameStart#NameEnd
    THEN
       MetaErrorT1 (end,
-                   'inconsistant program module name {%1Wa}', MakeError (start, NameStart))
+                   'inconsistent program module name {%1Wa}', MakeError (start, NameStart))
    END ;
    LeaveBlock
 END P1EndBuildProgramModule ;
@@ -446,7 +409,7 @@ BEGIN
    IF NameStart#NameEnd
    THEN
       MetaErrorT1 (end,
-                   'inconsistant inner module name {%1Wa}', MakeError (start, NameStart))
+                   'inconsistent inner module name {%1Wa}', MakeError (start, NameStart))
    END ;
    LeaveBlock
 END EndBuildInnerModule ;
index 5c82ec8ede059122143f55198e4681fe601eae48..3bb3e4741d2831721084e0e5b7df56c431c08a3d 100644 (file)
@@ -356,7 +356,7 @@ BEGIN
    END ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat2('inconsistant definition module name, module began as (%a) and ended with (%a)', NameStart, NameEnd)
+      WriteFormat2('inconsistent definition module name, module began as (%a) and ended with (%a)', NameStart, NameEnd)
    END ;
    M2Error.LeaveErrorScope
 END P2EndBuildDefModule ;
@@ -425,7 +425,7 @@ BEGIN
    PopT (NameEnd) ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat1('inconsistant implementation module name %a', NameStart)
+      WriteFormat1('inconsistent implementation module name %a', NameStart)
    END ;
    M2Error.LeaveErrorScope
 END P2EndBuildImplementationModule ;
@@ -499,7 +499,7 @@ BEGIN
    END ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat2('inconsistant program module name %a does not match %a', NameStart, NameEnd)
+      WriteFormat2('inconsistent program module name %a does not match %a', NameStart, NameEnd)
    END ;
    M2Error.LeaveErrorScope
 END P2EndBuildProgramModule ;
@@ -564,7 +564,7 @@ BEGIN
    PopT(NameEnd) ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat2('inconsistant inner module name %a does not match %a',
+      WriteFormat2('inconsistent inner module name %a does not match %a',
                    NameStart, NameEnd)
    END ;
    M2Error.LeaveErrorScope
@@ -1835,13 +1835,13 @@ BEGIN
          (* WarnStringAt (InitString ('parampos?'), OperandTok (pi)) ;  *)
          IF Unbounded AND (NOT IsUnboundedParam (ProcSym, prevkind, ParamTotal+i))
          THEN
-            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                             'the parameter {%3EHa} was not declared as an ARRAY OF type',
                             'the parameter {%3EVa} was declared as an ARRAY OF type',
                             ParamTotal+i, ProcSym, curkind, prevkind)
          ELSIF (NOT Unbounded) AND IsUnboundedParam (ProcSym, prevkind, ParamTotal+i)
          THEN
-            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                             'the parameter {%3EHa} was declared as an ARRAY OF type',
                             'the parameter {%3EVa} was not declared as an ARRAY OF type',
                             ParamTotal+i, ProcSym, curkind, prevkind)
@@ -1850,7 +1850,7 @@ BEGIN
          THEN
             IF GetDimension (GetNthParam (ProcSym, prevkind, ParamTotal+1)) # ndim
             THEN
-               ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+               ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                                'the dynamic array parameter {%3EHa} was declared with a different of dimensions',
                                'the dynamic array parameter {%3EVa} was declared with a different of dimensions',
                                ParamTotal+i, ProcSym, curkind, prevkind)
@@ -1859,14 +1859,14 @@ BEGIN
          IF isVarParam AND (NOT IsVarParam (ProcSym, prevkind, ParamTotal+i))
          THEN
             (* Expecting non VAR parameter.  *)
-            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                             '{%3EHa} was not declared as a {%kVAR} parameter',
                             '{%3EVa} was declared as a {%kVAR} parameter',
                             ParamTotal+i, ProcSym, curkind, prevkind)
          ELSIF (NOT isVarParam) AND IsVarParam (ProcSym, prevkind, ParamTotal+i)
          THEN
             (* Expecting VAR pamarater.  *)
-            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+            ParameterError ('declaration of procedure {%%1a} in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                             '{%3EHa} was declared as a {%kVAR} parameter',
                             '{%3EVa} was not declared as a {%kVAR} parameter',
                             ParamTotal+i, ProcSym, curkind, prevkind)
@@ -1877,7 +1877,7 @@ BEGIN
             IF GetSymName (ParamI) # OperandT (pi)
             THEN
                (* Different parameter names.  *)
-               ParameterError ('procedure {%%1a} in the %s differs from the %s, {%%2N} parameter name is inconsistant, %s',
+               ParameterError ('procedure {%%1a} in the %s differs from the %s, {%%2N} parameter name is inconsistent, %s',
                             'named as {%3EVa}',
                             'named as {%3EVa}',
                             ParamTotal+i, ProcSym, curkind, prevkind)
@@ -1897,7 +1897,7 @@ BEGIN
             (NOT IsUnknown(SkipType(ParamIType)))
          THEN
             (* Different parameter types.  *)
-            ParameterError ('declaration in the %s differs from the %s, {%%2N} parameter is inconsistant, %s',
+            ParameterError ('declaration in the %s differs from the %s, {%%2N} parameter is inconsistent, %s',
                             'the parameter {%3EHa} was declared with a different type',
                             'the parameter {%3EVa} was declared with a different type',
                             ParamTotal+i, ProcSym, curkind, prevkind)
@@ -3072,10 +3072,10 @@ BEGIN
    IF Var=VarTok
    THEN
       (* VAR parameter *)
-      PutProcTypeVarParam(ProcTypeSym, TypeSym, IsUnbounded(TypeSym))
+      PutProcTypeVarParam (tok, ProcTypeSym, TypeSym, IsUnbounded (TypeSym))
    ELSE
       (* Non VAR parameter *)
-      PutProcTypeParam(ProcTypeSym, TypeSym, IsUnbounded(TypeSym))
+      PutProcTypeParam (tok, ProcTypeSym, TypeSym, IsUnbounded (TypeSym))
    END ;
    PushT(ProcTypeSym) ;
    Annotate("%1s(%1d)||proc type")
index c4877f732e5ce0c43b2e30bb614715b9a8445df1..096057eb4979b5ca1d1de4f8fe64a03b92736797 100644 (file)
@@ -126,7 +126,7 @@ BEGIN
    PopT(NameStart) ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat2('inconsistant definition module was named (%a) and concluded as (%a)',
+      WriteFormat2('inconsistent definition module was named (%a) and concluded as (%a)',
                    NameStart, NameEnd)
    END ;
    M2Error.LeaveErrorScope
index 3bffe8674a4fdaae8bb5d64cb250fc170750e00b..4db2730ce5c603080d61b4b15eb6e628fc9d8ba3 100644 (file)
@@ -269,7 +269,7 @@ BEGIN
    PopT(NameStart) ;
    IF NameStart#NameEnd
    THEN
-      WriteFormat2('inconsistant definition module was named (%a) and concluded as (%a)',
+      WriteFormat2('inconsistent definition module was named (%a) and concluded as (%a)',
                    NameStart, NameEnd)
    END ;
    M2Error.LeaveErrorScope
@@ -1168,9 +1168,9 @@ BEGIN
          par := GetParam (p, i) ;
          IF IsParameterVar (par)
          THEN
-            PutProcTypeVarParam (t, GetType (par), IsParameterUnbounded (par))
+            PutProcTypeVarParam (tok, t, GetType (par), IsParameterUnbounded (par))
          ELSE
-            PutProcTypeParam (t, GetType (par), IsParameterUnbounded (par))
+            PutProcTypeParam (tok, t, GetType (par), IsParameterUnbounded (par))
          END ;
          INC(i)
       END ;
index 2a9865add94a3bced753688a2542f4dd44a59d13..5b93f2923811c16b87d89f6748a525301d527dfc 100644 (file)
@@ -2650,7 +2650,8 @@ PROCEDURE MakeProcType (tok: CARDINAL; ProcTypeName: Name) : CARDINAL ;
                       ParamType into ProcType Sym.
 *)
 
-PROCEDURE PutProcTypeParam (Sym: CARDINAL;
+PROCEDURE PutProcTypeParam (tok: CARDINAL;
+                            Sym: CARDINAL;
                             ParamType: CARDINAL; isUnbounded: BOOLEAN) ;
 
 
@@ -2659,7 +2660,8 @@ PROCEDURE PutProcTypeParam (Sym: CARDINAL;
                          ParamType into ProcType Sym.
 *)
 
-PROCEDURE PutProcTypeVarParam (Sym: CARDINAL;
+PROCEDURE PutProcTypeVarParam (tok: CARDINAL;
+                               Sym: CARDINAL;
                                ParamType: CARDINAL; isUnbounded: BOOLEAN) ;
 
 
index ff661dcf4e7e299e1e97ee841f93b239ffc957d1..00946e52b2ed16d5c85024fe1cdec0d8e6a80a92 100644 (file)
@@ -463,9 +463,11 @@ TYPE
                                               (* of param.                   *)
                  Type          : CARDINAL ;   (* Index to the type of param. *)
                  IsUnbounded   : BOOLEAN ;    (* Is it an ARRAY OF Type?     *)
+                 Scope         : CARDINAL ;   (* Procedure declaration.      *)
                  ShadowVar     : CARDINAL ;   (* The local variable used to  *)
                                               (* shadow this parameter.      *)
-                 At            : Where ;      (* Where was sym declared/used *)
+                 FullTok,                     (* name: type virtual token.   *)
+                 At            : CARDINAL ;   (* Where was sym declared.     *)
               END ;
 
    SymVarParam = RECORD
@@ -476,9 +478,11 @@ TYPE
                     HeapVar       : CARDINAL ;(* The pointer value on heap.  *)
                                               (* Only used by static         *)
                                               (* analysis.                   *)
+                    Scope         : CARDINAL ;(* Procedure declaration.      *)
                     ShadowVar     : CARDINAL ;(* The local variable used to  *)
                                               (* shadow this parameter.      *)
-                    At            : Where ;   (* Where was sym declared/used *)
+                    FullTok,                  (* name: type virtual token.   *)
+                    At            : CARDINAL ;(* Where was sym declared.     *)
                  END ;
 
    ConstStringVariant = (m2str, cstr, m2nulstr, cnulstr) ;
@@ -4456,9 +4460,19 @@ BEGIN
       pSym := GetPsym (sym) ;
       IF IsParameterVar (sym)
       THEN
-         RETURN GetVarDeclTok (pSym^.VarParam.ShadowVar)
+         IF pSym^.VarParam.ShadowVar = NulSym
+         THEN
+            RETURN pSym^.VarParam.At
+         ELSE
+            RETURN GetVarDeclTok (pSym^.VarParam.ShadowVar)
+         END
       ELSE
-         RETURN GetVarDeclTok (pSym^.Param.ShadowVar)
+         IF pSym^.Param.ShadowVar = NulSym
+         THEN
+            RETURN pSym^.Param.At
+         ELSE
+            RETURN GetVarDeclTok (pSym^.Param.ShadowVar)
+         END
       END
    ELSIF IsVar (sym)
    THEN
@@ -4549,9 +4563,9 @@ BEGIN
    THEN
       IF IsParameterVar (sym)
       THEN
-         RETURN GetVarDeclFullTok (pSym^.VarParam.ShadowVar)
+         RETURN pSym^.VarParam.FullTok
       ELSE
-         RETURN GetVarDeclFullTok (pSym^.Param.ShadowVar)
+         RETURN pSym^.Param.FullTok
       END
    ELSIF IsVar (sym)
    THEN
@@ -10651,8 +10665,10 @@ BEGIN
             name := ParamName ;
             Type := ParamType ;
             IsUnbounded := isUnbounded ;
+            Scope := Sym ;
             ShadowVar := NulSym ;
-            InitWhereDeclaredTok(tok, At)
+            FullTok := MakeVirtual2Tok (tok, typetok) ;
+            At := tok
          END
       END ;
       AddParameter (Sym, kind, ParSym) ;
@@ -10671,7 +10687,7 @@ BEGIN
             pSym^.Param.ShadowVar := VariableSym
          END
       END ;
-      AddProcedureProcTypeParam (Sym, ParamType, isUnbounded, FALSE)
+      AddProcedureProcTypeParam (tok, Sym, ParamType, isUnbounded, FALSE)
    END ;
    RETURN( TRUE )
 END PutParam ;
@@ -10708,9 +10724,11 @@ BEGIN
             name := ParamName ;
             Type := ParamType ;
             IsUnbounded := isUnbounded ;
+            Scope := Sym ;
             ShadowVar := NulSym ;
             HeapVar := NulSym ;  (* Will contain a pointer value.  *)
-            InitWhereDeclaredTok(tok, At)
+            FullTok := MakeVirtual2Tok (tok, typetok) ;
+            At := tok
          END
       END ;
       AddParameter (Sym, kind, ParSym) ;
@@ -10729,7 +10747,7 @@ BEGIN
             pSym^.VarParam.ShadowVar := VariableSym
          END
       END ;
-      AddProcedureProcTypeParam (Sym, ParamType, isUnbounded, TRUE)
+      AddProcedureProcTypeParam (tok, Sym, ParamType, isUnbounded, TRUE)
    END ;
    RETURN( TRUE )
 END PutVarParam ;
@@ -10816,7 +10834,8 @@ END AddParameter ;
                                associated with procedure Sym.
 *)
 
-PROCEDURE AddProcedureProcTypeParam (Sym, ParamType: CARDINAL;
+PROCEDURE AddProcedureProcTypeParam (tok: CARDINAL;
+                                     Sym, ParamType: CARDINAL;
                                      isUnbounded, isVarParam: BOOLEAN) ;
 VAR
    pSym: PtrToSymbol ;
@@ -10829,10 +10848,12 @@ BEGIN
                     THEN
                        IF isVarParam
                        THEN
-                          PutProcTypeVarParam (Procedure.ProcedureType,
+                          PutProcTypeVarParam (tok,
+                                               Procedure.ProcedureType,
                                                ParamType, isUnbounded)
                        ELSE
-                          PutProcTypeParam (Procedure.ProcedureType,
+                          PutProcTypeParam (tok,
+                                            Procedure.ProcedureType,
                                             ParamType, isUnbounded)
                        END
                     END
@@ -13027,18 +13048,8 @@ BEGIN
       ConstLitSym        : RETURN( ConstLit.Scope ) |
       ConstStringSym     : RETURN( ConstString.Scope ) |
       ConstVarSym        : RETURN( ConstVar.Scope ) |
-      ParamSym           : IF Param.ShadowVar = NulSym
-                           THEN
-                              RETURN NulSym
-                           ELSE
-                              RETURN( GetScope (Param.ShadowVar) )
-                           END |
-      VarParamSym        : IF VarParam.ShadowVar = NulSym
-                           THEN
-                              RETURN NulSym
-                           ELSE
-                              RETURN( GetScope (VarParam.ShadowVar) )
-                           END |
+      ParamSym           : RETURN( Param.Scope ) |
+      VarParamSym        : RETURN( VarParam.Scope ) |
       UndefinedSym       : RETURN( NulSym ) |
       PartialUnboundedSym: InternalError ('should not be requesting the scope of a PartialUnbounded symbol')
 
@@ -13186,7 +13197,8 @@ END MakeProcType ;
                       ParamType into ProcType Sym.
 *)
 
-PROCEDURE PutProcTypeParam (Sym: CARDINAL;
+PROCEDURE PutProcTypeParam (tok: CARDINAL;
+                            Sym: CARDINAL;
                             ParamType: CARDINAL; isUnbounded: BOOLEAN) ;
 VAR
    pSym  : PtrToSymbol ;
@@ -13201,7 +13213,8 @@ BEGIN
          Type := ParamType ;
          IsUnbounded := isUnbounded ;
          ShadowVar := NulSym ;
-         InitWhereDeclared(At)
+         FullTok := tok ;
+         At := tok
       END
    END ;
    AddParameter (Sym, ProperProcedure, ParSym)
@@ -13213,7 +13226,8 @@ END PutProcTypeParam ;
                          ParamType into ProcType Sym.
 *)
 
-PROCEDURE PutProcTypeVarParam (Sym: CARDINAL;
+PROCEDURE PutProcTypeVarParam (tok: CARDINAL;
+                               Sym: CARDINAL;
                                ParamType: CARDINAL; isUnbounded: BOOLEAN) ;
 VAR
    pSym  : PtrToSymbol ;
@@ -13228,7 +13242,8 @@ BEGIN
          Type := ParamType ;
          IsUnbounded := isUnbounded ;
          ShadowVar := NulSym ;
-         InitWhereDeclared(At)
+         FullTok := tok ;
+         At := tok
       END
    END ;
    AddParameter (Sym, ProperProcedure, ParSym)
@@ -13918,8 +13933,8 @@ BEGIN
       UnboundedSym       : RETURN( Unbounded.At.DefDeclared ) |
       ProcedureSym       : RETURN( Procedure.At.DefDeclared ) |
       ProcTypeSym        : RETURN( ProcType.At.DefDeclared ) |
-      ParamSym           : RETURN( Param.At.DefDeclared ) |
-      VarParamSym        : RETURN( VarParam.At.DefDeclared ) |
+      ParamSym           : RETURN( Param.At ) |
+      VarParamSym        : RETURN( VarParam.At ) |
       ConstStringSym     : RETURN( ConstString.At.DefDeclared ) |
       ConstLitSym        : RETURN( ConstLit.At.DefDeclared ) |
       ConstVarSym        : RETURN( ConstVar.At.DefDeclared ) |
@@ -13968,8 +13983,8 @@ BEGIN
       UnboundedSym       : RETURN( Unbounded.At.ModDeclared ) |
       ProcedureSym       : RETURN( Procedure.At.ModDeclared ) |
       ProcTypeSym        : RETURN( ProcType.At.ModDeclared ) |
-      ParamSym           : RETURN( Param.At.ModDeclared ) |
-      VarParamSym        : RETURN( VarParam.At.ModDeclared ) |
+      ParamSym           : RETURN( Param.At ) |
+      VarParamSym        : RETURN( VarParam.At ) |
       ConstStringSym     : RETURN( ConstString.At.ModDeclared ) |
       ConstLitSym        : RETURN( ConstLit.At.ModDeclared ) |
       ConstVarSym        : RETURN( ConstVar.At.ModDeclared ) |
@@ -14019,8 +14034,6 @@ BEGIN
       UnboundedSym       : Unbounded.At.DefDeclared := tok |
       ProcedureSym       : Procedure.At.DefDeclared := tok |
       ProcTypeSym        : ProcType.At.DefDeclared := tok |
-      ParamSym           : Param.At.DefDeclared := tok |
-      VarParamSym        : VarParam.At.DefDeclared := tok |
       ConstStringSym     : ConstString.At.DefDeclared := tok |
       ConstLitSym        : ConstLit.At.DefDeclared := tok |
       ConstVarSym        : ConstVar.At.DefDeclared := tok |
@@ -14067,8 +14080,6 @@ BEGIN
       UnboundedSym       : Unbounded.At.ModDeclared := tok |
       ProcedureSym       : Procedure.At.ModDeclared := tok |
       ProcTypeSym        : ProcType.At.ModDeclared := tok |
-      ParamSym           : Param.At.ModDeclared := tok |
-      VarParamSym        : VarParam.At.ModDeclared := tok |
       ConstStringSym     : ConstString.At.ModDeclared := tok |
       ConstLitSym        : ConstLit.At.ModDeclared := tok |
       ConstVarSym        : ConstVar.At.ModDeclared := tok |
@@ -14323,8 +14334,10 @@ BEGIN
       UnboundedSym       : RETURN( Unbounded.At.FirstUsed ) |
       ProcedureSym       : RETURN( Procedure.At.FirstUsed ) |
       ProcTypeSym        : RETURN( ProcType.At.FirstUsed ) |
+      (*
       ParamSym           : RETURN( Param.At.FirstUsed ) |
       VarParamSym        : RETURN( VarParam.At.FirstUsed ) |
+      *)
       ConstStringSym     : RETURN( ConstString.At.FirstUsed ) |
       ConstLitSym        : RETURN( ConstLit.At.FirstUsed ) |
       ConstVarSym        : RETURN( ConstVar.At.FirstUsed ) |
diff --git a/gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.def b/gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.def
new file mode 100644 (file)
index 0000000..a24f7d3
--- /dev/null
@@ -0,0 +1,12 @@
+DEFINITION MODULE arrayofchar ;
+
+FROM FIO IMPORT File ;
+
+(*
+   Description: provides write procedures for ARRAY OF CHAR.
+*)
+
+PROCEDURE Write (f: File; str: ARRAY OF CHAR) ;
+PROCEDURE WriteLn (f: File) ;
+
+END arrayofchar.
diff --git a/gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.mod b/gcc/testsuite/gm2/switches/pedantic-params/fail/arrayofchar.mod
new file mode 100644 (file)
index 0000000..4e630a9
--- /dev/null
@@ -0,0 +1,30 @@
+IMPLEMENTATION MODULE arrayofchar ;
+
+FROM FIO IMPORT WriteChar, WriteLine ;
+IMPORT StrLib ;
+
+
+(*
+   Write - writes a string to file f.
+*)
+
+PROCEDURE Write (f: File; a: ARRAY OF CHAR) ;
+VAR
+   len, i: CARDINAL ;
+BEGIN
+   len := StrLib.StrLen (a) ;
+   i := 0 ;
+   WHILE i < len DO
+      WriteChar (f, a[i]) ;
+      INC (i)
+   END
+END Write ;
+
+
+PROCEDURE WriteLn (f: File) ;
+BEGIN
+   WriteLine (f)
+END WriteLn ;
+
+
+END arrayofchar.