Bug 30189 - [4.1 Regression] ICE on modified_type_die
Summary: [4.1 Regression] ICE on modified_type_die
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: 4.1.3
Assignee: Alexandre Oliva
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-12-12 22:47 UTC by Jakub Jelinek
Modified: 2007-02-15 07:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.0
Known to fail:
Last reconfirmed: 2007-01-03 16:37:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2006-12-12 22:47:13 UTC
/* { dg-do compile } */
/* { dg-options "-g -O" } */

extern void foo (void);

static
void baz (int i)
{
  foo ();
  typedef char A[i];
  struct { A b; } *x = 0;
}

void
bar (i)
{
  baz (i);
}

ICEs in modified_type_die in 4.1.x (x86_64-linux -m32, -m64, ppc-linux -m32, -m64 at least).  Works with 3.4.6 as well as 4.2.x.
Comment 1 Jakub Jelinek 2006-12-13 11:09:41 UTC
"Fixed" by http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01014.html
modified_type_die rearrangment, which dropped the assert (not sure if intentionally or not).
Comment 2 patchapp@dberlin.org 2007-01-03 17:05:20 UTC
Subject: Bug number PR debug/30189

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00140.html
Comment 3 Mark Mitchell 2007-02-05 05:46:44 UTC
This patch is OK for mainline and 4.2, and for 4.1 after it reopens.
Comment 4 Alexandre Oliva 2007-02-06 01:34:56 UTC
Subject: Bug 30189

Author: aoliva
Date: Tue Feb  6 01:34:37 2007
New Revision: 121637

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121637
Log:
gcc/ChangeLog:
PR debug/30189
* dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
even if cv-qualification is the same.
gcc/testsuite/ChangeLog:
PR debug/30189
* gcc.dg/pr30189.c: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/pr30189.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/dwarf2out.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog

Comment 5 Alexandre Oliva 2007-02-06 01:35:22 UTC
Subject: Bug 30189

Author: aoliva
Date: Tue Feb  6 01:35:10 2007
New Revision: 121638

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121638
Log:
gcc/ChangeLog:
PR debug/30189
* dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
even if cv-qualification is the same.
gcc/testsuite/ChangeLog:
PR debug/30189
* gcc.dg/pr30189.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr30189.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog

Comment 6 Alexandre Oliva 2007-02-15 07:27:14 UTC
Subject: Bug 30189

Author: aoliva
Date: Thu Feb 15 07:27:00 2007
New Revision: 121986

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121986
Log:
gcc/ChangeLog:
PR debug/30189
* dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
even if cv-qualification is the same.
gcc/testsuite/ChangeLog:
PR debug/30189
* gcc.dg/pr30189.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr30189.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/dwarf2out.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog

Comment 7 Alexandre Oliva 2007-02-15 07:27:20 UTC
Fixed