Bug 10503 - [3.2/3.3/3.4 regression] Compilation never stops in fixed_type_or_null
Summary: [3.2/3.3/3.4 regression] Compilation never stops in fixed_type_or_null
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 3.4.0
Assignee: Mark Mitchell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-25 17:26 UTC by have
Modified: 2004-01-17 04:22 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
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 have 2003-04-25 17:26:00 UTC
When compiling this piece of code, compiler never stops [without any error message].
[OK with g++-2.95 and 3.0]

Release:
3.2, 3.3, 3.4

Environment:
Linux i686

How-To-Repeat:
// Just try to compile this
struct B {
  void g() { }
};

struct A {
  void f() {
    B &b = b;
    b.g();
  }
};

int main(void) { }
Comment 2 Steven Bosscher 2003-04-25 17:59:17 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed -- tail recursion optimization bug????
Comment 3 Mark Mitchell 2003-04-27 19:53:17 UTC
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.
Comment 4 Mark Mitchell 2003-04-28 06:06:59 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/10503
Date: 28 Apr 2003 06:06:59 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-04-28 06:06:59
 
 Modified files:
 	gcc/cp         : ChangeLog method.c cp-tree.h class.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/init: new6.C ref6.C 
 
 Log message:
 	PR c++/10506
 	* method.c (use_thunk): Decrement immediate_size_expand.
 	
 	PR c++/10503
 	* cp-tree.h (DECL_VAR_MARKED_P): New macro.
 	(DECL_MAYBE_TEMPLATE): Remove.
 	* class.c (fixed_type_or_null): Avoid infinite recursion.
 	
 	PR c++/10506
 	* g++.dg/init/new6.C: New test.
 	
 	PR c++/10503
 	* g++.dg/init/ref6.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3344&r2=1.3345
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.246&r2=1.247
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.839&r2=1.840
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.533&r2=1.534
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2626&r2=1.2627
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 5 Mark Mitchell 2003-04-28 06:06:59 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/10503
Date: 28 Apr 2003 06:06:59 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2003-04-28 06:06:59
 
 Modified files:
 	gcc/cp         : ChangeLog method.c cp-tree.h class.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/init: new6.C ref6.C 
 
 Log message:
 	PR c++/10506
 	* method.c (use_thunk): Decrement immediate_size_expand.
 	
 	PR c++/10503
 	* cp-tree.h (DECL_VAR_MARKED_P): New macro.
 	(DECL_MAYBE_TEMPLATE): Remove.
 	* class.c (fixed_type_or_null): Avoid infinite recursion.
 	
 	PR c++/10506
 	* g++.dg/init/new6.C: New test.
 	
 	PR c++/10503
 	* g++.dg/init/ref6.C: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3344&r2=1.3345
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.246&r2=1.247
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.839&r2=1.840
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.533&r2=1.534
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2626&r2=1.2627
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 6 Mark Mitchell 2003-04-28 06:09:51 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/10503
Date: 28 Apr 2003 06:09:51 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-04-28 06:09:51
 
 Modified files:
 	gcc/cp         : ChangeLog method.c cp-tree.h class.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/init: new6.C ref6.C 
 
 Log message:
 	PR c++/10506
 	* method.c (use_thunk): Decrement immediate_size_expand.
 	
 	PR c++/10503
 	* cp-tree.h (DECL_VAR_MARKED_P): New macro.
 	(DECL_MAYBE_TEMPLATE): Remove.
 	* class.c (fixed_type_or_null): Avoid infinite recursion.
 	
 	PR c++/10506
 	* g++.dg/init/new6.C: New test.
 	
 	PR c++/10503
 	* g++.dg/init/ref6.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.117&r2=1.3076.2.118
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.237.4.1&r2=1.237.4.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.776.2.16&r2=1.776.2.17
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.499.2.11&r2=1.499.2.12
 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.156&r2=1.2261.2.157
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
 

Comment 7 Mark Mitchell 2003-04-28 06:09:51 UTC
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/10503
Date: 28 Apr 2003 06:09:51 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	mmitchel@gcc.gnu.org	2003-04-28 06:09:51
 
 Modified files:
 	gcc/cp         : ChangeLog method.c cp-tree.h class.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/init: new6.C ref6.C 
 
 Log message:
 	PR c++/10506
 	* method.c (use_thunk): Decrement immediate_size_expand.
 	
 	PR c++/10503
 	* cp-tree.h (DECL_VAR_MARKED_P): New macro.
 	(DECL_MAYBE_TEMPLATE): Remove.
 	* class.c (fixed_type_or_null): Avoid infinite recursion.
 	
 	PR c++/10506
 	* g++.dg/init/new6.C: New test.
 	
 	PR c++/10503
 	* g++.dg/init/ref6.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.117&r2=1.3076.2.118
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.237.4.1&r2=1.237.4.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.776.2.16&r2=1.776.2.17
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.499.2.11&r2=1.499.2.12
 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.156&r2=1.2261.2.157
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
Comment 8 Mark Mitchell 2003-04-28 06:11:18 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.3, GCC 3.4.
Comment 9 CVS Commits 2004-02-28 11:24:10 UTC
Subject: Bug 10503

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_2-rhl8-branch
Changes by:	jakub@gcc.gnu.org	2004-02-28 11:24:05

Modified files:
	gcc/cp         : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : class.c method.c cp-tree.h 
Added files:
	gcc/testsuite/g++.dg/init: ref6.C new6.C 

Log message:
	2003-04-27  Mark Mitchell  <mark@codesourcery.com>
	
	PR c++/10506
	* method.c (use_thunk): Decrement immediate_size_expand.
	
	PR c++/10503
	* cp-tree.h (DECL_VAR_MARKED_P): New macro.
	(DECL_MAYBE_TEMPLATE): Remove.
	* class.c (fixed_type_or_null): Avoid infinite recursion.
	
	PR c++/10506
	* g++.dg/init/new6.C: New test.
	
	PR c++/10503
	* g++.dg/init/ref6.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.2685.2.114.2.8.2.27&r2=1.2685.2.114.2.8.2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.78&r2=1.1672.2.166.2.8.2.79
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.436.2.10.2.4.2.6&r2=1.436.2.10.2.4.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.219.2.4.8.2&r2=1.219.2.4.8.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.681.2.12.2.3.2.8&r2=1.681.2.12.2.3.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ref6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.32.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.32.1