------- Comment #7 from tkoenig at gcc dot gnu dot org 2008-09-12 19:57 ------- The value of i gets overwritten in the library when assiging a value to dtp->u.p.mode. OUCH.
This is what I get when running the 4.3 - compiled program against the 4.4 library: $ gfortran-4.3 -g foo.f90 $ gdb ./a.out GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) b foo.f90:2 Breakpoint 1 at 0x80485a1: file foo.f90, line 2. (gdb) r Starting program: /home/ig25/Krempel/ABI/a.out Breakpoint 1, test_kind () at foo.f90:5 5 kind_numbers(1:3) = 3 Current language: auto; currently fortran (gdb) watch i Hardware watchpoint 2: i (gdb) c Continuing. Hardware watchpoint 2: i Old value = -1208866858 New value = 1 0x080485d5 in test_kind () at foo.f90:6 6 DO i = 1, 3 (gdb) c Continuing. Hardware watchpoint 2: i Old value = 1 New value = 0 data_transfer_init (dtp=0xbf82f9f0, read_flag=0) at ../../../../gcc/trunk/libgfortran/io/transfer.c:1825 1825 dtp->u.p.mode = read_flag ? READING : WRITING; Current language: auto; currently c (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37498