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/54923] New: Internal unit I/O error when using -malign-double


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

             Bug #: 54923
           Summary: Internal unit I/O error when using -malign-double
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gnu.0kn@gishpuppy.com


Reading from of integer from character string fails with 
Fortran runtime error: Internal unit I/O error
when compiling with -malign-double.

Background: This occurred when using the usual getarg(1,arg) construct and
linking against FFTW3, which requires data alignment.

Minimal example:
___

      PROGRAM readtest
      IMPLICIT NONE

      CHARACTER*8 arg
      INTEGER inputarg

      arg=" 1 "
      READ(arg,*) inputarg
      PRINT *,"Argument supplied was: ", inputarg

      RETURN
      END
___

Compiling with gfortran without data alignment yields the expected result.
Compiling with -malign-double in the compiler options yields runtime error.

Thank you.


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