Bug 8134 - ICE in force_store_init_value on legal code
Summary: ICE in force_store_init_value on legal code
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2
: P1 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-10-03 12:26 UTC by georgeh
Modified: 2003-07-25 17:33 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description georgeh 2002-10-03 12:26:00 UTC
Compiling the following legal code, I get:
/usr/local/products/gcc/3.2/bin/g++ -c gcc-ice-memptr.C 
gcc-ice-memptr.C:20: Internal compiler error in force_store_init_value, at 
   cp/typeck2.c:443

gcc-ice-memptr.C:
#include <list>

template <class T>
class string2 {
private:
  T default_value; 
  std::list<int> l;
public:
  template <class It>
  string2(const T &_default_value, It begin, It end) {
  }
};

class X {
};

typedef int X::* field_type;
int table[1] = {0};

string2<field_type> s2vh(0,table, table + 1);

Release:
gcc 3.2

Environment:
System: Linux monsterd01 2.4.18-rmap12h #1 SMP Mon May 13 14:01:21 EDT 2002 i686 unknown
Architecture: i686

        <machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.2/configure --disable-nls --enable-languages=c,c++,f77 --disable-libgcj --disable-shared --prefix=/usr/local/products/gcc/3.2

How-To-Repeat:
Repeated on Solaris 2.8 installation of g++ 3.2 as well.
Comment 2 Kriang Lerdsuwanakij 2002-10-04 08:10:29 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.  Regression from GCC 3.0.
Comment 3 pop 2002-10-08 23:31:02 UTC
From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr>
To: lerdsuwa@gcc.gnu.org, alvaro@rentec.com, gcc-bugs@gcc.gnu.org,
	gcc-prs@gcc.gnu.org, georgeh@rentec.com, nobody@gcc.gnu.org,
	gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/8134: ICE in force_store_init_value on legal code
Date: Tue, 8 Oct 2002 23:31:02 +0200

 On Fri, Oct 04, 2002 at 03:10:30PM -0000, lerdsuwa@gcc.gnu.org wrote:
 > Synopsis: ICE in force_store_init_value on legal code
 > 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: lerdsuwa
 > State-Changed-When: Fri Oct  4 08:10:29 2002
 > State-Changed-Why:
 >     Confirmed.  Regression from GCC 3.0.
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8134
 
 I can reproduce the bug with 
 gcc version 3.2.1 20020924 (Debian prerelease)
 
 The bug is not present in:
 gcc version 3.0.4
 
 nor in the latest version in CVS:
 version gcc 3.3 20021007 (experimental)
 
 Seems like the bug was a duplicate of another bug fixed in the mainline.
 I suggest to close this PR.
 
 
 Sebastian

Comment 4 Gabriel Dos Reis 2002-10-08 23:58:35 UTC
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Pop Sébastian <pop@gauvain.u-strasbg.fr>
Cc: lerdsuwa@gcc.gnu.org, alvaro@rentec.com, gcc-bugs@gcc.gnu.org,
   georgeh@rentec.com, gcc-gnats@gcc.gnu.org
Subject: Re: c++/8134: ICE in force_store_init_value on legal code
Date: 08 Oct 2002 23:58:35 +0200

 Pop Sébastian <pop@gauvain.u-strasbg.fr> writes:
 
 | I can reproduce the bug with 
 | gcc version 3.2.1 20020924 (Debian prerelease)
 | 
 | The bug is not present in:
 | gcc version 3.0.4
 | 
 | nor in the latest version in CVS:
 | version gcc 3.3 20021007 (experimental)
 | 
 | Seems like the bug was a duplicate of another bug fixed in the mainline.
 | I suggest to close this PR.
 
 don't you have a GNATS account?
 
 Can you determine which patch fixes this PR?  It would be helpful if
 it could be backported to branch,
 
 -- Gaby

Comment 5 pop 2002-10-09 00:05:38 UTC
From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr>
To: Gabriel Dos Reis <gdr@integrable-solutions.net>
Cc: lerdsuwa@gcc.gnu.org, alvaro@rentec.com, gcc-bugs@gcc.gnu.org,
	georgeh@rentec.com, gcc-gnats@gcc.gnu.org
Subject: Re: c++/8134: ICE in force_store_init_value on legal code
Date: Wed, 9 Oct 2002 00:05:38 +0200

 On Tue, Oct 08, 2002 at 11:58:35PM +0200, Gabriel Dos Reis wrote:
 > Pop Sébastian <pop@gauvain.u-strasbg.fr> writes:
 > 
 > | I can reproduce the bug with 
 > | gcc version 3.2.1 20020924 (Debian prerelease)
 > | 
 > | The bug is not present in:
 > | gcc version 3.0.4
 > | 
 > | nor in the latest version in CVS:
 > | version gcc 3.3 20021007 (experimental)
 > | 
 > | Seems like the bug was a duplicate of another bug fixed in the mainline.
 > | I suggest to close this PR.
 > 
 > don't you have a GNATS account?
 > 
 not yet...
 
 > Can you determine which patch fixes this PR?  It would be helpful if
 > it could be backported to branch,
 > 
 This remembers me something... in typeck2.c 
 I will try to retrieve it.
 
 > -- Gaby

Comment 6 pop 2002-10-09 19:48:12 UTC
From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr>
To: Gabriel Dos Reis <gdr@integrable-solutions.net>
Cc: lerdsuwa@gcc.gnu.org, alvaro@rentec.com, gcc-bugs@gcc.gnu.org,
	georgeh@rentec.com, gcc-gnats@gcc.gnu.org
Subject: Re: c++/8134: ICE in force_store_init_value on legal code
Date: Wed, 9 Oct 2002 19:48:12 +0200

 On Tue, Oct 08, 2002 at 11:58:35PM +0200, Gabriel Dos Reis wrote:
 > 
 > Can you determine which patch fixes this PR?  It would be helpful if
 > it could be backported to branch,
 > 
 
 Here is the original message from the bug report:
 
 /usr/local/products/gcc/3.2/bin/g++ -c gcc-ice-memptr.C 
 gcc-ice-memptr.C:20: Internal compiler error in force_store_init_value, at 
    cp/typeck2.c:443
  
 
 There are 2 patches that modify this function:
 
 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
 * typeck2.c (force_store_init_value): New function.
 
 and 
 
 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
 (force_store_init_value): Remove.
 
 I think that the later closed this bug report.
 
Comment 7 Mark Mitchell 2002-10-16 12:40:20 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.2.1.