Adds the build and license files for the gfortran test suite.
This patch does not contain the source files themselves. Based on discussions with @lenary here, it was decided that the actual test files will be committed separately with the proviso that the files will be copied as-is from the gfortran test suite without any modifications. Once this patch is approved, it will be commited first followed by a commit containing the test files themselves.
The test files to be imported are the "main" gfortran tests and the gfortran "torture" tests.
There are two broad classes of tests in the both the main and torture suites - compile tests which test the behavior of the compiler when given incorrect code and execute tests which test the resulting compiled executable. Currently, only the execute tests are enabled.
Of these, a number of tests have been disabled. I have made an attempt to classify them as follows:
- Unsupported: Tests that use non-standard extensions/intrinsics that are not (currently) supported. Some of these may be supported in the future, but currently, there are no plans to do so.
- Unimplemented: Tests that fail to build because they trigger a "not yet implemented" assertion in flang.
- Skipped: Tests that fail to build for some reason other than triggering a "not yet implemented" assertion. These could fail because of some other unimplemented feature, a bug in the compiler, or even a bug in the test itself.
- Failing: Tests that build but fail at runtime for one reason or another. This may be a bug somewhere in flang that manifests itself at runtime or a bug/unimplemented feature in the runtime.
Eventually, there should be no tests at all in the unimplemented, skipped and failing categories.
Configure-time options have been added to the enable these tests. These are intended to help with manually pruning the list of disabled tests as more language features are implemented and bugs fixed. These options are disabled by default, so all tests should pass by default.
Additionally, the tests are only currently enabled on non-Windows, non-Apple, x86 and AArch64 platforms. This is because:
- They haven't been tested on different architectures/OS'es.
- There are some tests that are intended to be run only on certain platforms, but the cmake files currently do not correctly deal with those.
Patches for the test files are here, but they have since been abandoned. The links are maintained here for reference:
Would it work on Mac?