Retro68/binutils/ld/testsuite/ld-plugin/pr15323a.c

24 lines
254 B
C
Raw Normal View History

#include <stdio.h>
int x;
2017-04-10 11:32:00 +00:00
int y;
__attribute__((weak))
2017-04-10 11:32:00 +00:00
void foobar (void) { y++; x++; }
int main (void)
{
foobar ();
2017-04-10 11:32:00 +00:00
if (y == 0)
{
if (x == -1)
printf ("OK\n");
}
else
{
if (x == 1)
printf ("OK\n");
}
return 0;
}