PGI 7.0.2 compile issue - "invalid for push" error

I am trying to use the 7.0.2 version of PGI on RHEL5.1. The OS is 64 bit but I am compiling in 32 bit mode. I get the following error when compiling

/tmp/pgf90yjThiJKfFvTc.s: Assembler messages:
/tmp/pgf90yjThiJKfFvTc.s:20:Error suffix or operands invalid for ‘push’

I turned on -Mkeepasm and looked at the file which simply has a:
pushl %ebp

in it…pgf90 -V returns that it is 7.0-2 and 32 bit…

Any help would be much appreciated.


The assembly looks 32-bit. Perhaps you get the 64-bit assembler. Can you post the output of pgf90 -v a.f

The /usr/bin/as part should have --32 in it.

For example;

/usr/bin/as /tmp/pgf90CAbdu73HytNA.s --32 -o /tmp/pgf908Abd0v3UHIMP.o