diff options
Diffstat (limited to 'util/romcc/tests/simple_test85.c')
-rw-r--r-- | util/romcc/tests/simple_test85.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test85.c b/util/romcc/tests/simple_test85.c new file mode 100644 index 0000000000..f223e2e3a5 --- /dev/null +++ b/util/romcc/tests/simple_test85.c @@ -0,0 +1,51 @@ +struct sub4 { + unsigned a; + unsigned b; + unsigned c; + unsigned d; + unsigned e; + unsigned f; + unsigned g; +}; +struct sub3 { + unsigned a; + unsigned b; + unsigned c; + unsigned d; + unsigned e; + unsigned f; + struct sub4 s4; +}; +struct sub2 { + unsigned a; + unsigned b; + unsigned c; + unsigned d; + unsigned e; + struct sub3 s3; +}; +struct sub1 { + unsigned a; + unsigned b; + struct sub2 s2; +}; + +struct stuff { + signed int a; + signed int b; + signed int c; + unsigned int d; + struct sub1 s1; +}; + + +static void main(void) +{ + struct stuff *var; + unsigned int *foo; + + var = (struct stuff *)(0x12345678); + foo = &var->d; + foo = &((*var).d); + foo = &var->s1.s2.s3.s4.g; +} |