Commit bf88d870 by Andrew Pinski Committed by Andrew Pinski

Andrew Pinski <pinskia@physics.uc.edu>

        PR c++/10476
        * g++.dg/expr/crash-1.C: New test.

        PR c++/11027
        * g++.dg/template/init3.C: New test.

        PR c++/8222
        * g++.dg/template/non-dependent1.C: New test.

        PR c++/11070
        * g++.dg/template/non-dependent2.C: New test.

        PR c++/11071
        * g++.dg/template/non-dependent3.C: New test.

        PR c++/9907
        * g++.dg/template/sizeof5.C: New test.

From-SVN: r69529
parent 26e0dcb3
2003-07-17 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/10476
* g++.dg/expr/crash-1.C: New test.
PR c++/11027
* g++.dg/template/init3.C: New test.
PR c++/8222
* g++.dg/template/non-dependent1.C: New test.
PR c++/11070
* g++.dg/template/non-dependent2.C: New test.
PR c++/11071
* g++.dg/template/non-dependent3.C: New test.
PR c++/9907
* g++.dg/template/sizeof5.C: New test.
2003-07-17 Geoffrey Keating <geoffk@apple.com>
PR 11498
......
// C++ PR/10476
// Origin: larsbj@gullik.net and bangerth@dealii.org
struct X {
X();
X(const X& __str);
};
X const bar();
void foo()
{
X y;
(true ? y : bar());
}
// PR c++/11027
template <class T>
struct X {
typedef void (X::*pfun)();
static pfun p[];
};
template <class T>
typename X<T>::pfun X<T>::p[] = {};
//PR c++/8222
// Origin: giovannibajo@libero.it and setzersn@gmx.de
// { dg-do run }
struct Foo
{
template <class>
void func() {}
};
template <class>
void Bar(Foo* p)
{
p->func<int>();
}
int main()
{
Foo c;
Bar<int>(&c);
}
//PR c++/11070
// Used to ICE
// Origin: bangerth@dealii.org and rwgk@yahoo.com
template <bool b> struct X {
template <typename T>
static int* execute(int* x) { return x; }
};
template <typename T> void foo() {
static bool const same = true;
X<same>::execute<int> (0);
}
template void foo<int> ();
//PR c++/11071
// Used to ICE
// Origin: bangerth@dealii.org and rwgk@yahoo.com
template <bool b> struct X {
template <typename T>
static int* execute(T* x) { return x; }
};
template <typename T> void foo() {
static bool const same = true;
X<same>::execute ((int*)0);
}
template void foo<int> ();
// PR c++/9907
// Origin: nes@lrde.epita.fr
// sizeof(foo()) was not considered constant.
template <unsigned n> struct bar {};
int foo();
template <class T>
void baz()
{
bar<sizeof(foo())> b;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment