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

PASCOMPL: Register usage bug in write(...) #10

Open
leobru opened this issue May 15, 2019 · 0 comments
Open

PASCOMPL: Register usage bug in write(...) #10

leobru opened this issue May 15, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@leobru
Copy link
Collaborator

leobru commented May 15, 2019

Computing a variable range set uses I12 which contains the file pointer for the I/O routines but write(...) processing overwrites the register usage map and doesn't restore the file pointer to I12 after computing the expression.
Therefore, writeln('some string', value IN [low..high]); skips the Boolean or crashes.
A fix should maintain the existing optimization of write(a, b, c, d); not setting I12 before each item because the write routines themselves do not corrupt the file pointer.

@sergev sergev added the bug Something isn't working label May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants