From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19353 invoked by alias); 21 Apr 2011 15:29:39 -0000 Received: (qmail 19345 invoked by uid 22791); 21 Apr 2011 15:29:38 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_JL X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Apr 2011 15:29:22 +0000 From: "ian.chivers at chiversandbryan dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48713] New: Error: invalid instruction suffix for push 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: ian.chivers at chiversandbryan dot co.uk 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 Date: Thu, 21 Apr 2011 15:29:00 -0000 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: 2011-04/txt/msg02281.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48713 Summary: Error: invalid instruction suffix for push Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: ian.chivers@chiversandbryan.co.uk I get the above error when trying to compile the following fortran module. module timing_module implicit none integer , dimension(8) , private :: dt real , private :: h,m,s,ms,tt real , private :: last_tt contains subroutine start_timing() implicit none call date_and_time(values=dt) print 100 , dt(1:3),dt(5:8) 100 format( 1x,i4,'/',i2,'/',i2,1x,i2,':',i2,':',i2,1x,i3) h = real(dt(5)) m = real(dt(6)) s = real(dt(7)) ms = real(dt(8)) last_tt = 60*(60*h+m) + s + ms/1000.0 end subroutine start_timing subroutine print_date_and_time implicit none call date_and_time(values=dt) print 100 , dt(1:3),dt(5:8) 100 format( 1x,i4,'/',i2,'/',i2,1x,i2,':',i2,':',i2,1x,i3) end subroutine print_date_and_time subroutine print_hms implicit none call date_and_time(values=dt) print 100 , dt(5:8) 100 format( 1x,i2,':',i2,':',i2,1x,i3) end subroutine print_hms subroutine print_ms implicit none call date_and_time(values=dt) h = real(dt(5)) m = real(dt(6)) s = real(dt(7)) ms = real(dt(8)) tt = 60*(60*h+m) + s + ms/1000.0 print 100 , tt 100 format( 1x,f14.3) end subroutine print_ms subroutine print_time_difference implicit none call date_and_time(values=dt) h = real(dt(5)) m = real(dt(6)) s = real(dt(7)) ms = real(dt(8)) tt = 60*(60*h+m) + s + ms/1000.0 print 100 , (tt-last_tt) 100 format( 1x,f14.3) last_tt=tt end subroutine print_time_difference real function time_difference() implicit none tt = 0.0 call date_and_time(values=dt) h = real(dt(5)) m = real(dt(6)) s = real(dt(7)) ms = real(dt(8)) tt = 60*(60*h+m) + s + ms/1000.0 time_difference=tt-last_tt end function time_difference end module timing_module Here is the output from gfortran -v d:\document\fortran\newbook\examples\ch28\gfortran>gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=c:/program files (x86)/gfortran/bin/../libexec/gcc/i586-pc-m ingw32/4.6.0/lto-wrapper.exe Target: i586-pc-mingw32 Configured with: ../gcc-trunk/configure --prefix=/mingw --enable-languages=c,for tran --with-gmp=/home/brad/gfortran/dependencies --disable-werror --enable-threa ds --disable-nls --build=i586-pc-mingw32 --enable-libgomp --enable-shared --disa ble-win32-registry --with-dwarf2 --disable-sjlj-exceptions --enable-lto Thread model: win32 gcc version 4.6.0 20110214 (experimental) [trunk revision 170140] (GCC) d:\document\fortran\newbook\examples\ch28\gfortran> This system is running Windows Vista Home Premium, 64 bit, sp2.