scc

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

commit 99f65931e88b3a22b2bd5e9e88bf6798c529023c
parent 15a08e3fab9ec6ed44b7be3195947399219d7a39
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue,  6 Oct 2015 15:27:37 +0200

Add basic test for tentative definitions

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

diff --git a/cc1/tests/test038.c b/cc1/tests/test038.c @@ -0,0 +1,41 @@ + +/* +name: TEST038 +description: Basic test for tentative definitions +output: +G1 I x + G1 #I0 :I +F2 I E +X3 F2 main +F4 P E +G5 F4 foo +{ +\ + r X3 'P +} +G3 F2 main +{ +\ + G1 #I0 :I + r G1 +} +*/ + +int x; +int x = 0; +int x; + +int main(); + +void * +foo() +{ + return &main; +} + +int +main() +{ + x = 0; + return x; +}