parent
c1aa4de772
commit
a32c71a538
|
@ -0,0 +1,11 @@
|
|||
// Test that attributes weak and alias coexist.
|
||||
|
||||
extern "C" {
|
||||
void f () __attribute__((weak, alias ("_f")));
|
||||
void _f () { }
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
f ();
|
||||
}
|
|
@ -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>;
|
||||
}
|
Loading…
Reference in New Issue