This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testsuite infrastructure for comparing outputs


On Nov 28, 2007 6:36 PM, Janis Johnson <janis187@us.ibm.com> wrote:
>
> On Wed, 2007-11-28 at 15:00 -0600, Sebastian Pop wrote:
> > Hi,
> >
> > In a recent update of the page http://gcc.gnu.org/wiki/Graphite I left
> > the "Testing Lambda and Graphite frameworks" part in the open tasks.
> > One of the subitems of this task is:
> >
> > "Add expect scripts for comparing outputs of testcases compiled with
> > different options.  For instance compare output of a program compiled
> > with "-O2" versus "-O2 -fgraphite"."
> >
> > Are there already such scripts that we could use?  I suspect that the
> > answer is not yet.
>
> I'm not sure what you mean.  Would it be enough to add -fgraphite to
> TORTURE_OPTIONS when you run the existing execute tests?
>

Sorry for not being clear.

I want to compile twice a testcase once with an option turned on, and
another time without that option: this produces two executables.  Then
I want to compare the outputs of the two executables as they should be
the same with and without the transformation.  Here is an example:

gcc -O2 -fgraphite file.c -o ./a
gcc -O2 -fno-graphite file.c -o ./b
./a > output.a
./b > output.b
diff output.a output.b

And there should be no difference between the outputs.

My question was whether we have an infrastructure in the gcc testsuite
that allows to specify the flags to compare, something like:

/* { dg-same-output "-O2 -fgraphite" "-O2 -fno-graphite" } */

that would trigger the above commands and succeed when the outputs are
identical.

Sebastian
-- 
AMD - GNU Tools


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]