View Issue Details

IDProjectCategoryView StatusLast Update
0037322FPCCompilerpublic2020-07-10 23:06
ReporterScott Franco Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
OSWindows 
Product Version3.2.0 
Fixed in Version3.3.1 
Summary0037322: ISO 7185 mode rejects program name as duplicate
DescriptionThe program name in the header is rejected as a duplicate on use for other ids. The ISO 7185 standard sez:

program = program-heading ' ;' program-block '.' .

program-heading = 'program' identifier [ '(' program-parameter-list ')'] .

program-parameter-list = identifier-list .

program-block = block .

The identifier of the program-heading shall be the program name. It shall have no significance within the program.

From the ISO 7185 standard at:

http://www.pascal-central.com/iso7185.html#6.10%20Programs
Steps To ReproduceC:\projects\PASCAL\pascal-p5>fpc -Miso test.pas
Free Pascal Compiler version 3.2.0 [2020/06/04] for i386
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test.pas
test.pas(3,9) Error: Duplicate identifier "test"
test.pas(7) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\3.2.0\bin\i386-Win32\ppc386.exe returned an error exitcode

C:\projects\PASCAL\pascal-p5>cat test.pas
program test;

var test: integer;

begin
end.
TagsNo tags attached.
Fixed in Revision45757
FPCOldBugId
FPCTarget-
Attached Files

Relationships

related to 0037320 resolvedFlorian Fails on ISO 7185 dispose 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-07-10 02:03 Scott Franco New Issue
2020-07-10 22:41 Florian Relationship added related to 0037320
2020-07-10 23:06 Florian Assigned To => Florian
2020-07-10 23:06 Florian Status new => resolved
2020-07-10 23:06 Florian Resolution open => fixed
2020-07-10 23:06 Florian Fixed in Version => 3.3.1
2020-07-10 23:06 Florian Fixed in Revision => 45757
2020-07-10 23:06 Florian FPCTarget => -