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

7.9 Support for torture testing using multiple options

Throughout the compiler testsuite there are several directories whose tests are run multiple times, each with a different set of options. These are known as torture tests. lib/torture-options.exp defines procedures to set up these lists:


Initialize use of torture lists.


Set lists of torture options to use for tests with and without loops. Optionally combine a set of torture options with a set of other options, as is done with Objective-C runtime options.


Finalize use of torture lists.

The .exp file for a set of tests that use torture options must include calls to these three procedures if:

It is not necessary for a .exp file that calls gcc-dg-runtest to call the torture procedures if the tests should use the list in DG_TORTURE_OPTIONS defined in gcc-dg.exp.

Most uses of torture options can override the default lists by defining TORTURE_OPTIONS or add to the default list by defining ADDITIONAL_TORTURE_OPTIONS. Define these in a .dejagnurc file or add them to the site.exp file; for example

  { -O2 -ftree-loop-linear } \
  { -O2 -fpeel-loops } ]