Open lukflug opened 3 years ago
Hello @lukflug,
Thanks for the report. Yes, this is a bug — the compiler should not flag an "internal compiler error", ever. I will see how I can fix this issue.
Thank you!
Hello @lukflug,
I am currently trying to reduce the input code you supplied, to a smaller input that triggers the bug, which will hopefully be easier to easier to reason about.
In the meantime, it seems to me that you can work around this bug, by declaring heap_chunk_ptr
as an unsigned
rather than an unsigned long
(I believe it only needs to hold a 16-bit segment component value?).
Thank you!
Thank you for the swift response!
The bug was triggered by adding following line (which I did to track down a logic error in my code):
kprn_x(((unsigned int)((unsigned long)(heap_chunk) >> 16)));
This line is located in the infinite for
loop inside kalloc
.
I hope this helps!
I've tried to use GCC-IA16 to write a real mode OS. However, I've ran into an issue, which may be a compiler bug:
I'm building this on Debian WSL2.
Here is the preprocessed source file: klib.i (Sorry for the somewhat messy code)