Jean Perier ec13942e71 [flang] prevent undefined behavior in character MAXLOC folding
When folding MAXLOC/MINLOC, the current element being compared was moved twice
in row in case it became the new extremum. With numeric and logical types, it
made no difference (std::move is a no-op for them), but for characters
where the string storage is actually moved, it caused the new extremum to
be set to the empty string, leading to wrong results.

Note: I could have left the first std::move relating to logical Findloc, but it
brings nothing and makes the code less auditable, so I also removed it.

Differential Revision: https://reviews.llvm.org/D122590
2022-03-29 09:34:09 +02:00
..
2022-01-15 09:31:00 -08:00
2021-10-18 13:46:46 -07:00
2022-03-23 17:27:05 +00:00
2022-01-15 09:31:00 -08:00
2021-10-28 14:10:16 -07:00
2021-09-16 17:09:23 -07:00