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

Program with unused multiport does not compile #1957

Closed
petervdonovan opened this issue Aug 17, 2023 · 0 comments · Fixed by #1956
Closed

Program with unused multiport does not compile #1957

petervdonovan opened this issue Aug 17, 2023 · 0 comments · Fixed by #1956
Labels
bug Something isn't working c Related to C target

Comments

@petervdonovan
Copy link
Collaborator

The following program does not compile unless // reaction(a) {==} is uncommented:

target C

reactor A {

  output[2] port: int
}

reactor B {
  input[2] a: int
  // reaction(a) {==}
}

main reactor {
  b = new B()
  a = new A()
  a.port -> b.a
}

This is the error message (the original file name was temp.lf):

/home/peter/vscode-lingua-franca/lingua-franca/test/C/src-gen/temp/temp.c:140:30: error: ‘temp_a_port_c’ undeclared (first use in this function); did you mean ‘_a_port_t’?
  140 |     temp_a_self[0]->_lf_port[temp_a_port_c]._base.source_reactor = (self_base_t*)temp_a_self[0];
      |                              ^~~~~~~~~~~~~
      |                              _a_port_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c Related to C target
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant