[Bug target/56087] [m68k] gcc miscompiles pari (multiplication)

2013-01-24 Thread mikpe at it dot uu.se


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



--- Comment #4 from Mikael Pettersson mikpe at it dot uu.se 2013-01-24 
09:31:20 UTC ---

I've checked and gcc-4.6 does miscompile this test case, but gets it right with

the PR52573 fix applied.  Vanilla gcc-4.7 doesn't seem to miscompile this

particular test case, but it still miscompiles the original PR52573 test case. 

Anyway, I'm certain this PR is a dup of PR52573 so please close it as such.


[Bug target/56087] [m68k] gcc miscompiles pari (multiplication)

2013-01-24 Thread jakub at gcc dot gnu.org


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



Jakub Jelinek jakub at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 CC||jakub at gcc dot gnu.org

 Resolution||DUPLICATE



--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2013-01-24 
09:37:17 UTC ---

Dup.



*** This bug has been marked as a duplicate of bug 52573 ***


[Bug target/56087] [m68k] gcc miscompiles pari (multiplication)

2013-01-23 Thread tg at mirbsd dot org

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

Thorsten Glaser tg at mirbsd dot org changed:

   What|Removed |Added

   Keywords||wrong-code
 Target||m68k-linux-gnu
  Known to work||4.7.2
   Host||x86_64-linux-gnu or
   ||m68k-linux-gnu
  Known to fail||4.6.3
  Build||x86_64-linux-gnu or
   ||m68k-linux-gnu

--- Comment #1 from Thorsten Glaser tg at mirbsd dot org 2013-01-23 20:03:57 
UTC ---
There it works:

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

Would still be nice to get a patch for 4.6 which is currently the “workhorse”
compiler for m68k (lots of use, patches, Ada works, fixes and ports to MiNT).


[Bug target/56087] [m68k] gcc miscompiles pari (multiplication)

2013-01-23 Thread mikpe at it dot uu.se


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



Mikael Pettersson mikpe at it dot uu.se changed:



   What|Removed |Added



 CC||mikpe at it dot uu.se



--- Comment #2 from Mikael Pettersson mikpe at it dot uu.se 2013-01-23 
21:15:40 UTC ---

(In reply to comment #0)



 Using the same register twice in muls.l is not permitted. 



This sounds a lot like PR52573, a patch was proposed in July 2012 and finally

approved and committed a few days ago in r195288, see

http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00936.html.



Can you confirm that Debian's gcc 4.6 lacks the PR52573 fix but its 4.7 does

have the fix?  If that's not the case, then this must be a different bug that

just happens to have symptoms similar to PR52573.


[Bug target/56087] [m68k] gcc miscompiles pari (multiplication)

2013-01-23 Thread tg at mirbsd dot org


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



--- Comment #3 from Thorsten Glaser tg at mirbsd dot org 2013-01-23 22:15:36 
UTC ---

tags 698380 + patch fixed-upstream

thanks



mikpe at it dot uu.se dixit:



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



Mikael Pettersson mikpe at it dot uu.se changed:



--- Comment #2 from Mikael Pettersson mikpe at it dot uu.se 2013-01-23 
21:15:40 UTC ---

(In reply to comment #0)



This sounds a lot like PR52573, a patch was proposed in July 2012 and finally

approved and committed a few days ago in r195288, see

http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00936.html.



Thanks Mikael! @GCC developers, in this case sorry for the noise,

but you do have a better overview of possible causes.



Doko, could you please apply the aforementioned patch in your

next upload of gcc-4.6 to unstable?



Thanks in advance,

//mirabilos