-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
local static inside switch is not static enough #11800
Comments
Turns out our variable duplication doesn't copy the flags, argh... Interestingly, this particular issue runs into a separate issue when we fix that:
It took me a second to understand that the issue is the |
Also don't unroll loops that have static vars closes #11800
Would there be any issue with simply hoisting the variable declaration out of the loop? It's confusing when a feature silently disables an optimisation like this. |
Hoisting changes the scope of a local variable, but that should be fine here because it still can only be accessed in its original scope as far as typing is concerned. Unrolling also happens before our local variable renaming step, so this should indeed be possible. |
The text was updated successfully, but these errors were encountered: