public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56087] New: [m68k] gcc miscompiles pari (multiplication)
@ 2013-01-23 19:59 tg at mirbsd dot org
  2013-01-23 20:04 ` [Bug target/56087] " tg at mirbsd dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tg at mirbsd dot org @ 2013-01-23 19:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56087

             Bug #: 56087
           Summary: [m68k] gcc miscompiles pari (multiplication)
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tg@mirbsd.org


Created attachment 29257
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29257
preprocessed reduced testcase

More context: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698380

This turned out to be a miscompilation of one function; reduced testcase (still
pretty large due to header inclusion, but, oh my) attached. Using the same
register twice in muls.l is not permitted. Removing -funroll-loops lets this
use two distinct ones, as do control flow differences.

This happens on native compilation but can be reproduced on cross compilation.

tg@freewrt:~ $ m68k-linux-gnu-gcc -c -g -O3 -funroll-loops -S -o testcase.S
testcase.i && fgrep muls testcase.S
        muls.l #954437177,%d2:%d2
tg@freewrt:~ $ m68k-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=m68k-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/m68k-linux-gnu/4.6/lto-wrapper
Target: m68k-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-15'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix
--with-gxx-include-dir=/usr/m68k-linux-gnu/include/c++/4.6.3 --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libssp
--enable-plugin --enable-objc-gc --disable-werror --disable-multilib
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=m68k-linux-gnu --program-prefix=m68k-linux-gnu-
--includedir=/usr/m68k-linux-gnu/include
--with-headers=/usr/m68k-linux-gnu/include --with-libs=/usr/m68k-linux-gnu/lib
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-15)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-24  9:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 19:59 [Bug target/56087] New: [m68k] gcc miscompiles pari (multiplication) tg at mirbsd dot org
2013-01-23 20:04 ` [Bug target/56087] " tg at mirbsd dot org
2013-01-23 21:16 ` mikpe at it dot uu.se
2013-01-23 22:15 ` tg at mirbsd dot org
2013-01-24  9:31 ` mikpe at it dot uu.se
2013-01-24  9:38 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).