From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12805 invoked by alias); 13 Oct 2012 23:35:47 -0000 Received: (qmail 6611 invoked by uid 48); 13 Oct 2012 23:35:23 -0000 From: "gnu.0kn at gishpuppy dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54923] New: Internal unit I/O error when using -malign-double Date: Sat, 13 Oct 2012 23:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gnu.0kn at gishpuppy dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01288.txt.bz2 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.