Next: gcov Testing, Previous: libgcj Tests, Up: Testsuites
Tests for link-time optimizations usually require multiple source files that are compiled separately, perhaps with different sets of options. There are several special-purpose test directives used for these tests.
{ dg-lto-do
do-what-keyword }
assemble
link
run
The default is assemble
. That can be overridden for a set of
tests by redefining dg-do-what-default
within the .exp
file for those tests.
Unlike dg-do
, dg-lto-do
does not support an optional
‘target’ or ‘xfail’ list. Use dg-skip-if
,
dg-xfail-if
, or dg-xfail-run-if
.
{ dg-lto-options { {
options } [{
options }] } [{ target
selector }]}
{ dg-extra-ld-options
options [{ target
selector }]}
{ dg-suppress-ld-options
options [{ target
selector }]}