Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to bootstrap when "init_val != 0" is reduced into "init_val" #33

Closed
jserv opened this issue Nov 8, 2020 · 1 comment
Closed
Assignees

Comments

@jserv
Copy link
Collaborator

jserv commented Nov 8, 2020

Reproducible with the following change:

--- a/src/codegen.c
+++ b/src/codegen.c
@@ -77,7 +77,7 @@ void size_funcs(int data_start)
                        data_start + elf_data_idx);
         /* TODO: add .bss section */
         if (strcmp(blk->locals[i].type_name, "int") == 0 &&
-            blk->locals[i].init_val != 0)
+            blk->locals[i].init_val)
             elf_write_data_int(blk->locals[i].init_val);
         else
             elf_data_idx += size_var(&blk->locals[i]);

Stage 2 of the bootstrapping would fail.

@jserv
Copy link
Collaborator Author

jserv commented Oct 27, 2023

This issue no longer exists.

@jserv jserv closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants