public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/48713] New: Error: invalid instruction suffix for push
@ 2011-04-21 15:29 ian.chivers at chiversandbryan dot co.uk
  2011-04-21 15:44 ` [Bug fortran/48713] " ian.chivers at chiversandbryan dot co.uk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ian.chivers at chiversandbryan dot co.uk @ 2011-04-21 15:29 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/48713] Error: invalid instruction suffix for push
  2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
@ 2011-04-21 15:44 ` ian.chivers at chiversandbryan dot co.uk
  2011-04-21 16:57 ` kargl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ian.chivers at chiversandbryan dot co.uk @ 2011-04-21 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Ian Chivers <ian.chivers at chiversandbryan dot co.uk> 2011-04-21 15:44:07 UTC ---
I have just downloaded and installed the latest development version on this
system and still get the same message. 

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.7.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.7.0 20110419 (experimental) [trunk revision 170140] (GCC)

hope this helps.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/48713] Error: invalid instruction suffix for push
  2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
  2011-04-21 15:44 ` [Bug fortran/48713] " ian.chivers at chiversandbryan dot co.uk
@ 2011-04-21 16:57 ` kargl at gcc dot gnu.org
  2011-04-21 19:11 ` ian.chivers at chiversandbryan dot co.uk
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-04-21 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org 2011-04-21 16:56:14 UTC ---
(In reply to comment #0)

> Target: i586-pc-mingw32


> This system is running Windows Vista Home Premium, 64 bit, sp2.

I think you may have the wrong version of gfortran.  You
are running a 64-bit OS but trying to use a 32-bit version
of the software.  I don't do Windows, but I suspect you
want the MinGW for Win64 from the gfortran wiki


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/48713] Error: invalid instruction suffix for push
  2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
  2011-04-21 15:44 ` [Bug fortran/48713] " ian.chivers at chiversandbryan dot co.uk
  2011-04-21 16:57 ` kargl at gcc dot gnu.org
@ 2011-04-21 19:11 ` ian.chivers at chiversandbryan dot co.uk
  2011-12-17 16:33 ` [Bug target/48713] " ktietz at gcc dot gnu.org
  2011-12-31 23:18 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ian.chivers at chiversandbryan dot co.uk @ 2011-04-21 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Ian Chivers <ian.chivers at chiversandbryan dot co.uk> 2011-04-21 19:11:29 UTC ---
It was not clear to me which one I should have downloaded and installed.

I'm trying to finish a book for springer
and need most of the development stuff, including

  oop
  openmp
  mpi
  coarray

so assumed that 4.7.x was the one to download.

i've got a 32 bit windows system so i'll try 4.7.x
on that and let you know.

we try developing the examples for the book
on several systems and keeping track of them all
and the various compilers is a real headache.

hopefully this is just a 32/64 bit windows
problem from your point of view.

cheers

ian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/48713] Error: invalid instruction suffix for push
  2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
                   ` (2 preceding siblings ...)
  2011-04-21 19:11 ` ian.chivers at chiversandbryan dot co.uk
@ 2011-12-17 16:33 ` ktietz at gcc dot gnu.org
  2011-12-31 23:18 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-12-17 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-12-17 16:14:28 UTC ---
Yes, this issue happens if you are mixing 32-bit binutils and 64-bit gcc.  You
can test, if you have actually downloaded an native 64-bit Windows gcc
compiler, by specifying on command for compile only the option '-m32'.  I
assume it will be successful then.
I've tested your module compilation by i686-w64-mingw32 fortran-compiler and it
translates without flaws.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/48713] Error: invalid instruction suffix for push
  2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
                   ` (3 preceding siblings ...)
  2011-12-17 16:33 ` [Bug target/48713] " ktietz at gcc dot gnu.org
@ 2011-12-31 23:18 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-31 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-31 23:07:05 UTC ---
Not A GCC bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-31 23:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 15:29 [Bug fortran/48713] New: Error: invalid instruction suffix for push ian.chivers at chiversandbryan dot co.uk
2011-04-21 15:44 ` [Bug fortran/48713] " ian.chivers at chiversandbryan dot co.uk
2011-04-21 16:57 ` kargl at gcc dot gnu.org
2011-04-21 19:11 ` ian.chivers at chiversandbryan dot co.uk
2011-12-17 16:33 ` [Bug target/48713] " ktietz at gcc dot gnu.org
2011-12-31 23:18 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).