At this writing, the list of available ISO 7185 compilers is in bad shape. GPC ceased development some time ago. FPC was compliant, but has lapsed. Apparently the group no longer tests for ISO 7185 compliance, even though the test was provided for them by me.
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.
Pascal-P5. Pascal-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.
Pascal-P6. Pascal-P6 is an extended version of Pascal-P5, featuring the language Pascaline. It is an interpreter and plans are to add a backend compiler for various CPUs.
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.
Since passing the ISO 7185 tests at version 3.0.0, FPC has been failing the test in recent versions. I can't really recommend the compiler as an ISO 7185 implementation at this time.
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.
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.
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>
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.
Last verified: February 9, 2023
ISO 7185 full standard test: pass
Version: 0.1 (Linux/Ubuntu)
Pascal-s compile/run: Pass
Pascal-P5 compile/run: Pass (note that this is a self-compile and run)
Pascal-P5 compile/run: Pass (note that this is a self-compile and run)
Type: Interpreter
Implementation first order details:
Processor run on: AMD Ryzen 9 3950X 16-Core Processor 3.80 GHz
Bits: 64
Value of maxint: 2147483647
Default integer field width: 21 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 GPC on Linux/Ubuntu.
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.
2. The current version of FPC, 3.2.2, does not function on the ISO7185 PAT test. Thus FPC is not considered an operational ISO 7185 compiler at this time.
FPC originator comments:
<Not supplied>
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 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.
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.