CP2K is currently miscompiled by gcc trunk. The last know good version is rev. 149159 first bad version is 149201. I've been able to narrow the problem down to a miscompilation of 1 file, works fine at -O0, but goes wrong at -O1. I don't have a runtime testcase (except running cp2k.sopt on cp2k/tests/QS/H2O.inp), but the file to be attached (derived from cp_linked_list_val.F) is maybe small & clear enough. I can also easily test a number of compile time options.
-- Summary: [4.5 Regression] miscompilation at -O1 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40726