From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25286 invoked by alias); 8 Apr 2003 15:56:01 -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 25260 invoked by uid 71); 8 Apr 2003 15:56:00 -0000 Resent-Date: 8 Apr 2003 15:56:00 -0000 Resent-Message-ID: <20030408155600.25258.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, rth@redhat.com, davem@redhat.com, jakub@redhat.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, ghazi@caip.rutgers.edu Received: (qmail 17982 invoked by uid 48); 8 Apr 2003 15:49:54 -0000 Message-Id: <20030408154954.17981.qmail@sources.redhat.com> Date: Tue, 08 Apr 2003 15:56:00 -0000 From: ghazi@caip.rutgers.edu Reply-To: ghazi@caip.rutgers.edu To: gcc-gnats@gcc.gnu.org Cc: rth@redhat.com, davem@redhat.com, jakub@redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: rth@redhat.com davem@redhat.com jakub@redhat.com Subject: target/10349: sparc64-sun-solaris2.7 testsuite failure in g++.dg/parse/stack1.C X-SW-Source: 2003-04/txt/msg00345.txt.bz2 List-Id: >Number: 10349 >Category: target >Synopsis: sparc64-sun-solaris2.7 testsuite failure in g++.dg/parse/stack1.C >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Tue Apr 08 15:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Kaveh Ghazi >Release: gcc version 3.3 20030408 (prerelease) >Organization: >Environment: sparc64-sun-solaris2.7 >Description: As noted here: http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg00483.html I'm getting testsuite failures in gcc-3.3 on sparc64-sun-solaris2.7 for g++.dg/parse/stack1.C. The compiler crashes with a segmentation fault compiling the testcase. After some investigation I determined that the problem is that it is running out of stack space. Solaris2.7 (and 2.8) seem to come configured with stacksize set to 8192K. When I raise it to 16384K the testcase compiles. That seems like an excessively large amount of stack space consumption, given that the regular v7 sparc compiles it in as low as 2048K stack. It's not affected by the GC tuning parameters, i.e. large and small RAM systems get the same crash at stacksize 8192K. A fix for the original problem was applied (see PR2161) but I'm getting failures in this configuration. >How-To-Repeat: The original PR fix involved bison to some degree. I'm using bison 1.75 if that matters. I cannot get the testcase to fail in a 32->64 cross compiler. A native sparc64-sun-solaris2.7 build with stacksize set to 8192 (the default I believe on solaris2.7) seems to be required. You might be able to get it to fail on other sparc64 platforms with limited stacksize, I can't say for sure. Simply compile stack1.C with -S and note the compiler crash. Change stacksize to 16384K and it succeeds. /* PR c/2161: parser stack overflow. */ /* { dg-do compile } */ #define ONE else if (0) { } #define TEN ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE #define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN #define THOU HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN void foo() { if (0) { } /* 11,000 else if's. */ THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU } >Fix: >Release-Note: >Audit-Trail: >Unformatted: