This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/21898] New: Segmentation fault on testsuite case gcc.dg/20020425-1.c
- From: "e9925248 at stud4 dot tuwien dot ac dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2005 09:34:54 -0000
- Subject: [Bug regression/21898] New: Segmentation fault on testsuite case gcc.dg/20020425-1.c
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$./cc1 t2.c
{GC 767k -> 688k} foo
Segmentation fault
$cat t2.c
/* 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
}
$./cc1 --version
GNU C version 4.1.0 20050603 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.1.0 20050302 (experimental).
GGC heuristics: --param ggc-min-expand=0 --param ggc-min-heapsize=0
Older version do not have this problem:
$gcc -c t2.c
$gcc --version
gcc (GCC) 4.1.0 20050302 (experimental)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: Segmentation fault on testsuite case gcc.dg/20020425-1.c
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: e9925248 at stud4 dot tuwien dot ac dot at
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21898