From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29790 invoked by alias); 7 May 2010 14:42:23 -0000 Received: (qmail 29718 invoked by uid 48); 7 May 2010 14:41:59 -0000 Date: Fri, 07 May 2010 14:42:00 -0000 Subject: [Bug fortran/44027] New: Segfault on internal read with -malign-double X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "Igor dot Katchaev at cern dot ch" 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: 2010-05/txt/msg00694.txt.bz2 Results and status of internal read are wrong if -malign-double option is specified. Seen on (32 bit) SLC4 gfortran 4.3.3 (i686-pc-linux-gnu), Ubuntu9 gfortran 4.4.1 (Ubuntu 4.4.1-4ubuntu9), rhel6 beta (4.4.3-1.el6.i386). No problem on g77 and gfortran (4.1.2-44.EL4_8.1.i386) on SLC4, gfortran (4.1.2-48.el5.i386) on slc5. Under Ubuntu9 gfortran 4.4.1: % gfortran -malign-double ttest.f && ./a.out Segmentation fault Under SLC4 gfortran 4.3.3: % gfortran -malign-double ttest.f && ./a.out Bad input 1 iostat -1 ival = 4685168 ------ ttest.f ------ program ttest implicit none integer ival, ierr character*1 str str = "1" read(str,*,iostat=ierr) ival if (ierr.ne.0) then write(0,*) 'Bad input ',str,' iostat',ierr endif write(0,*) 'ival = ', ival end ------ EOF ------ Regards, Igor -- Summary: Segfault on internal read with -malign-double Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Igor dot Katchaev at cern dot ch GCC build triplet: gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) GCC host triplet: Linux pcbecn 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:0 GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44027