This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Libstdc++ testsuite -O0 and -O2 (was: Re: [PATCH] Re: 3 new fails...)
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gdr at codesourcery dot com
- Date: Sat, 30 Mar 2002 18:02:10 +0100
- Subject: Libstdc++ testsuite -O0 and -O2 (was: Re: [PATCH] Re: 3 new fails...)
- References: <Pine.SOL.3.91.1020330082830.26274D-100000@taarna.cygnus.com>
Benjamin Kosnik wrote:
>Running both -O0 and -O2 seems the best solution. How can that be done in
>dejagnu? I think the java testsuite does this.
>
This happens for many set of test of c,c++,f77 and java. For sure is
technically doable.
We have to study a bit the directory gcc/gcc/testsuite/lib and take
inspiration in order to modify dg.exp. g77-dg.exp, in particular, is
relatively simple and shows how to iterate over various optmization levels:
...
if ![info exists TORTURE_OPTIONS] {
# It is theoretically beneficial to group all of the O2/O3 options
together,
# as in many cases the compiler will generate identical executables for
# all of them--and the c-torture testsuite will skip testing identical
# executables multiple times.
# Also note that -finline-functions is explicitly included in one of the
# items below, even though -O3 is also specified, because some ports may
# choose to disable inlining functions by default, even when optimizing.
set TORTURE_OPTIONS [list \
{ -O0 } \
{ -O1 } \
{ -O2 } \
{ -O3 -fomit-frame-pointer } \
{ -O3 -fomit-frame-pointer -funroll-loops } \
{ -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \
{ -O3 -g } \
{ -Os } ]
}
...
But now occurs to me that Gaby may have something to say, right?
Paolo.