2001-09-14 23:43:17 +00:00
|
|
|
#include <stdio.h>
|
2001-09-11 14:25:16 +00:00
|
|
|
|
2001-09-14 23:43:17 +00:00
|
|
|
extern int deallocate_foo;
|
|
|
|
|
|
|
|
extern int * bar ();
|
|
|
|
extern int * foo ();
|
|
|
|
extern void abort ();
|
|
|
|
extern void foobar ();
|
|
|
|
|
|
|
|
void
|
|
|
|
foobar ()
|
|
|
|
{
|
|
|
|
if (&deallocate_foo != bar () || &deallocate_foo != foo ())
|
|
|
|
abort ();
|
|
|
|
|
|
|
|
if (deallocate_foo)
|
|
|
|
printf ("weak deallocate_foo\n");
|
|
|
|
else
|
|
|
|
printf ("strong deallocate_foo\n");
|
|
|
|
}
|
2001-09-11 14:25:16 +00:00
|
|
|
|
|
|
|
int *
|
|
|
|
bar()
|
|
|
|
{
|
|
|
|
return &deallocate_foo;
|
|
|
|
}
|