Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Testsuites   [Contents][Index]


6.5 Support for testing link-time optimizations

Tests for link-time optimizations usually require multiple source filesthat are compiled separately, perhaps with different sets of options.There are several special-purpose test directives used for these tests.

{ dg-lto-dodo-what-keyword }

do-what-keyword specifies how the test is compiled and whetherit is executed. It is one of:

assemble

Compile with-c to produce a relocatable object file.

link

Compile, assemble, and link to produce an executable file.

run

Produce and run an executable file, which is expected to returnan exit code of 0.

The default isassemble. That can be overridden for a set oftests by redefiningdg-do-what-default within the.expfile for those tests.

Unlikedg-do,dg-lto-do does not support an optional‘target’ or ‘xfail’ list. Usedg-skip-if,dg-xfail-if, ordg-xfail-run-if.

{ dg-lto-options { {options } [{options }] } [{ targetselector }]}

This directive provides a list of one or more sets of compiler optionsto overrideLTO_OPTIONS. Each test will be compiled and run witheach of these sets of options.

{ dg-extra-ld-optionsoptions [{ targetselector }]}

This directive addsoptions to the linker options used.

{ dg-suppress-ld-optionsoptions [{ targetselector }]}

This directive removesoptions from the set of linker options used.


[8]ページ先頭

©2009-2026 Movatter.jp