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

RuSTy fails to compile a simple function block #1226

Open
rohanrayan opened this issue May 22, 2024 · 1 comment
Open

RuSTy fails to compile a simple function block #1226

rohanrayan opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rohanrayan
Copy link

Describe the bug
I am trying to compile the following code with RuSTy and it gives an error, could you please let me know how to fix it?

FUNCTION_BLOCK testAddon
    METHOD PUBLIC testmethod : STRING
        VAR_INPUT
            testvar: DWORD;
        END_VAR    
    END_METHOD
END_FUNCTION_BLOCK

error:

thread 'main' panicked at src/codegen/generators/pou_generator.rs:561:22:
internal llvm codegen error: ()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce
Copy the code snippet to a .st file (ex: sample.st)
try to compile using:
plc --ir sample.st

Expected behavior
I expect RuSTy to generate an LLVM-IR for this code

@rohanrayan rohanrayan added the bug Something isn't working label May 22, 2024
@riederm
Copy link
Collaborator

riederm commented Jun 6, 2024

hi @rohanrayan , thx for the issue.
so far we implemented a language grammar of iec61131-3 from a version that did not support oop (classes and methods). Implementing OOP support (ant therefore also methods) is scheduled for the 2nd half of 2024.

We'll need to postpone this issue a bit, but we'll get there soon.

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