[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-23 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #8 from anlauf at gcc dot gnu.org --- It appears that the issue is solved with r15-7165-g3cef53a4d4ff44 . Can you please check?

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-22 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #7 from federico --- Thanks Harald and Steve, great hints. Looking at the `-fdump-tree-original`, I see: - the on-the-fly expression seems the difference between a complex(8) and a complex(4) expressions: ``` __builtin_cabs ( COMP

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #6 from anlauf at gcc dot gnu.org --- The issue can be reduced to the case k=1, i.e. 1x1 matrices. I then get: maxval(abs(A - eye)) = -Infinity Looks like the initial condition of the maximum search plays a role.

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #5 from kargls at comcast dot net --- (In reply to federico from comment #3) > Sorry, I introduced a typo while editing the post. > Here is a slightly shorter version of the sample: > Given your track record in fortran-lang, I ass

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #4 from anlauf at gcc dot gnu.org --- Adding -ffinite-math-only to the compile flag seems to "fix" the problem. This might give a hint.

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread federico.perini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 --- Comment #3 from federico --- Sorry, I introduced a typo while editing the post. Here is a slightly shorter version of the sample: ``` program complex_eye implicit none integer, parameter :: k = 2 integer :: j complex, dimension(k,

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 kargls at comcast dot net changed: What|Removed |Added CC||kargls at comcast dot net --

[Bug fortran/118580] Incorrect complex (sp) - real (dp) operation within maxval

2025-01-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118580 Richard Biener changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIR