From-SVN: r26971
This commit is contained in:
Jason Merrill 1999-05-17 06:16:04 -04:00
parent c1aa4de772
commit a32c71a538
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// Test that attributes weak and alias coexist.
extern "C" {
void f () __attribute__((weak, alias ("_f")));
void _f () { }
}
int main ()
{
f ();
}

View File

@ -0,0 +1,25 @@
typedef __SIZE_TYPE__ size_t;
template <class T>
struct A
{
int size;
A ()
{
T *p;
p = new T[size];
int foo;
foo = 5 * size;
};
};
struct B
{
virtual ~B() { }
void operator delete [] (void *ptr, size_t size) { }
};
int main ()
{
A<B> *p = new A<B>;
}