ISO 7185 STANDARD PASCAL COMPILERS AVAILABLE

This page contains a list of known compilers, either freeware or paidware,
that comply with the ISO 7185 standards for Pascal. I have used two simple criteria to determine what
gets listed on this page. First, the compiler must be currently available,
either for sale or download. Second, it must be known to comply with the
either the ISO 7185 standard. Since I don't
have always have the means to determine that, I will take the maker's
word that they meet the standard.

Compilers can always be found to have problems complying with the standard.
The maker may not know that their compiler does not meet some part of the
standard (nobody is perfect, and there is no "absolute" compliance test).
I don't personally think that any compiler maker that claims to meet the
standard should be pronounced "nonstandard" as long as they state their
intent to meet the standard, and correct any compliance problems. The only
way I would feel justified in such a pronouncement is if the maker has
stated that they have no intention of correcting the compliance problem,
or have not corrected a known problem in a timely manner (say, the problem
has existed for a year or more).

For a quick verification of if a given compiler is REALLY ISO 7185 compliant,
I have found that the ISO 7185 version of the M&M test [1] works quite well.
The standard specifically requires that the compiler or associated documentation
state that it is compliant with ISO 7185, and specifies the format of the statement
(please see the ISO 7185 standard link). If it does not contain this message,
it is unlikely to be truly compliant, since this tends to indicate the authors
didn't actually read the standard.

News from December 11, 2016:

I have added FPC (Free Pascal Compiler) to the list. The FPC group is to
be congratulated on a good effort to put a ISO 7185 compilant mode into their
compiler. Welcome to the ISO 7185 family!

Work on GPC was halted. GPC relied on the GCC compiler as a backend, and
the GPC group felt changes in GCC made it impossible to go forward. Since this
effectively pins GPC to a given GCC version, in fact GCC 4.1.3. The net effect
of this is to cripple GPC, since it is very hard to maintain a downrev GCC system.
I have so noted this limitation.

I removed IP Pascal. It was never publically available in anything but demo
mode, and now it is dated as well. As such I removing it from the list.

ISO 7185 Compilers/interpreters

GPC, the free software Pascal compiler
based on GCC. GPC is a project to implement a Pascal compiler front
end to the GCC compiler project. The reason that this is a good idea, is
that it uses all the existing GCC tools, and in fact, will work on any
computer the GCC compiler works on, which is huge and growing. It can also
integrate to all the fantastic libraries and back ends of GCC. GPC obeys
ISO 7185, and the authors are attempting to integrate a large number of
features from the Extended Pascal standard, ISO 10206.

Development on GPC has been halted, essentially "End of Life"ing
the GPC compiler.

P5. P5 is an open source compiler/interpreter that was originally part
of the ETH Zurich Pascal porting kit for creators of Pascal compilers. It is
well known (it was the basis for UCSD Pascal, the DEC implementation and many
others). It is ISO 7185 compatible both in the language it compiles and the
language it is written in, free, and the source is available on this site.

FPC. Mainly designed as a Borland
Dialect compiler, the FPC group introduced a switch, -Miso, that enables ISO
7185 mode. FPC is one of the compilers on this list, the other being P5, that
is written in its own language. It supports many target processors with good
efficiency, along with several host operating systems.

ISO 7185 Verification

As part of my continuing activities to promote the ISO 7185 Standard, I have
been personally verifying some of the compilers above.

The test programs I use are freely available here as part of the P5 project.

For details on the nature of the test, see the section below.

ISO 7185 Verified compilers

Please note: There is nothing implied by a compiler/processor not appearing
in this section. Further,
I am not a recognized ISO 7185 standard test facility. Finally, I do not warrant the results
of any of my test work or hold any responsibility for the fitness of any product
tested here.

GPC

Last verified: July
25, 2010

ISO 7185 full standard
test: One failure (see explanation)

Version: gpc
version 20070904, based on gcc-3.4.5

Pascal-s compile/run:
Pass

Pascal-P5 compile/run:
Pass

Type: Compiler

Implementation first
order details:

Processor run on:
AMD
Athlon 3200+

Bits: 32

Value of maxint:
2147483647

Default integer
field width: 11 characters

Default real format
field width: 29 characters

Default boolean
field width: 6

Default character
field width: 1 character.

Implementation character
set: ASCII

My comments:

1. The GPC group,
unfortunately, ended development on their compiler due to difficulties with
their GCC integration. This means that GPC support ended after GCC 4.1.3. To
run it, you must obtain a downrev version of GCC to run it with.

GPC originator comments:

<Not supplied>

P5

Last verified: December
26, 2010

ISO 7185 full standard
test: pass

Version: 1.0
(beta)(Windows XP)

Pascal-s compile/run:
Pass

Pascal-P5 compile/run:
Pass (note that this is
a self-compile and run)

Type: Interpreter

Implementation first
order details:

Processor run on:
AMD
Athlon 64 3200+

Bits: 32

Value of maxint:
2147483647

Default integer
field width: 11 characters

Default real format
field width: 22 characters

Default boolean
field width: 5 characters.

Default character
field width: 1 character.

Implementation character
set: ASCII

My comments:

1. The compiler/interpreter
picks up the default characteristics of its host compiler, such as the default
integer field width, maxint, etc., so it will matter which host was used to
compile it. It was tested using IP Pascal on Windows/XP.

P5 originator
comments:

This version of
P5 self compiles, which is a very difficult test.

FPC

Last verified: December
11, 2016

ISO 7185 full standard
test: pass

Version: 3.0.0
(Windows 10)

Pascal-s compile/run:
Pass

Pascal-P5 compile/run:
Fail

Type: Compiler

Implementation first
order details:

Processor run on:
AMD
Phenom 9850

Bits: 32

Value of maxint:
2147483647

Default integer
field width: 11 characters

Default real format
field width: 29 characters

Default boolean
field width: 5 characters.

Default character
field width: 1 character.

Implementation character
set: ASCII

My comments:

1. P5 compile fail
was due to odd handling of header file assignments. There is not a lot of standard
text specifying how header files are associated, but I found the method unfortunate,
and not worth creating a special version of P5 just to adapt to it. I have been
told that further versions of FPC will address this issue.

FPC originator
comments:

<Not supplied>

ISO
7185 Testing Details

Why another ISO
7185 test ?

There was only one
general ISO 7185 test in existence, the BSO (British Standards Organization)
test. It has been taken off the market by the BSO, and they have no plans to
either offer it again, or release it to public domain. There is an older copy
of that test in the PUG newsletters, found elsewhere on this site. However,
the material there is not straightforward to OCR (Optical Character Recognition),
so the ability (or inability) to make this test available will be revisited
in the future.

I have my own compliance
test for ISO 7185 which was created to test my own compiler (IP Pascal). Details
of that are below. This is a "feature" test, designed to exercise
each feature of the ISO 7185 standard. It is NOT a stress test. For example,
it does not check how many procedures can be nested, or the total size of program
that can be compiled, etc.

The following procedure
is used to verify ISO 7185 compliance by me:

1. The ISO 7185
compliance program is compiled and run. This is then checked for correctness.

2. The ISO 7185
compliant program Pascal-s is compiled and run, using simple Pascal programs
written in the Pascal-s language subset. Pascal-s tends to use most of the language,
and constitutes a non-trivial program.

3. A version of
the ISO 7185 compliance suite that has been cut down to the Pascal-s subset
is run on the Pascal-s compiled by the compiler under test.

So ultimately, the
compiler is run against the compliance test, then used to compile and run Pascal-s,
then that itself is tested with a version of the compliance test. This is a
fairly complete shakeout of the compiler,. and confidence can be high the system
is ISO 7185 compliant and stable after that.

The
IP Pascal ISO 7185 Compliance Test

The test is a pretty standard compiler test. It is ISO 7185 simply because I
separated the ISO 7185 material from the extended tests for IP Pascal. It
originated in about 1992 for the purpose of verifying the Windows NT version
of IP Pascal, which actually started as a DOS/386 extender implementation,
since Windows NT was not yet available.

The test performs and prints a
given operation, then prints a ' s/b xxx' text line to allow for easy
checking. The check is done manually by reading the output, but can be done
automatically for identical formatting by saving the output in a file, and
comparing against a reference file. To this end, the tests specifically
specify output formats where possible.

The ISO 7185 compliance test is provided with the P5 project.
You can get the test files there, along with complete intructions on how to
run it. In addition, compiling and running P5 itself is a good test of ISO 7185
compliance. See the next section.

Since I offered this testing service to other ISO 7185 compiler vendors,
the response has been excellent.

P5 and testing

The advent of P5 is rapidly changing how I do test. P5 not only provides
a large program in ISO 7185 Pascal language to verify Pascal implementations,
but also runs any ISO 7185 Pascal program itself. This means that a Pascal implementation
can be tested by running the ISO 7185 compliance test, then run the P5 compiler,
and run the ISO 7185 compliance test on that, etc. P5 also serves as a "model
implementation" of the workings of an ISO 7185 Pascal compiler.

Because of this, P5 has taken over as the ISO 7185 test suite that I run.
P5 comes with a series of configurable scripts to run the compiler under test
through the test series.