Bounds-checking for Fortran testsuite was: Re: [gfortran, testsuite] Fix bounds checking for substrings, enable bounds chekcing in dg testsuite, assorted fixes

Andreas Tobler toa@pop.agri.ch
Thu Dec 14 23:05:00 GMT 2006


Andreas Tobler wrote:
> Janis Johnson wrote:
>> On Wed, Dec 13, 2006 at 06:45:19PM +0100, Tobias Schlüter wrote:
>>> Andrew Pinski <pinskia@gmail.com> wrote on Wed, 13 Dec 2006:
>>>>> My Tcl-fu is nil, but does this patch fix it?
>>>> Most likely but this patch is not enough to keep some failures away if
>>>> the target GCC supports altivec but the machine does not.  Likewise for
>>>> SSE2.  FX's testresults show those failures.  Maybe adding the testing
>>>> of a trivial.f90 which contains a couple of vectorizable loops inside
>>>> fortran-torture.exp will fix that issue.
>>> Hm, so why does this not happen with the vect testsuite?  I was
>>> precisely following its logic, which says "on i686, always _run_
>>> tests".  I could add something like check_vmx_hw_available, of course,
>>> I'm just wondering.
>>
>> I think the initial error is a Tcl problem. I'm trying to improve my
>> Tcl-fu so I'll take a look at it.
>>
>> There are two effective targets for AltiVec tests; powerpc_altivec_ok
>> says the test compiler can compile AltiVec code, and vmx_hw says that
>> the test system can run the test.  I've got PowerPC systems that do
>> and do not support VMX so I'll try these tests on both.
> 
> Ok, here is what helped me on darwin-ppc and linux-ppc, both 32-bit 
> targets:
> 
> Index: gcc/testsuite/lib/gfortran.exp
> ===================================================================
> --- gcc/testsuite/lib/gfortran.exp      (revision 119856)
> +++ gcc/testsuite/lib/gfortran.exp      (working copy)
> @@ -25,6 +25,7 @@
>  load_lib prune.exp
>  load_lib gcc-defs.exp
>  load_lib target-libpath.exp
> +load_lib target-supports.exp
> 
>  #
>  # GFORTRAN_UNDER_TEST is the compiler under test.
> Index: gcc/testsuite/lib/gfortran-dg.exp
> ===================================================================
> --- gcc/testsuite/lib/gfortran-dg.exp   (revision 119856)
> +++ gcc/testsuite/lib/gfortran-dg.exp   (working copy)
> @@ -14,8 +14,8 @@
>  # along with this program; if not, write to the Free Software
>  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
> 02110-1301, USA.
> 
> +load_lib gcc-dg.exp
>  load_lib fortran-torture.exp
> -load_lib gcc-dg.exp
> 
>  # Define gfortran callbacks for dg.exp.
> 
> 
> i?86-apple-darwin* is also happy with.
> 
> I try to find out why libgomp fails.

Ok, with this late night edition it even works with libgomp.
Don't know if correct or not. Honestly I do not care that much atm. But 
it seems to work.

Andreas


Index: lib/libgomp-dg.exp
===================================================================
--- lib/libgomp-dg.exp  (revision 119856)
+++ lib/libgomp-dg.exp  (working copy)
@@ -22,6 +22,7 @@
  load_gcc_lib wrapper.exp
  load_gcc_lib gcc-defs.exp
  load_gcc_lib gcc-dg.exp
+load_gcc_lib fortran-torture.exp
  load_gcc_lib gfortran-dg.exp

  set dg-do-what-default run



More information about the Gcc-patches mailing list