use of alloca and optimization under XL C on AIX 3.1
Vic Abell
abe at mace.cc.purdue.edu
Tue Oct 9 00:38:15 AEST 1990
While porting GNU C to an RS/6000 under AIX 3.1 (the GA and 3015
releases) I followed the BSD porting guide and discovered that I
could not use XL C's -O optimization when I also used the
#pragma alloca
statement - the cc1 program got a segmentation fault. Cc1 and the
rest of GNU C would work if I disabled optimization. In the end I
used the alloca.c package that comes with GNU C to be able to also
use compiler optimization.
Has anyone else encountered this problem? Was my brute-force attempt
to use the pragma correct? (I made the pragma the first statement of
each file that used alloca() after XL C complained about its location
in the config.h header file.)
Vic Abell <abe at mace.cc.purdue.edu>
More information about the Comp.unix.aix
mailing list