Path: utzoo!attcan!uunet!world!decwrl!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!noose.ecn.purdue.edu!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe From: abe@mace.cc.purdue.edu (Vic Abell) Newsgroups: comp.unix.aix Subject: use of alloca and optimization under XL C on AIX 3.1 Message-ID: <5719@mace.cc.purdue.edu> Date: 8 Oct 90 14:38:15 GMT Organization: Purdue University Lines: 17 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