Revision history   OpenPOWER Library

 2.2. GCC Compatibility Test Suite Required Tests

To test interoperability of binary code generated by a compiler under test with binary code generated by the reference compiler, create a configuration file that specifies the path names to invoke the compiler under test:


C compiler under test.


C++ compiler under test.

The test suite will assume the compiler under test supports all GCC extensions. If this is not the case for your compiler, you can additionally specify in the configuration file a list of extensions to be skipped during test:


Tcl list of GCC extensions to be skipped.

A typical set of GCC extensions that may need to be excluded can be:


The GCC __attribute__ extension.


The GCC variable-length array in struct extension.


The GCC decimal floating-point type extension.

Creating the configuration file can be achieved by executing the following commands:

    make -C gcc site.exp
    echo 'set ALT_CC_UNDER_TEST <C compiler under test>' >>gcc/site.exp
    echo 'set ALT_CXX_UNDER_TEST <C++ compiler under test>' >>gcc/site.exp
                                 {DECIMAL_FLOAT}]" >>gcc/site.exp

in the directory where the reference compiler was built (see above).

Once the configuration file is set up, execute at least the following test cases provided by the GCC test suite:


Generic ABI compatibility tests.


Structure layout compatibility tests.

This can be achieved by executing the following command:

    make check-gcc RUNTESTFLAGS="compat.exp struct-layout-1.exp"

in the same directory.