scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 3e1a3035dc3e9959cdbba2cc3d658eacbf62d761
parent 84847138062fe977c49c7dc838d8421ed2064822
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 13 Aug 2015 23:48:07 +0200

Add test002

This test tests forward references of structures.
At this moment it is failling, but it is a first
step to fix it.

Diffstat:
Acc1/tests/test002.c | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/cc1/tests/test002.c b/cc1/tests/test002.c @@ -0,0 +1,32 @@ +/* +name: TEST002 +description: Test forward references before definition of type definition +output: +S2 S +G4 P x +F1 +X6 F1 main +G6 F1 main { +- +S2 S ( +M5 I +) +A2 S2 y + A2 M5 .I #I0 :I + G4 @S2 A2 :S +} +*/ + +struct S *x; +struct S { + int i; +}; + +void +main(void) +{ + struct S y; + + y.i = 0; + *x = y; +}