File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
async def compile (source_path : str | Path , output_path : str | Path ) -> None :
7
7
clang = await create_subprocess_exec (
8
- "clang " ,
8
+ "gcc " ,
9
9
str (source_path ),
10
10
"-o" ,
11
11
str (output_path ),
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
2
3
3
void fibonacci (int n ) {
4
- int a = 0 , b = 1 , next ;
4
+ int a = 0 , b = 1 , next = 0xbeef ;
5
5
printf ("Fibonacci sequence up to %d terms:\n" , n );
6
6
for (int i = 1 ; i <= n ; i ++ ) {
7
7
printf ("%d " , a );
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def _(message: any) -> None:
56
56
assert fibonacci ["b" ].type == "int"
57
57
assert fibonacci ["b" ].value == 1
58
58
assert fibonacci ["next" ].type == "int"
59
- assert fibonacci ["next" ].value == 0
59
+ assert fibonacci ["next" ].value == 0xBEEF
60
60
61
61
main = frames [(1 , "main" )]
62
62
assert len (main ) == 1
@@ -66,7 +66,7 @@ def _(message: any) -> None:
66
66
assert memory [fibonacci ["n" ].address , "int" ].value == 10
67
67
assert memory [fibonacci ["a" ].address , "int" ].value == 0
68
68
assert memory [fibonacci ["b" ].address , "int" ].value == 1
69
- assert memory [fibonacci ["next" ].address , "int" ].value == 0
69
+ assert memory [fibonacci ["next" ].address , "int" ].value == 0xBEEF
70
70
assert memory [main ["n" ].address , "int" ].value == 10
71
71
72
72
await debug .finish ()
You can’t perform that action at this time.
0 commit comments