First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 7647
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Mark Mitchell <mmitchel@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: simons@cryp.to
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
test.ii.bz2 test.ii.bz2 application/octet-stream 2003-05-21 15:16 68.16 KB Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 7647 depends on: Show dependency tree
Show dependency graph
Bug 7647 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-08-20 04:46
	g++ crashes when trying to compile the (pre-processed) source
        code appended below.

Release:
3.1

Environment:
System: Linux peti.int.muc.intenga.com 2.4.19-gentoo-r7 #15 Wed Aug 7 23:51:37 CEST 2002 i686 AuthenticAMD
Architecture: i686

	
host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: i586-pc-linux-gnu
configured with: /var/tmp/portage/gcc-3.1-r6/work/gcc-3.1/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=i586-pc-linux-gnu --build=i586-pc-linux-gnu --target=i586-pc-linux-gnu --enable-threads=posix --enable-long-long --enable-cstdio=stdio --enable-clocale=generic --disable-checking --with-gxx-include-dir=/usr/include/g++-v31 --with-local-prefix=/usr/local --with-system-zlib --enable-shared --enable-nls --without-included-gettext

------- Comment #1 From simons@cryp.to 2002-08-20 04:46 -------
Fix:
Fixed in GCC 3.3, GCC 3.4 with:

http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02495.html

------- Comment #2 From Volker Reichelt 2002-09-30 12:14 -------
From: Reichelt <reichelt@igpm.rwth-aachen.de>
To: simons@cryp.to, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
        nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/7647: Internal compiler error
Date: Mon, 30 Sep 2002 12:14:59 +0200

 Hi,
 
 the problem can be reduced to the following code snippet:
 
 -------------------------snip here---------------------
 template <typename T> struct A
 {
     void foo () const {}
     char A;
 };
 
 void bar() { A<void>().foo(); }
 -------------------------snip here---------------------
 
 The code crashes with gcc 3.0.x, 3.1, 3.2, and the main trunk (as of
 20020923). Checked on mips-sgi-irix6.5 and i686-pc-linux-gnu.
 
 The error is:
 
 PR7647.cc: In instantiation of `void A<T>::foo() const [with T = void]':
 PR7647.cc:7:   instantiated from here
 PR7647.cc:3: internal compiler error: Segmentation fault
 Please submit a full bug report, [etc.]
 
 With gcc 2.95.3 I get:
 
 PR7647.cc:4: ANSI C++ forbids data member `A' with same name as enclosing class
 PR7647.cc: In instantiation of `A<void>::foo() const':
 PR7647.cc:7:   instantiated from here
 PR7647.cc:3: confused by earlier errors, bailing out
 
 Greetings,
 Volker Reichelt
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7647
 
 

------- Comment #3 From Kriang Lerdsuwanakij 2002-10-03 08:25 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.

------- Comment #4 From Mark Mitchell 2003-03-30 21:00 -------
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.

------- Comment #5 From Mark Mitchell 2003-03-30 22:30 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7647
Date: 30 Mar 2003 22:30:54 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-03-30 22:30:54
 
 Modified files:
 	gcc/cp         : ChangeLog decl.c search.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/lookup: class-member-2.C 
 
 Log message:
 	PR c++/7647
 	* decl.c (grokdeclarator): Tidy, slightly.
 	* search.c (lookup_field_1): Add want_type parameter.
 	(lookup_field_r): Adjust call to lookup_field_1.
 	
 	PR c++/7647
 	* g++.dg/lookup-class-member-2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3306&r2=1.3307
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1029&r2=1.1030
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&r1=1.257&r2=1.258
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2556&r2=1.2557
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #6 From Mark Mitchell 2003-03-30 22:30 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7647
Date: 30 Mar 2003 22:30:54 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-03-30 22:30:54
 
 Modified files:
 	gcc/cp         : ChangeLog decl.c search.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/lookup: class-member-2.C 
 
 Log message:
 	PR c++/7647
 	* decl.c (grokdeclarator): Tidy, slightly.
 	* search.c (lookup_field_1): Add want_type parameter.
 	(lookup_field_r): Adjust call to lookup_field_1.
 	
 	PR c++/7647
 	* g++.dg/lookup-class-member-2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3306&r2=1.3307
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1029&r2=1.1030
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&r1=1.257&r2=1.258
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2556&r2=1.2557
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #7 From Mark Mitchell 2003-03-30 22:34 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7647
Date: 30 Mar 2003 22:34:05 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-03-30 22:34:05
 
 Modified files:
 	gcc/cp         : ChangeLog search.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/lookup: class-member-2.C 
 
 Log message:
 	PR c++/7647
 	* decl.c (grokdeclarator): Tidy, slightly.
 	* search.c (lookup_field_1): Add want_type parameter.
 	(lookup_field_r): Adjust call to lookup_field_1.
 	
 	PR c++/7647
 	* g++.dg/lookup-class-member-2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.99&r2=1.3076.2.100
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.243.2.3&r2=1.243.2.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.129&r2=1.2261.2.130
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
 


------- Comment #8 From Mark Mitchell 2003-03-30 22:34 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/7647
Date: 30 Mar 2003 22:34:05 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-03-30 22:34:05
 
 Modified files:
 	gcc/cp         : ChangeLog search.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/lookup: class-member-2.C 
 
 Log message:
 	PR c++/7647
 	* decl.c (grokdeclarator): Tidy, slightly.
 	* search.c (lookup_field_1): Add want_type parameter.
 	(lookup_field_r): Adjust call to lookup_field_1.
 	
 	PR c++/7647
 	* g++.dg/lookup-class-member-2.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.99&r2=1.3076.2.100
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.243.2.3&r2=1.243.2.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.129&r2=1.2261.2.130
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
 

------- Comment #9 From Joe Buck 2003-04-25 21:07 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed for 3.3.

First Last Prev Next    No search results available      Search page      Enter new bug