This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36341] MATMUL: Bounds check missing (run time & compile time)



------- Comment #10 from dominiq at lps dot ens dot fr  2008-06-28 17:30 -------
The failures reported in comment #8 disappear with the fix of comment #9.

However I have gotten an Heisenbug for 32 bit mode:

FAIL: gfortran.dg/bounds_check_11.f90  -Os   (test for warnings, line 18)
FAIL: gfortran.dg/bounds_check_11.f90  -Os   (test for warnings, line 19)

Executing on host: /opt/gcc/i686-darwin/gcc/testsuite/gfortran/../../gfortran
-B/opt/gcc/i686-darwin/gcc/testsuite/gfortran/../../
/opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/bounds_check_11.f90   -Os 
-fbounds-check  -L/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs
-L/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs
-L/opt/gcc/i686-darwin/i686-apple-darwin9/./libiberty  -lm   -o
./bounds_check_11.exe    (timeout = 300)
FAIL: gfortran.dg/bounds_check_11.f90  -Os   (test for warnings, line 18)
FAIL: gfortran.dg/bounds_check_11.f90  -Os   (test for warnings, line 19)
PASS: gfortran.dg/bounds_check_11.f90  -Os  (test for excess errors)
Setting LD_LIBRARY_PATH to
.:/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs:/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs:/opt/gcc/i686-darwin/gcc:.:/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs:/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs:/opt/gcc/i686-darwin/gcc
At line 18 of file
/opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/bounds_check_11.f90
Fortran runtime error: Array reference out of bounds, lower bound of dimension
2 of array 'jp' exceeded (0 < 1)
PASS: gfortran.dg/bounds_check_11.f90  -Os  output pattern test, At line 18 of
file .*Array reference out of bounds, lower bound of dimension 2 of array 'jp'
exceeded .0 < 1.

But the same test done manually gave:

[ibook-dhum] f90/bug%
/opt/gcc/i686-darwin/gcc/testsuite/gfortran/../../gfortran
-B/opt/gcc/i686-darwin/gcc/testsuite/gfortran/../../
/opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/bounds_check_11.f90   -Os 
-fbounds-check  -L/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs
-L/opt/gcc/i686-darwin/i686-apple-darwin9/./libgfortran/.libs
-L/opt/gcc/i686-darwin/i686-apple-darwin9/./libiberty  -lm
/opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/bounds_check_11.f90:18.9:

    jp(2,0:4)=0 ! { dg-warning "out of bounds" }
        1
Warning: Lower array reference at (1) is out of bounds (0 < 1) in dimension 2
/opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/bounds_check_11.f90:19.7:

    jp(3,1:4)=0 ! { dg-warning "out of bounds" }
      1
Warning: Array reference at (1) is out of bounds (3 > 2) in dimension 1

Then I did:

[ibook-dhum] i686-darwin/gcc% make -k check-gfortran
RUNTESTFLAGS="dg.exp=bounds_check_11.f90"
Makefile:3221: warning: overriding commands for target `gt-darwin.h'
../../gcc-4.4-work/gcc/config/t-darwin:17: warning: ignoring old commands for
target `gt-darwin.h'
test -d testsuite || mkdir testsuite
test -d testsuite/gfortran || mkdir testsuite/gfortran
(rootme=`${PWDCMD-pwd}`; export rootme; \
        srcdir=`cd ../../gcc-4.4-work/gcc; ${PWDCMD-pwd}` ; export srcdir ; \
        cd testsuite/gfortran; \
        rm -f tmp-site.exp; \
        sed '/set tmpdir/ s|testsuite|testsuite/gfortran|' \
                < ../../site.exp > tmp-site.exp; \
        /bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
        EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo
${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
        if [ -f ${rootme}/../expect/expect ] ; then  \
           TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ;
\
            export TCL_LIBRARY ; fi ; \
        GCC_EXEC_PREFIX="/opt/gcc/gcc4.4w/lib/gcc/" ; export GCC_EXEC_PREFIX ;
\
        `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo
${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gfortran
dg.exp=bounds_check_11.f90)
WARNING: Couldn't find the global config file.
Test Run By dominiq on Sat Jun 28 19:20:39 2008
Native configuration is i686-apple-darwin9

                === gfortran tests ===

Schedule of variations:
    unix

Running target unix
Using /sw/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /sw/share/dejagnu/config/unix.exp as generic interface file for target.
Using /opt/gcc/gcc-4.4-work/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /opt/gcc/gcc-4.4-work/gcc/testsuite/gfortran.dg/dg.exp ...

                === gfortran Summary ===

# of expected passes            40
/opt/gcc/i686-darwin/gcc/testsuite/gfortran/../../gfortran  version 4.4.0
[revision 137223p5] 20080628 (experimental) (GCC) 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36341


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]