No testcase other than running CP2K, but the code appears to be miscompiled (i.e. segfaults) at -O3, while -O2 goes fine. The last known svn version that was OK was rev. 151454, while the first known failing was 151525. The miscompiled file is pair_potentials.F Any suggestions on how to narrow down the problem?
This could be due to the aliasing changes, since '-O3' fails but '-O3 -fno-strict-aliasing' works.
also '-O3 -fno-inline-functions' works fine, this seems to be the same signature as PR41212.
there are more miscompilations than the one file mentioned here. The full build seems to go fine with -fno-strict-aliasing. I've tested some patches mentioned in PR41212, more info there.
duplicate of PR41212