From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28530 invoked by alias); 7 Apr 2003 06:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28516 invoked by uid 71); 7 Apr 2003 06:16:00 -0000 Date: Mon, 07 Apr 2003 06:16:00 -0000 Message-ID: <20030407061600.28511.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/10323: The preprocessor consumes all the memory Reply-To: Neil Booth X-SW-Source: 2003-04/txt/msg00225.txt.bz2 List-Id: The following reply was made to PR preprocessor/10323; it has been noted by GNATS. From: Neil Booth To: Zack Weinberg Cc: lu_zero@gentoo.org, gcc-gnats@gcc.gnu.org Subject: Re: preprocessor/10323: The preprocessor consumes all the memory Date: Mon, 7 Apr 2003 07:07:23 +0100 Zack Weinberg wrote:- > lu_zero@gentoo.org writes: > > > Preprocessing altivec code it just consumes all the memory and then > > dies reporting: > > cpp0: Cannot allocate 262144112 bytes after allocating 7222368 bytes > > I can confirm this with mainline, it looks like infinite recursion in > the macro expander. Neil, can you take a look? I'm pretty certain that the macro expander doesn't recurse or loop. I've looked at it briefly. It looks like everything is OK - the expansion is just 100s of megabytes or even gigabytes big. The line that dies is (you can cut the main file down to just this line) tmp = vec_sub (vec_avg (avg0, avg1), vec_and (vec_and (ones, vec_or (xor0, xor1)), vec_xor (avg0, avg1))); Just the 2nd line here by itself expands to almost 6 megs. I think it's fair to expect the whole lot to be "very big". Can you get any other compiler to compile it? If you can, I'll look at it more closely, but I think it's a case of "don't do that, use temporaries instead". Neil.