https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127846

Harald Anlauf <anlauf at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #2 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #1)
> Bug confirmed for the library version one gets at -O0.
> 
> The inline code with optimization (-O1) available since gcc-15 seems to give
> the right result:
> 
> y                    m
>  1.0 2.0 3.0 4.0       T T T T
>  3.0 4.0 5.0 1.0       F F F F
>  5.0 1.0 2.0 3.0       T T T T
> minloc(y, mask=m, back=.true.) =  3  2   expected  3  2 (m(2,4) is F)
> maxloc(y, mask=m, back=.true.) =  3  1   expected  3  1 (m(2,3) is F)

Works also without optimization when using -finline-intrinsics

Reply via email to