summary refs log tree commit diff
path: root/src/test/run-make/extern-fn-with-packed-struct/test.c
blob: c3456a64b9bc40bdcbc7af04ba00be8f5e6e30e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Pragma needed cause of gcc bug on windows: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
#pragma pack(1)
struct __attribute__((packed)) Foo {
    char a;
    short b;
    char c;
};

struct Foo foo(struct Foo foo) {
    return foo;
}