------- Comment #1 from fxcoudert at gcc dot gnu dot org 2008-02-28 12:51
-------
Reduced testcase:
$ cat bounds_check_9.f90
program main
call sub()
contains
subroutine set_optional(iopt)
integer, optional :: iopt(:)
end subroutine set_optional
subroutine sub(ivec)
integer, optional :: ivec(:)
call set_optional(ivec)
end subroutine sub
end program main
$ gfortran -fbounds-check bounds_check_9.f90 -g && valgrind ./a.out
==10896== Memcheck, a memory error detector.
==10896== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==10896== Using LibVEX rev 1658, a library for dynamic binary translation.
==10896== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==10896== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==10896== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==10896== For more details, rerun with: -v
==10896==
==10896== Conditional jump or move depends on uninitialised value(s)
==10896== at 0x400375: sub.923 (bounds_check_9.f90:9)
==10896== by 0x4002C3: MAIN__ (bounds_check_9.f90:2)
==10896== by 0x40049B: main (fmain.c:21)
==10896==
==10896== Conditional jump or move depends on uninitialised value(s)
==10896== at 0x4003B0: sub.923 (bounds_check_9.f90:9)
==10896== by 0x4002C3: MAIN__ (bounds_check_9.f90:2)
==10896== by 0x40049B: main (fmain.c:21)
==10896==
==10896== Conditional jump or move depends on uninitialised value(s)
==10896== at 0x4003EE: sub.923 (bounds_check_9.f90:9)
==10896== by 0x4002C3: MAIN__ (bounds_check_9.f90:2)
==10896== by 0x40049B: main (fmain.c:21)
==10896==
==10896== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 1 from 1)
==10896== malloc/free: in use at exit: 0 bytes in 0 blocks.
==10896== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==10896== For counts of detected errors, rerun with: -v
==10896== All heap blocks were freed -- no leaks are possible.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-02-28 12:51:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34956