Do we have the testsuite infrastructure to easily do this?

Frank Ch. Eigler fche@redhat.com
Tue Sep 14 18:09:00 GMT 2004


Hi, Dan -

> [...]
> Make the testcase print out the values of the induction variables for
> the iteration it is executing.
> Compile and run without -ftree-loop-linear, redirect output to file.
> Compile and run with -ftree-loop-linear, redirect output to file.
> sort -n both files, diff.
> [...]

Coding in tcl your desired test scenario should not be too hard.
The gist of it is that you need to run to bypass the dg generic stuff
and code to the lower level dejagnu APIs.

You might start from a non-dg test suite like libmudflap/.../ctors.exp,
which demonstrate the "..._target_compile", "remote_spawn", and 
"remote_wait" procedures.  You can collect the stdout in tcl variables,
split the lines with the "split" proc, the sort them with "lsort", then
compare them.

- FChE



More information about the Gcc mailing list