diff options
| author | 2025-12-13 19:21:04 +0100 | |
|---|---|---|
| committer | 2025-12-13 19:21:04 +0100 | |
| commit | e51ac7ec7d3e32e1771c9f824da3dc7e4dcd2bc5 (patch) | |
| tree | a0b7a0c29247374b96fdbfb29bc365d15e9e36a5 /test/external/c-testsuite/tests/single-exec/00050.c | |
| parent | 6c7cdc537b7b341f9ca25a3e8b61de46c99840e7 (diff) | |
add c-testsuite
Diffstat (limited to 'test/external/c-testsuite/tests/single-exec/00050.c')
| -rw-r--r-- | test/external/c-testsuite/tests/single-exec/00050.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/external/c-testsuite/tests/single-exec/00050.c b/test/external/c-testsuite/tests/single-exec/00050.c new file mode 100644 index 0000000..42591a1 --- /dev/null +++ b/test/external/c-testsuite/tests/single-exec/00050.c @@ -0,0 +1,33 @@ +struct S1 { + int a; + int b; +}; + +struct S2 { + int a; + int b; + union { + int c; + int d; + }; + struct S1 s; +}; + +struct S2 v = {1, 2, 3, {4, 5}}; + +int +main() +{ + if(v.a != 1) + return 1; + if(v.b != 2) + return 2; + if(v.c != 3 || v.d != 3) + return 3; + if(v.s.a != 4) + return 4; + if(v.s.b != 5) + return 5; + + return 0; +} |