Bug 117773

Summary: ICE compiling teTeX
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: gcc34Assignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.4.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-05-27 14:47:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
input.cc none

Description Tim Waugh 2004-03-08 13:15:31 UTC
Description of problem:
ICE during tetex compilation.

Version-Release number of selected component (if applicable):
gcc34-3.4.0-0.6

How reproducible:
100%

Steps to Reproduce:
1. g++34 -O2 -c input.cc
  
Actual results:
GlobalParams.cc: In member function `void
GlobalParams::parseFile(GString*, FILE*)':
GlobalParams.cc:426: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source stored into /tmp/ccdJyp5G.out file, please attach
this to your bugreport

Additional info:
Not triggered with -O1.

See attached input.cc.

Comment 1 Tim Waugh 2004-03-08 13:16:12 UTC
Created attachment 98368 [details]
input.cc

Comment 2 Jakub Jelinek 2004-03-08 22:45:07 UTC
Simplified into:
// { dg-do compile }
// { dg-options "-O2" }

extern char *foo (char *, int);

struct A
{
  int i;
  void bar (char *);
};

struct B
{
  B ();
  void baz (void *);
};

struct C
{
  C (const char *, int);
};

void
A::bar (char *a)
{
  B *b;
  char *p1, *p2 = a + 512;

  while (foo (a, 511))
    {
      b = new B ();
      p1 = a;
      while (*p1)
        {
          b->baz (new C (p1, p2 - p1));
          p1 = *p2 ? p2 + 1 : p2;
        }
    }
}

Both this testcase and your original testcase don't ICE in gcc-c++-3.4-0.3 though,
so it is apparently something newly introduced.  But certainly present
on vanilla gcc-3_4-branch as of today.

Comment 3 Jakub Jelinek 2004-03-11 10:14:30 UTC
Tracked upstream http://gcc.gnu.org/bugzilla/PR14527