scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 2ce22577d4ef7361895212ed8719c8ff8f36e601
parent 40c38052a3f66ee50d55d848b57f7d7d7a97a547
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 10 Jan 2016 09:36:01 +0100

Add test about double typedef

This test is interesting because it has a typedef in
the declaration of the type and in the definition of
the type.

Diffstat:
cc1/tests/test043.c | 34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

diff --git a/cc1/tests/test043.c b/cc1/tests/test043.c @@ -0,0 +1,34 @@ +/* +name: TEST043 +description: Test for double typedef (taken from plan9 kernel) +output: +F4 0 +S2 Clock0link +M6 P clock +M8 P link +G9 S2 cl0 +F10 I +G11 F10 main +{ +\ + G9 M6 .P @F4 c0 + r #I0 +} +*/ + +typedef struct Clock0link Clock0link; +typedef struct Clock0link { + void (*clock)(void); + Clock0link* link; +} Clock0link; + + + +Clock0link cl0; + +int +main(void) +{ + (*cl0.clock)(); + return 0; +}