-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
project/tests/in_progress/for_main/bad/var/init/double/init_double.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <stdio.h> | ||
|
||
double d1; | ||
double d2 = 3.14 | ||
double d3 = 0; | ||
|
||
int main() { | ||
d1 = d2 + d3; | ||
printf("d1 = %f\n, d1); | ||
printf("d2 = %f\n, d2); | ||
printf("d3 = %f\n, d3); | ||
|
||
return 0; | ||
} |
19 changes: 19 additions & 0 deletions
19
project/tests/in_progress/for_main/bad/var/static/some_local_static/some_local_static01.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdio.h> | ||
|
||
void foo1() { | ||
static int a = 10; | ||
a++; | ||
printf("a-foo1 = %d\n", a); | ||
} | ||
|
||
void foo2() { | ||
static int a = 20; | ||
a++; | ||
printf("a-foo2 = %d\n", a); | ||
} | ||
|
||
int main(){ | ||
foo1(); | ||
foo2(); | ||
return 0; | ||
} |
29 changes: 29 additions & 0 deletions
29
project/tests/in_progress/for_main/bad/var/static/some_local_static/some_local_static02.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <stdio.h> | ||
|
||
void foo1() { | ||
static int a = 10; | ||
a++; | ||
printf("a-foo1-1 = %d\n", a); | ||
{ | ||
static int a = 30; | ||
a++; | ||
printf("a-foo1-2 = %d\n", a); | ||
} | ||
} | ||
|
||
void foo2() { | ||
static int a = 20; | ||
a++; | ||
printf("a-foo2-1 = %d\n", a); | ||
{ | ||
static int a = 40; | ||
a++; | ||
printf("a-foo2-2 = %d\n", a); | ||
} | ||
} | ||
|
||
int main(){ | ||
foo1(); | ||
foo2(); | ||
return 0; | ||
} |
33 changes: 33 additions & 0 deletions
33
project/tests/in_progress/for_main/bad/var/static/some_local_static/some_local_static03.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <stdio.h> | ||
|
||
void foo1() { | ||
static int a = 10; | ||
a++; | ||
printf("a-foo1-1 = %d\n", a); | ||
{ | ||
static int a = 30; | ||
a++; | ||
printf("a-foo1-2 = %d\n", a); | ||
} | ||
} | ||
|
||
void foo2() { | ||
static int a = 20; | ||
a++; | ||
printf("a-foo2-1 = %d\n", a); | ||
{ | ||
static int a = 40; | ||
a++; | ||
printf("a-foo2-2 = %d\n", a); | ||
} | ||
} | ||
|
||
static int a = 50; | ||
|
||
int main(){ | ||
a++; | ||
foo1(); | ||
foo2(); | ||
printf("a-glob-static = %d\n", a); | ||
return 0; | ||
} |