]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Cray pointer comparison wrongly optimized away [PR106692]
authorHarald Anlauf <anlauf@gmx.de>
Thu, 2 Jan 2025 19:22:23 +0000 (20:22 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 3 Jan 2025 16:24:05 +0000 (17:24 +0100)
commitc7754a2fb2e60987524947fe189f3ffac035ea1d
treefc49cfdebcd77b6804f197f226bb123c2ef8a2eb
parent75da7a6bdc83d99b994c16764960ba0a7d18e135
Fortran: Cray pointer comparison wrongly optimized away [PR106692]

PR fortran/106692

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_conv_expr_op): Inhibit excessive optimization
of Cray pointers by treating them as volatile in comparisons.

gcc/testsuite/ChangeLog:

* gfortran.dg/cray_pointers_13.f90: New test.
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/cray_pointers_13.f90 [new file with mode: 0644]