http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46678
Summary: [4.6 Regression] Wrong code with strings Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Blocks: 46641 Related to PR 46641. Part of http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/1b907e3b7b6f3461 Test case: http://groups.google.com/group/comp.lang.fortran/msg/cb8e13e6226bc6c5 gfortran mishandles strings. The program should - and does with GCC 4.5 - print ... Calling sub with N = 9 123456789 ... However, GCC 4.6 prints garbage such as: ... Calling sub with N = 124 |P���1234|>|3456789012345678{�R����@@V��� ... working: GCC 4.5.1 20101116 working: 2010-07-12-r162074 working: r162209 (cff02494c6064641537dbe3d76430c6a6d7b5c49) failing: r162225 (4fc1631a745b296a00a1c12167f4bbe7e93b047d) failing: r162275 (cb885d9b457451ef64ec3dc093ef6c78545fb199) failing: r162276 (540a8975b511546901446f43b79d46e52690b4f3) failing: 2010-07-16-r162255 (segfault), 2010-08-28-r163612 (bogus characters) failing: GCC 4.6.0 20101116 and 20101124