On 11/27/24 12:31 PM, Harald Anlauf wrote:
Dear all,
the attached patch fixes a wrong-code issue with bounds-checking
enabled when doing I/O of an array section and an index is either
an expression or a function result. The problem does not occur
without bounds-checking.
When looking at the original testcase, the function occuring in
the affected index was evaluated twice, once with wrong arguments.
The most simple solution appears to fall back to scalarization
with bounds-checking enabled. If someone has a quick idea to
handle this better, please speak up!
Regtested on x86_64-pc-linux-gnu. OK for mainline?
This seems to be a 14/15 regression, so a backport is advisable.
Thanks,
Harald
The patch looks OK to me.
I wonder if this fall back to the scalarizer should be done everywhere
if a a user has specified bounds checking, what is the point of
optimizing array references?
If the code works in 13 maybe we need to isolate to what broke it and
intervene at that place.
Also go ahead with back porting if no other ideas pop up. I just fear
we are covering up something else.
Jerry