Next:Support for testing link-time optimizations, Previous:Ada Language Testsuites, Up:Testsuites [Contents][Index]
GCC contains the following C language testsuites, in thegcc/testsuite directory:
This contains tests of particular features of the C compiler, using themore modern ‘dg’ harness. Correctness tests for various compilerfeatures should go here if possible.
Magic comments determine whether the fileis preprocessed, compiled, linked or run. In these tests, error and warningmessage texts are compared against expected texts or regular expressionsgiven in comments. These tests are run with the options ‘-ansi -pedantic’unless other options are given in the test. Except as noted below theyare not run with multiple optimization options.
This subdirectory contains tests for binary compatibility usinglib/compat.exp, which in turn uses the language-independent support(seeSupport for testing binary compatibility).
This subdirectory contains tests of the preprocessor.
This subdirectory contains tests for debug formats. Tests in thissubdirectory are run for each debug format that the compiler supports.
This subdirectory contains tests of the-Wformat formatchecking. Tests in this directory are run with and without-DWIDE.
This subdirectory contains tests of code that should not compile anddoes not need any special compilation options. They are run withmultiple optimization options, since sometimes invalid code crashesthe compiler with optimization.
FIXME: describe this.
This contains particular code fragments which have historically broken easily.These tests are run with multiple optimization options, so tests for featureswhich only break at some optimization levels belong here. This also containstests to check that certain optimizations occur. It might be worthwhile toseparate the correctness tests cleanly from the code quality tests, butit hasn’t been done yet.
FIXME: describe this.
This directory should probably not be used for new tests.
This testsuite contains test cases that should compile, but do notneed to link or run. These test cases are compiled with severaldifferent combinations of optimization options. All warnings aredisabled for these test cases, so this directory is not suitable ifyou wish to test for the presence or absence of compiler warnings.While special options can be set, and tests disabled on specificplatforms, by the use of.x files, mostly these test casesshould not contain platform dependencies. FIXME: discuss how definessuch asSTACK_SIZE are used.
This testsuite contains test cases that should compile, link and run;otherwise the same comments as forgcc.c-torture/compile apply.
This contains tests which are specific to IEEE floating point.
FIXME: describe this.
This directory should probably not be used for new tests.
This directory contains C tests that require special handling. Someof these tests have individual expect files, and others sharespecial-purpose expect files:
bprob*.cTest-fbranch-probabilities usinggcc.misc-tests/bprob.exp, whichin turn uses the generic, language-independent framework(seeSupport for testing profile-directedoptimizations).
gcov*.cTestgcov output usinggcov.exp, which in turn uses thelanguage-independent support (seeSupport for testing gcov).
i386-pf-*.cTest i386-specific support for data prefetch usingi386-prefetch.exp.
dg-*.cTest the testsuite itself usinggcc.test-framework/test-framework.exp.
FIXME: merge intestsuite/README.gcc and discuss the format oftest cases and magic comments more.
Next:Support for testing link-time optimizations, Previous:Ada Language Testsuites, Up:Testsuites [Contents][Index]