This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH 01: Testsuite: compare outputs of a testcase compiled and run with 2 flags
On Fri, 2008-05-16 at 10:41 -0500, Sebastian Pop wrote:
> On Thu, May 15, 2008 at 5:44 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> > I cleaned up the use of torture options so now it should be easier to
> > add a suite that combines a specified list of torture options with
> > another specified list; see gcc/testsuite/objc/execute/execute.exp
> > for an example. All of the tests in a directory will be run with all
> > of those options. Does that do what you need?
> >
>
> No, this torture infrastructure is complementary to the changes
> proposed by Harsha.
>
> With the torture infrastructure one should encode the check for the
> correctness of the results in the testcase itself. This is difficult:
> we want a simpler way to do this checking, avoiding to write the check
> explicitely in the testcase. We want to avoid writing testcases like
> gcc/testsuite/gcc.dg/vect/vect-25.c where the check is explicitely in
> the testcase:
>
> /* check results: */
> for (i = 0; i < N; i++)
> {
> if (ib[i] != k)
> abort ();
> }
>
> The patch proposed by Harsha allows to just write the testcase and
> compare outputs, avoiding the need of a check of the computation with
> abort calls.
Except for tests of library output functions, GCC tests should
be self-checking. We wouldn't be able to notice new errors if
a test got the same wrong answers when compiled with two sets
of optimizations.
Janis