diff options
Diffstat (limited to 'test/lld/init.c')
-rw-r--r-- | test/lld/init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lld/init.c b/test/lld/init.c new file mode 100644 index 000000000..3a9311e3c --- /dev/null +++ b/test/lld/init.c @@ -0,0 +1,15 @@ +volatile int x, y; + +__attribute__((constructor)) +void init_x() { + x = 14; +} + +__attribute__((constructor)) +void init_y() { + y = 144; +} + +int main() { + return x + y; +} |