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

Duplicate symbol error when aliasing to same hardware address across multiple files #1307

Open
mhasel opened this issue Sep 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mhasel
Copy link
Member

mhasel commented Sep 10, 2024

With #1301 we submitted a fix to prevent the pre-processor to generate multiple global variables mapping the same address variable, e.g.:

VAR_GLOBAL
    foo AT %IX1.2.3.4 : BOOL;
    bar AT %IX1.2.3.4 : BOOL;
END_VAR

While the above example now compiles without error, the following example will still fail to compile, reporting ambiguous global variables:

file1.st:

VAR_GLOBAL
    foo AT %IX1.2.3.4 : BOOL;
END_VAR

file2.st

VAR_GLOBAL
    bar AT %IX1.2.3.4 : BOOL;
END_VAR

This is due to the pre-processor only checking for already existing internally mangled globals on a unit-by-unit basis.

@mhasel mhasel added the bug Something isn't working label Sep 10, 2024
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

1 participant