Bug 41312 - [4.5 Regression] miscompilation of CP2K at -O3
Summary: [4.5 Regression] miscompilation of CP2K at -O3
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on: 41212
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-08 20:17 UTC by Joost VandeVondele
Modified: 2009-09-15 16:21 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2009-09-08 20:17:21 UTC
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?
Comment 1 Joost VandeVondele 2009-09-09 04:47:56 UTC
This could be due to the aliasing changes, since '-O3' fails but '-O3 -fno-strict-aliasing' works.
Comment 2 Joost VandeVondele 2009-09-09 04:57:23 UTC
also '-O3 -fno-inline-functions' works fine, this seems to be the same signature as PR41212.
Comment 3 Joost VandeVondele 2009-09-12 08:30:55 UTC
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.
Comment 4 Joost VandeVondele 2009-09-15 16:21:33 UTC
duplicate of PR41212