re PR c++/38357 (ICE cc1plus (Segmentation fault))

PR c++/38357
	* g++.dg/template/crash87.C: New test.

From-SVN: r143403
This commit is contained in:
Steve Ellcey 2009-01-15 18:09:04 +00:00 committed by Steve Ellcey
parent 5fa0e8530e
commit f1253e7e69
2 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-01-15 Steve Ellcey <sje@cup.hp.com>
PR c++/38357
* g++.dg/template/crash87.C: New test.
2009-01-15 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/37843

View File

@ -0,0 +1,27 @@
// Origin: PR c++/38357
// { dg-do compile }
class BUG
{
public:
bool name() { return true; }
};
template <bool T>
struct BUG1_5
{
};
template <bool name>
class BUG2 : BUG
{
public:
typedef BUG1_5<name> ptr; // { dg-error "could not convert template argument" }
};
int main()
{
BUG2<false> b;
return 0;
}