9496 – [mips-linux] bug in optimizer? (original) (raw)

Attached testcase fails with -O2 and -Os. Parts of the source string "one" get overwritten (see "abcdefghr should be abcdefgh" output of the testcase. Works without problems when compiled with -O0. Testcase is stripped down from glibc's string/tester.c.

gcc -v Reading specs from /usr/local/lib/gcc-lib/mips-unknown-linux-gnu/3.3/specs Configured with: ../gcc-3.3/configure --enable-shared --enable-languages=c Thread model: posix gcc version 3.3 20030127 (prerelease)

uname -a Linux foo 2.4.19-r4k-ip22 #1 Wed Dec 4 10:08:08 CET 2002 mips unknown unknown GNU/Linux (big endian)

Same problem happens with Debian's gcc version 3.2.1., whereas Debian's gcc 2.95.4 0011002 (Debian prerelease) works fine. Please let me know if I can provide any further input.

Release: gcc version 3.3 20030127 (prerelease)

How-To-Repeat: gcc -O2 tester-O2.i ./a.out

Comment 1 agx 2003-01-29 10:16:01 UTC

Fix: unknown

Comment 2 Richard Sandiford 2003-02-26 21:46:13 UTC

Responsible-Changed-From-To: unassigned->rsandifo Responsible-Changed-Why: mine