old-cross-binutils/gdb/testsuite/gdb.mi
Jan Kratochvil 6f2f1a3a70 Fortran: allocate()d memory is uninitialized
allocate (vla1 (5))         ! vla1-not-allocated
  l = allocated(vla1)         ! vla1-allocated     <------------------

Expecting: ^(510-data-evaluate-expression vla1[^M
]+)?(510\^done,value="\(0, 0, 0, 0, 0\)"[^M
]+[(]gdb[)] ^M
[ ]*)
510-data-evaluate-expression vla1^M
510^done,value="(1.82987403e-09, 7.8472714e-44, 1.82987403e-09, 7.8472714e-44, 2.67929926e+20)"^M
(gdb) ^M
FAIL: gdb.mi/mi-vla-fortran.exp: evaluate allocated vla

gcc-4.9.2-6.fc21.x86_64

I think some older gfortran did initialize allocated memory but that is an
unspecified behavior.  I haven't found any initialization mentioned
in Fortran 90 standard (draft) and it is also clearly stated here:
        https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/268786
        Initialization to 0 of allocated arrays (of integers) is an
        implementation issue. i.e. do not rely on it.

Joel Brobecker wrote:
I am wondering if it might be better to just relax instead the regexp to allow
any number rather than just remove the test altogether. The test allows us to
verify that, as soon as we're past the "allocate" call, we no longer say "not
allocated".

gdb/testsuite/ChangeLog
2015-11-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Joel Brobecker  <brobecker@adacore.com>

	* gdb.mi/mi-vla-fortran.exp (evaluate allocated vla): Permit any data.
2015-11-04 15:52:41 +01:00
..
array.f
basics.c
ChangeLog-1999-2003
dw2-ref-missing-frame-func.c
dw2-ref-missing-frame-main.c
dw2-ref-missing-frame.exp
dw2-ref-missing-frame.S
gdb669.exp
gdb680.exp
gdb701.c
gdb701.exp
gdb792.cc
gdb792.exp
gdb2549.exp
Makefile.in
mi-async.exp
mi-basics.exp
mi-break.exp Explicit locations: MI support for explicit locations 2015-08-11 17:09:36 -07:00
mi-breakpoint-changed.exp
mi-catch-load-so.c
mi-catch-load.c
mi-catch-load.exp
mi-cli.exp Generalize breakpoint pattern in gdb.mi/mi-cli.exp. 2015-09-18 09:39:31 -07:00
mi-cmd-param-changed.exp
mi-condbreak-call-thr-state-mt.c
mi-condbreak-call-thr-state-st.c
mi-condbreak-call-thr-state.c
mi-condbreak-call-thr-state.exp
mi-console.c
mi-console.exp
mi-detach.exp
mi-disassemble.exp New /s modifier for the disassemble command. 2015-08-14 21:45:54 -07:00
mi-dprintf-pending.c
mi-dprintf-pending.exp Generalize filename pattern in gdb.mi/mi-dprintf-pending.exp. 2015-09-18 09:22:02 -07:00
mi-dprintf-pendshr.c
mi-dprintf.c Unbuffer all tests that rely on stdio 2015-07-29 11:09:45 +01:00
mi-dprintf.exp Explicit locations: MI support for explicit locations 2015-08-11 17:09:36 -07:00
mi-eval.exp
mi-exit-code.c
mi-exit-code.exp
mi-file-transfer.exp
mi-file.exp
mi-fill-memory.exp
mi-fullname-deleted.exp
mi-hack-cli.exp
mi-i-cmd.exp
mi-info-os.exp
mi-inheritance-syntax-error.cc
mi-inheritance-syntax-error.exp
mi-language.exp
mi-logging.exp
mi-memory-changed.exp
mi-nonstop-exit.exp
mi-nonstop.exp
mi-ns-stale-regcache.exp
mi-nsintrall.exp
mi-nsmoribund.exp
mi-nsthrexec.exp
mi-pending.c
mi-pending.exp Fix pathname prefix and timeout issues in gdb.mi/mi-pending.exp. 2015-09-18 11:52:26 -07:00
mi-pendshr.c
mi-pendshr2.c
mi-pthreads.exp
mi-read-memory.c
mi-read-memory.exp
mi-record-changed.exp
mi-reg-undefined.c
mi-reg-undefined.exp
mi-reg-undefined.S
mi-regs.exp
mi-return.exp
mi-reverse.exp
mi-simplerun.exp
mi-solib.exp
mi-stack.c
mi-stack.exp
mi-start.c
mi-start.exp
mi-stepi.exp
mi-stepn.c
mi-stepn.exp
mi-syn-frame.c
mi-syn-frame.exp
mi-undefined-cmd.exp
mi-until.exp
mi-var-block.exp
mi-var-child-f.exp
mi-var-child.c
mi-var-child.exp
mi-var-cmd.exp
mi-var-cp.cc
mi-var-cp.exp
mi-var-create-rtti.c
mi-var-create-rtti.exp
mi-var-display.exp
mi-var-invalidate.exp
mi-var-list-children-invalid-grandchild.c
mi-var-list-children-invalid-grandchild.exp
mi-var-rtti.cc
mi-var-rtti.exp
mi-vla-c99.exp
mi-vla-fortran.exp Fortran: allocate()d memory is uninitialized 2015-11-04 15:52:41 +01:00
mi-watch-nonstop.exp
mi-watch.exp
mi2-amd64-entry-value.c
mi2-amd64-entry-value.exp
mi2-amd64-entry-value.s
mi2-prompt.exp
mi2-var-child.exp
non-stop-exit.c
non-stop.c
ns-stale-regcache.c
nsintrall.c
nsmoribund.c
nsthrexec.c
pending.c
pendshr1.c
pendshr2.c
pr11022.c
pr11022.exp
pthreads.c
solib-lib.c
solib-main.c
testcmds
until.c
var-cmd.c
vla.c
vla.f90 fort_dyn_array: add basic fortran dyn array support 2015-10-21 15:37:46 -04:00
watch-nonstop.c