This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC Bug Report


gcc hangs when compiling certain code with the -maix64 option. I originally 
reported this in http://gcc.gnu.org/ml/gcc-bugs/2000-07/msg00167.html , but 
I've simplified it here:

In the program below, the compilation hangs if the size of the filler array 
is odd and greater than 8. In other words, with -maix64 you cannot pass 
structures of sizeof()=36,44,52,60,...

The size of the backtrace grows with the amount of time you let it hang, so 
it seems to be caught in some infinite iteration.

 > gcc -v -maix64 test.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.c /tmp/ccq69RMb.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 /tmp/ccq69RMb.i 
-quiet -dumpbase test.c -maix64 -version -o /tmp/ccEHp35c.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).

...and hangs...

Cheers,
Peter

/* test.c */

struct dummy_struct {
      int filler[33];  /* comp hangs if array is odd and >8 */
};

main()
{
     struct dummy_struct test;
     int ret;

     ret = test_func(test);

     printf("The structure size is: %6i\n", ret);

}

int
test_func(buf)
     struct dummy_struct buf;
{

     return (sizeof(buf));
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]