[Bug c/53083] gcc bug in moving from the SSE registers back onto the heap.

2012-05-01 Thread da_fox at mad dot scientist.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53083

--- Comment #7 from Da Fox da_fox at mad dot scientist.com 2012-05-01 
07:54:54 UTC ---
(In reply to comment #6)
...
 The latest available gcc-version for my distribution (gentoo) appears to be
 4.6.2, which I will try next.

This seems to still happen with 4.6.2 at least.


[Bug c/53083] gcc bug in moving from the SSE registers back onto the heap.

2012-04-25 Thread da_fox at mad dot scientist.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53083

Da Fox da_fox at mad dot scientist.com changed:

   What|Removed |Added

  Component|target  |c

--- Comment #6 from Da Fox da_fox at mad dot scientist.com 2012-04-25 
07:30:27 UTC ---
(In reply to comment #5)
 BTW: Can you test if this problem is still present in a newer version of the
 compiler (i.e. 4.6.3 or 4.7.0)?

I've tried to take the source-file in question (miarc.c) and make something
self-contained, but I was unable to make it work due to this being an internal
xorg-file, apparently using and depending on internal headers. If you have any
pointers on how to tackle such a situation to convert it to something
selfcontained I'd be happy to try it out.

The latest available gcc-version for my distribution (gentoo) appears to be
4.6.2, which I will try next.


[Bug c/53083] New: gcc bug in moving from the SSE registers back onto the heap.

2012-04-23 Thread da_fox at mad dot scientist.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53083

 Bug #: 53083
   Summary: gcc bug in moving from the SSE registers back onto the
heap.
Classification: Unclassified
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: da_...@mad.scientist.com


After investigation of a suspected graphics-driver bug, it was found that the
issue lay with gcc. Please see
https://bugs.freedesktop.org/show_bug.cgi?id=47559 .

The problem as I understand is that gcc-4.6.0 miscompiles miarc.c from the
xorg-server package if -ftree-vectorize is enabled. This flag is enabled with
-O3.

The following minimal set of CFLAGS worked:
-g -O2

Adding the -ftree-vectorize separately, -g -O2 -ftree-vectorize, caused the
program to misbehave at runtime.

I am running gentoo, the default CFLAGS for my system are:
CFLAGS=-march=native -O3 -pipe -fomit-frame-pointer -fweb -ffast-math
-mtune=native -mfpmath=sse
I don't know if these match exactly with what is passed by portage for
compiling GCC.

Software versions (gentoo package versions):
sys-devel/gcc-4.6.0 
x11-base/xorg-server-1.11.2-r2

My hardware is a Dell XPS 15 (L502x) laptop with a 'Intel(R) Core(TM) i7-2630QM
CPU @ 2.00GHz'

I additional information is required please let me know.


[Bug c/53083] gcc bug in moving from the SSE registers back onto the heap.

2012-04-23 Thread da_fox at mad dot scientist.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53083

--- Comment #2 from Da Fox da_fox at mad dot scientist.com 2012-04-23 
12:26:53 UTC ---
Created attachment 27220
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27220
.i version of miarc.c

I think this is the information that was missing:

The file in question compiled with CFLAGS=-O3 -pipe -fomit-frame-pointer -fweb
-ffast-math -mtune=native -mfpmath=sse (attached)

gcc build options:
 Compiling source in /var/tmp/portage/sys-devel/gcc-4.6.0/work/gcc-4.6.0 ...
 * CFLAGS=-march=native -pipe -mtune=native -O2
 * CXXFLAGS=-march=native -pipe -mtune=native -O2
 * Configuring gcc ...
 * configuring for GCC_LANG: c,c++,fortran

 * PREFIX:/usr
 * BINPATH:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0
 * LIBPATH:/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0
 * DATAPATH:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0
 * STDCXX_INCDIR:/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4

 * Configuring GCC with: 
 * --prefix=/usr 
 * --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0 
 * --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include 
 * --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0 
 * --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/man 
 * --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/info 
 *
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4 
 * --host=x86_64-pc-linux-gnu 
 * --build=x86_64-pc-linux-gnu 
 * --disable-altivec 
 * --disable-fixed-point 
 * --with-ppl 
 * --with-cloog 
 * --disable-ppl-version-check 
 * --with-cloog-include=/usr/include/cloog-ppl 
 * --enable-lto 
 * --enable-nls 
 * --without-included-gettext 
 * --with-system-zlib 
 * --disable-werror 
 * --enable-secureplt 
 * --disable-multilib 
 * --disable-libmudflap 
 * --disable-libssp 
 * --enable-libgomp 
 * --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/python 
 * --enable-checking=release 
 * --disable-libgcj 
 * --enable-languages=c,c++,fortran 
 * --enable-shared 
 * --enable-threads=posix 
 * --enable-__cxa_atexit 
 * --enable-clocale=gnu 
 * --enable-targets=all 
 * --with-bugurl=http://bugs.gentoo.org/ 
 * --with-pkgversion=Gentoo 4.6.0 p1.2, pie-0.4.5

Compiler does not seem to output anything relevant (no errors, compilation is
successful).


[Bug c/53083] gcc bug in moving from the SSE registers back onto the heap.

2012-04-23 Thread da_fox at mad dot scientist.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53083

--- Comment #3 from Da Fox da_fox at mad dot scientist.com 2012-04-23 
12:28:06 UTC ---
gcc -v output:

Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.0/work/gcc-4.6.0/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --with-ppl --with-cloog --disable-ppl-version-check
--with-cloog-include=/usr/include/cloog-ppl --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --disable-multilib --disable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.6.0 p1.2, pie-0.4.5'
Thread model: posix
gcc version 4.6.0 (Gentoo 4.6.0 p1.2, pie-0.4.5)