gccint: LTO Testing

1 
1 7.5 Support for testing link-time optimizations
1 ===============================================
1 
1 Tests for link-time optimizations usually require multiple source files
1 that are compiled separately, perhaps with different sets of options.
1 There are several special-purpose test directives used for these tests.
1 
1 '{ dg-lto-do DO-WHAT-KEYWORD }'
1      DO-WHAT-KEYWORD specifies how the test is compiled and whether it
1      is executed.  It is one of:
1 
1      'assemble'
1           Compile with '-c' to produce a relocatable object file.
1      'link'
1           Compile, assemble, and link to produce an executable file.
1      'run'
1           Produce and run an executable file, which is expected to
1           return an exit code of 0.
1 
1      The default is 'assemble'.  That can be overridden for a set of
1      tests by redefining 'dg-do-what-default' within the '.exp' file for
1      those tests.
1 
1      Unlike 'dg-do', 'dg-lto-do' does not support an optional 'target'
1      or 'xfail' list.  Use 'dg-skip-if', 'dg-xfail-if', or
1      'dg-xfail-run-if'.
1 
1 '{ dg-lto-options { { OPTIONS } [{ OPTIONS }] } [{ target SELECTOR }]}'
1      This directive provides a list of one or more sets of compiler
1      options to override LTO_OPTIONS.  Each test will be compiled and
1      run with each of these sets of options.
1 
1 '{ dg-extra-ld-options OPTIONS [{ target SELECTOR }]}'
1      This directive adds OPTIONS to the linker options used.
1 
1 '{ dg-suppress-ld-options OPTIONS [{ target SELECTOR }]}'
1      This directive removes OPTIONS from the set of linker options used.
1