Testsuite and constant-folding?

Janis Johnson janis187@us.ibm.com
Tue Jan 9 01:16:00 GMT 2007


On Fri, Jan 05, 2007 at 10:41:05AM -0800, Brooks Moses wrote:
> (3) How do GCC testsuites other than the Fortran one handle this issue?

[I'm still catching up on email, sorry for the delay.]

The tests for decimal floating point expression evaluation in gcc.dg/dfp
have separate versions for compile-time folding and for runtime evaluation.
Runtime tests explicitly use -O0 and have either volatile or global
variables.  Fold tests explicitly use -O2; they have calls to link_error
to verify that the expressions are folded, but are also executed to
verify that the program runs without blowing up.

Janis



More information about the Gcc-patches mailing list