https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118453
Bug ID: 118453 Summary: Subranges types do use virtual tokens during construction, resulting in poor error messages Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: modula2 Assignee: gaius at gcc dot gnu.org Reporter: gaius at gcc dot gnu.org Target Milestone: --- Consider the following program: $ cat badparamset2.mod MODULE badparamset2 ; TYPE month = SET OF [1..12] ; day = SET OF [1..31] ; PROCEDURE foo (d: day) ; BEGIN END foo ; VAR m: month ; BEGIN foo (m) END badparamset2. $ gm2 badparamset2.mod badparamset2.mod:15:9: error: 1st parameter failure due to assignment incompatibility between actual parameter ‘m’ and the 1st formal ‘d’ parameter in procedure ‘foo’ 15 | foo (m) | ^ badparamset2.mod:15:9: error: subrange and subrange are incompatible as formal and actual procedure parameters While not wrong, the error messages could provide more information (and highlight the subrange declaration).