You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be inclined to agree with you, but a quick test on some other simulators indicates they also truncate, either silently or with a warning. I found this discussion which relates, but doesn't reach any conclusion.
I'll need to take a look. I don't remember the details without more context, but I think we are implicitly assuming that all this eventually gets flattened, normalized and limited to something that is addressed by 32-bits. Maybe the limiting is happening too early. There's also the issue that we do not use types with explicit widths (e.g. uint32_t, int64_t, etc.) so there is some variation depending on the environment.
The current behavior for array indices wider than 32 bits is that the upper bits are silently truncated and the lower bits are used as the index E.g.
In my opinion this should be treated as out-of-bounds instead. And it is if the index is constant. E.g.
But we have a test that explicitly checks that upper bits for dynamic indices are discarded.
@caryr its been a while, but you created that test. Any thoughts on this?
The text was updated successfully, but these errors were encountered: