[Bug target/36806] New: [4.4 Regression] Broken unformatted IOs at rev. 137644 on i686-apple-darwin9

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Fri Jul 11 10:55:00 GMT 2008


Starting from revision 137644 up to 137712 (137615 is working), unformatted IOs
in FORTRAN give hanging executables. For instance, the executable from the
following code

       data=-1
!       print *, 'before'
       write(11) data
!       print *, 'after'
       end

hangs after creating an empty fort.11 file:

[ibook-dhum] f90/bug% time a.out
^C0.000u 0.002s 0:51.34 0.0%    0+0k 0+1io 0pf+0w

If I compile the code with gfortran 4.3.1 and -S, then compile the assembly
with gfortran 4.4.0, I get:

Bus error
0.000u 0.002s 0:00.91 0.0%      0+0k 0+1io 0pf+0w

The crash occurs in MAIN__ ()

(gdb) s
main (argc=1, argv=0xbfffdb98) at ../../../gcc-4.4-work/libgfortran/fmain.c:21
21        MAIN__ ();
(gdb) s

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00000000 in ?? ()


Now if I compile with gfortran 4.4.0 and -S, then compile the assembly with
gfortran 4.3.1, the executable gives the right fort.11 file.

So it seems that that something is miscompiled in libgfortran. Could it be
related to pr36765?


-- 
           Summary: [4.4 Regression] Broken unformatted IOs at rev. 137644
                    on i686-apple-darwin9
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: i686-apple-darwin9
  GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9


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



More information about the Gcc-bugs mailing list