-@c Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+@c Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
the top level one) used?
@item The file @file{config.gcc} is used to handle configuration
-specific to the particular target machine. The file
-@file{config.build} is used to handle configuration specific to the
+specific to the particular target machine. The file
+@file{config.build} is used to handle configuration specific to the
particular build machine. The file @file{config.host} is used to handle
configuration specific to the particular host machine. (In general,
these should only be used for features that cannot reasonably be tested in
@file{config} to be installed on some systems.
GCC installs its own version of @code{<float.h>}, from @file{ginclude/float.h}.
-This is done to cope with command-line options that change the
+This is done to cope with command-line options that change the
representation of floating point numbers.
GCC also installs its own version of @code{<limits.h>}; this is generated
@node Test Idioms
@subsection Idioms Used in Test Suite Code
-In the @file{gcc.c-torture} test suites, test cases are commonly named
-after the date on which they were added. This allows people to tell
-at a glance whether a test failure is because of a recently found bug
-that has not yet been fixed, or whether it may be a regression. In
-other test suites, more descriptive names are used. In general C test
-cases have a trailing @file{-@var{n}.c}, starting with @file{-1.c}, in
-case other test cases with similar names are added later.
+In general C testcases have a trailing @file{-@var{n}.c}, starting
+with @file{-1.c}, in case other testcases with similar names are added
+later. If the test is a test of some well-defined feature, it should
+have a name referring to that feature such as
+@file{@var{feature}-1.c}. If it does not test a well-defined feature
+but just happens to exercise a bug somewhere in the compiler, and a
+bug report has been filed for this bug in the GCC bug database,
+@file{pr@var{bug-number}-1.c} is the appropriate form of name.
+Otherwise (for miscellaneous bugs not filed in the GCC bug database),
+and previously more generally, test cases are named after the date on
+which they were added. This allows people to tell at a glance whether
+a test failure is because of a recently found bug that has not yet
+been fixed, or whether it may be a regression, but does not give any
+other information about the bug or where discussion of it may be
+found. Some other language testsuites follow similar conventions.
Test cases should use @code{abort ()} to indicate failure and
@code{exit (0)} for success; on some targets these may be redefined to
@table @file
@item gcc.dg
-This contains tests of particular features of the C compiler, using the
+This contains tests of particular features of the C compiler, using the
more modern @samp{dg} harness. Correctness tests for various compiler
features should go here if possible.
-Magic comments determine whether the file
-is preprocessed, compiled, linked or run. In these tests, error and warning
-message texts are compared against expected texts or regular expressions
+Magic comments determine whether the file
+is preprocessed, compiled, linked or run. In these tests, error and warning
+message texts are compared against expected texts or regular expressions
given in comments. These tests are run with the options @samp{-ansi -pedantic}
unless other options are given in the test. Except as noted below they
are not run with multiple optimization options.
This contains particular code fragments which have historically broken easily.
These tests are run with multiple optimization options, so tests for features
which only break at some optimization levels belong here. This also contains
-tests to check that certain optimizations occur. It might be worthwhile to
+tests to check that certain optimizations occur. It might be worthwhile to
separate the correctness tests cleanly from the code quality tests, but
it hasn't been done yet.