This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Testsuite and constant-folding?
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Brooks Moses <brooks dot moses at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 8 Jan 2007 17:15:28 -0800
- Subject: Re: Testsuite and constant-folding?
- References: <459E9BC1.7040801@codesourcery.com>
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