This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure in stage1 fix-header, !HAVE_DESIGNATED_INITIALIZERS
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Bootstrap failure in stage1 fix-header, !HAVE_DESIGNATED_INITIALIZERS
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Sun, 20 Aug 2000 00:25:14 -0700
- Cc: NeilB at earthling dot net, gcc-bugs at gcc dot gnu dot org
- References: <200008200511.BAA01858@caip.rutgers.edu>
On Sun, Aug 20, 2000 at 01:11:47AM -0400, Kaveh R. Ghazi wrote:
> > From: Zack Weinberg <zack@wolery.cumb.org>
> >
> > On Sat, Aug 19, 2000 at 10:06:39PM -0400, Kaveh R. Ghazi wrote:
> > > Recent CVS dies in stage1 whenever one uses cc to bootstrap on
> > > mips-sgi-irix6.2 and sparc-sun-solaris2.7. Fix-header gobbles up
> > > memory until it runs out and xmalloc fails.
> > >
> > > The trigger appears to be the HAVE_DESIGNATED_INITIALIZERS else-clause
> > > since if I force the compiler to take the else path, it always fails
> > > even with gcc.
> >
> > Bizarre; none of the code under !HAVE_DESIGNATED_INITIALIZERS should
> > be allocating memory.
> >
> > I'll look into this as soon as I get a chance, but if you could change
> > xmalloc so it aborts on failure, run the offending process under the
> > debugger, and send me a backtrace, I'd much appreciate it.
> > zw
>
> Ok.
>
> BTW, I think I found a hint as to why it dies. The _cpp_IStable and
> _cpp_trigraph_map arrays are never initialized.
Argh. Right. Add a call to cpp_init() just before the call to
cpp_reader_init(&scan_in) in fix-header.c:read_scan_file. That should
fix the problem. (If it does, please check in a patch to that effect.)
zw