Bug 14810 - [3.4/4.0 regression] tree check failures with invalid code involving templates
Summary: [3.4/4.0 regression] tree check failures with invalid code involving templates
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.3.4
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-checking, ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2004-04-01 14:07 UTC by Volker Reichelt
Modified: 2004-10-07 03:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.1 4.0.0
Known to fail:
Last reconfirmed: 2004-04-01 15:50:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2004-04-01 14:08:03 UTC
Mark, your patches

http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg01269.html (3.4 version)
http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg01270.html (mainline version)

cause several tree check failures with invalid code involving templates like

testsuite/g++.dg/parse/error1.C    (PR 10432)

===================================================
struct INCOMPLETE;
template <int> struct X {
    static INCOMPLETE value;
};
template <> INCOMPLETE X<1>::value = 0; // { dg-error "" }
===================================================

testsuite/g++.dg/template/error1.C (PR 10219)

===================================================
template <class T> void make_pair(T x);

void foo(){
  struct fps_chan_ID fps; // { dg-error "incomplete" "" }
  make_pair(fps); // { dg-error "no matching function" "" }
}
===================================================

Could you please have a look?
Comment 1 Andrew Pinski 2004-04-01 15:50:16 UTC
Confirmed, Mark could you look into this?
Comment 2 CVS Commits 2004-04-01 20:02:16 UTC
Subject: Bug 14810

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-04-01 20:02:08

Modified files:
	gcc/cp         : ChangeLog name-lookup.c 

Log message:
	PR c++/14810
	* name-lookup.c (maybe_push_cleanup_level): Robustify.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4022&r2=1.4023
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.49&r2=1.50

Comment 3 CVS Commits 2004-04-01 20:03:12 UTC
Subject: Bug 14810

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-04-01 20:03:06

Modified files:
	gcc/cp         : ChangeLog name-lookup.c 

Log message:
	PR c++/14810
	* name-lookup.c (maybe_push_cleanup_level): Robustify.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.91&r2=1.3892.2.92
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.10&r2=1.34.2.11

Comment 4 Mark Mitchell 2004-04-01 20:05:59 UTC
Fixed in GCC 3.4 and GCC 3.5.
Comment 5 CVS Commits 2004-05-04 00:21:46 UTC
Subject: Bug 14810

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	reichelt@gcc.gnu.org	2004-05-04 00:21:39

Modified files:
	gcc/cp         : decl.c ChangeLog 

Log message:
	Backport:
	2004-04-01  Mark Mitchell  <mark@codesourcery.com>
	PR c++/14810
	* decl.c (maybe_push_cleanup_level): Robustify.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.965.2.82&r2=1.965.2.83
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.267&r2=1.3076.2.268