gcc-2.95.2 hangs with -maix64 option...

Peter Fagerstroem pfagerst@legato.com
Thu Jul 6 08:06:00 GMT 2000


Hi,

I'm having problems compiling some code on AIX when I try to use the 
-maix64 option. I've attached the source code file, but its short so here 
it is again:

#include <sys/statfs.h>
main()
{
     struct statfs statbuf;
     char file[]="/etc/motd";
     int ret;

     ret = test_func(statbuf, file);  /* problem goes away if this line 
commented out */

     printf("The return value is: %6i\n", sizeof(statbuf));

}

int
test_func(buf, str)
     struct statfs buf;
     char *str;
{
     int val;
     val = statfs(str, &buf);
     return val;
}

The problem seems to be in passing the struct statfs between functions. 
This compiles no problem for 32-bit output, but hangs indefinitely when the 
-maix64 option is used. If I comment out the call to test_func() in main(), 
it will compile with -maix64. Otherwise, the output is as follows:

pfagerst@obelisk $ gcc -v --save-temps -maix64 test_statfs.c
Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/specs
gcc version 2.95.2 19991024 (release)
  /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/cpp -lang-c -v 
-D__GNUC__=2 -D__GNUC_MINOR__=95 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 
-D_AIX43 -D_LONG_LONG -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 
-D_LONG_LONG -Asystem(unix) -Asystem(aix) -D__CHAR_UNSIGNED__ -D__64BIT__ 
-D_ARCH_PPC test_statfs.c test_statfs.i
GNU CPP version 2.95.2 19991024 (release)
#include "..." search starts here:
#include <...> search starts here:
  /usr/local/include
  /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/../../../../rs6000-ibm 
/usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/../../../../rs6000-ibm-a 
ix4.3.3.0/include
  /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/include
  /usr/include
End of search list.
The following default directories have been omitted from the search path:
  /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/../../../../include/g++-3
End of omitted list.
  /usr/local/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.2/cc1 test_statfs.i 
-quiet -dumpbase test_statfs.c -maix64 -version -o test_statfs.s
GNU C version 2.95.2 19991024 (release) (rs6000-ibm-aix4.3.3.0) compiled by 
GNU C version 2.95.2 19991024 (release).
^C

...and hangs. The same behavior occurs when trying to compile on both a 43P 
Model 260 (64-bit machine) or a 43P Model 150 (32-bit machine), both 
running AIX 4.3.3.0. I was concerned that perhaps there was a problem with 
our local build and install of the product, but the same problem occurred 
when I installed the binaries from 
http://www.rge.com/systems/aix/bull/aix432/ , which is linked to from the 
gcc home page. (Those binaries are for powerpc-ibm-aix4.3.1.0.)

I have also attached the gzipped file of the cpp output.

I have been unable to find any mention of this problem in the 
documentation. Could someone please confirm this behavior? If not, then any 
suggestions about the possible problems would be greatly appreciated...

Cheers,
Peter


More information about the Gcc-bugs mailing list