GCC 4.6.3 (cc1) crashes when compiling MPFR 3.1.0

Bug #968766 reported by Sleep Less
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Medium
Ulrich Weigand
4.6
Fix Released
Medium
Ulrich Weigand
4.7
Fix Released
Medium
Ulrich Weigand
gcc
Fix Released
Medium
gcc-4.6 (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Won't Fix
Medium
Unassigned

Bug Description

...
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DMPFR_USE_THREAD_SAFE=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -I. -I../../mpfr-3.1.0/src -I/home/leif/Sage/sage-5.0.beta10-gcc-4.6.3/local/include -Wall -Wmissing-prototypes -Wpointer-arith -g -O3 -march=native -O3 -g -fno-strict-aliasing -DHONORS_CFLAGS -MT set_f.lo -MD -MP -MF .deps/set_f.Tpo -c -o set_f.lo ../../mpfr-3.1.0/src/set_f.c
libtool: compile: gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DMPFR_USE_THREAD_SAFE=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -I. -I../../mpfr-3.1.0/src -I/home/leif/Sage/sage-5.0.beta10-gcc-4.6.3/local/include -Wall -Wmissing-prototypes -Wpointer-arith -g -O3 -march=native -O3 -g -fno-strict-aliasing -DHONORS_CFLAGS -MT set_f.lo -MD -MP -MF .deps/set_f.Tpo -c ../../mpfr-3.1.0/src/set_f.c -fPIC -DPIC -o .libs/set_f.o
../../mpfr-3.1.0/src/set_f.c: In function 'mpfr_set_f':
../../mpfr-3.1.0/src/set_f.c:27:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccAHajJU.out file, please attach this to your bugreport.
make[2]: *** [set_f.lo] Fehler 1
make[2]: Verlasse Verzeichnis '/tmp/mpfr-3.1.0-build/src'
make[1]: *** [all] Fehler 2
make[1]: Verlasse Verzeichnis '/tmp/mpfr-3.1.0-build/src'
make: *** [all-recursive] Fehler 1

(The segfault is reproducible.)

CFLAGS taken from an MPIR (2.1.3) installation:

#define __GMP_CC "gcc"
#define __GMP_CFLAGS " -g -O3 -march=native -O3 -g -fno-strict-aliasing -DHONORS_CFLAGS "

Note that MPFR compiles just fine with GCC 4.6.3 on various systems, including e.g. Ubuntu 10.04.4 LTS x86_64.

Also, this didn't happen for someone else with a previous beta of Precise (although in a 32-bit VM IIRC).

I've attached the preprocessed source, FWIW. Going to experiment with compiler flags (especially "-march=...") ...

$ lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

$ LANG=en_US gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --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/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu3)

$ head -25 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
stepping : 7
microcode : 0x1a
cpu MHz : 800.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 4789.25
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: cpp-4.6 4.6.3-1ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-20.33-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Fri Mar 30 02:26:29 2012
EcryptfsInUse: Yes
ExecutablePath: /usr/lib/gcc/x86_64-linux-gnu/4.6/cc1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120301)
SourcePackage: gcc-4.6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sleep Less (not-really) wrote :
Revision history for this message
Sleep Less (not-really) wrote :

It doesn't crash with "-O3" replaced by "-O2" (still with "-march=native"); also MPFR passes its test suite ('make check') with these settings / that build.

summary: - GCC (cc1) crashes when compiling MPFR 3.1.0
+ GCC 4.6.3 (cc1) crashes when compiling MPFR 3.1.0
Revision history for this message
Sleep Less (not-really) wrote :

Similar for Singular (3-1-3-3): g++ / cc1plus crashes with "-O3", builds with "-O2" instead.

Hopefully Precise won't ship with a broken compiler... Haven't had such issues with GCC 4.6.3 installations I built myself.

Revision history for this message
Sleep Less (not-really) wrote :

Just checked: It's really only that single file of MPFR (set_f.c) Ubuntu's current GCC / cc1 crashes on with '-O3'.

After 'make' failed in the first place, I just took the libtool command ("/bin/bash ../libtool --tag=CC --mode=compile gcc ..."), replaced the two occurrences of '-O3' by '-O2', executed that, then resumed the build by typing 'make' again.

That succeeded (compiling also all remaining files with '-O3'), as well as afterwards 'make check' did (which again involves building).

(This was a build outside of and completely unrelated to Sage, with GMP 5.0.4 built from scratch, but on the same machine.)

Revision history for this message
Sleep Less (not-really) wrote :

FWIW, I've built a "vanilla" GCC 4.6.3 from scratch (along with GMP 5.0.4, MPFR 3.1.0-p8, MPC 0.9, PPL 0.12, CLooG 0.15.11 and libelf 0.8.13), installed it (as well as the libraries) under /usr/local, and don't get any crashes with that version. In particular, both MPFR and Singular build just fine with '-O3'.

The crash on Singular 3-1-3-3 (cc1plus) with '-O3' also happens with GCC 4.6.3-1ubuntu3 in a 32-bit virtual machine (Precise with all recent updates), as a friend just confirmed. (To trigger this, one has to [also] put '-O3' into CPPFLAGS, not just CXXFLAGS, since otherwise the setting gets overridden by a subsequent '-O2' in the compile command.)

Revision history for this message
Sleep Less (not-really) wrote :

P.S.:

$ LANG=en_US gcc-4.6.3 -v
Using built-in specs.
COLLECT_GCC=gcc-4.6.3
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-linux-gnu/4.6.3/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-4.6.3/configure -v --prefix=/usr/local --program-suffix=-4.6.3 --enable-version-specific-runtime-libs --with-included-gettext --enable-languages=all --enable-__cxa_atexit --enable-gnu-indirect-function --enable-libstdcxx-debug --enable-libgcj-debug --enable-static-libjava --enable-tls --enable-targets=all --enable-multilib-list=m32,m64,mx32 --enable-threads --enable-lto --enable-plugin --enable-multiarch --with-arch-32=prescott --with-arch-64=native --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local --build=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (GCC)

Revision history for this message
Matthias Klose (doko) wrote :

Program received signal SIGSEGV, Segmentation fault.
0x0000000000806eb8 in supportable_widening_operation ()
(gdb) bt
#0 0x0000000000806eb8 in supportable_widening_operation ()
#1 0x0000000000b2b164 in ?? ()
#2 0x0000000000b2bc12 in vect_pattern_recog ()
#3 0x0000000000821045 in vect_slp_analyze_bb ()
#4 0x0000000000821d1b in ?? ()
#5 0x000000000068eab9 in execute_one_pass ()
#6 0x000000000068ed75 in execute_pass_list ()
#7 0x000000000068ed87 in execute_pass_list ()
#8 0x000000000068ed87 in execute_pass_list ()
#9 0x000000000075bf51 in tree_rest_of_compilation ()
#10 0x00000000008a074f in ?? ()
#11 0x00000000008a23fa in cgraph_optimize ()
#12 0x00000000008a27fa in cgraph_finalize_compilation_unit ()
#13 0x00000000004a3925 in c_write_global_declarations ()
#14 0x00000000007207be in toplev_main ()
#15 0x00007ffff6f4576d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#16 0x00000000004932b9 in _start ()

Matthias Klose (doko)
Changed in gcc-4.6 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → Triaged
Revision history for this message
Matthias Klose (doko) wrote :

not seen with the FSF branch, but with the Linaro 4.6 branch

Changed in gcc-4.6 (Ubuntu Precise):
milestone: none → precise-updates
Revision history for this message
Matthias Klose (doko) wrote :

could you provide the preprocessed source for the singular ICE as well?

Revision history for this message
Sleep Less (not-really) wrote :

Sure.

g++ -march=native -O3 -g -fno-strict-aliasing -DHONORS_CXXFLAGS -O2 -g -fPIC -pipe -fno-implicit-templates -I. -I.. -I/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/local -I/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/local/include -I/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/local/include -I/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/local/include -march=native -O3 -g -DHONORS_CPPFLAGS -DNDEBUG -DOM_NDEBUG -Dx86_64_Linux -DHAVE_CONFIG_H -c sparsmat.cc
sparsmat.cc: In function ‘long int smExpBound(ideal, int, int, int)’:
sparsmat.cc:216:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
sparsmat.cc:217:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
sparsmat.cc: In function ‘BOOLEAN smIsNegQuot(poly, poly, poly)’:
sparsmat.cc:1948:16: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /data/tmp/ccdVNSe9.out file, please attach this to your bugreport.
Traceback (most recent call last):
  File "/usr/share/apport/gcc_ice_hook", line 15, in <module>
    import apport, apport.fileutils
ImportError: No module named apport
make[2]: *** [sparsmat.o] Error 1
make[2]: Leaving directory `/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/spkg/build/singular-3-1-3-3.p6/src/kernel'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/spkg/build/singular-3-1-3-3.p6/src'
make: *** [/mnt/linux-data-on-win7/Sage/sage-5.0.beta11-gcc-4.6.3-1ubuntu3/local/bin/Singular-3-1-3] Error 2

:-)

Revision history for this message
Sleep Less (not-really) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

the cc1plus is another issue. now tracked in bug 972648

Revision history for this message
Michael Hope (michaelh1) wrote :

Thank you for the bug report. I've confirmed this with gcc-linaro-4.6-2012.03+bzr106882 on x86_64:

michaelh@crucis:~/linaro/gcc/build/native-4.6/gcc$ PATH=.:$PATH ./xgcc -c -O3 -march=native -fno-use-linker-plugin ~/linaro/bugs/lp968766.i
../../mpfr-3.1.0/src/set_f.c: In function ‘mpfr_set_f’:
../../mpfr-3.1.0/src/set_f.c:27:1: internal compiler error: Segmentation fault

The fault occurs in the SLP vectoriser. The work-around is to compile at -O3 -fno-tree-slp-vectorize or at -O2. I'll try to reproduce it against upstream.

I've set it to medium priority as it is a ftbfs, has a work around, and occurs at high optimisation levels. It seems similar to LP: #960283.

The backtrace is:

supportable_widening_operation (code=WIDEN_MULT_EXPR, stmt=0x7ffff5045410,
    vectype_out=0x7ffff504ca80, vectype_in=0x7ffff504c930, decl1=0x7fffffffdbf0,
    decl2=0x7fffffffdbf0, code1=0x7fffffffdc04, code2=0x7fffffffdc04,
    multi_step_cvt=0x7fffffffdc08, interm_types=0x7fffffffdbf8)
    at ../../../4.6/gcc/tree-vect-stmts.c:5922
5922 loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (stmt_info);
(gdb) back
#0 supportable_widening_operation (code=WIDEN_MULT_EXPR, stmt=0x7ffff5045410,
    vectype_out=0x7ffff504ca80, vectype_in=0x7ffff504c930, decl1=0x7fffffffdbf0,
    decl2=0x7fffffffdbf0, code1=0x7fffffffdc04, code2=0x7fffffffdc04,
    multi_step_cvt=0x7fffffffdc08, interm_types=0x7fffffffdbf8)
    at ../../../4.6/gcc/tree-vect-stmts.c:5922
#1 0x0000000000b31ef4 in vect_recog_widen_mult_pattern (stmts=0x7fffffffdc98,
    type_in=0x7fffffffdca0, type_out=0x7fffffffdca8) at ../../../4.6/gcc/tree-vect-patterns.c:634
#2 0x0000000000b329a2 in vect_pattern_recog_1 (stmts_to_replace=0x7fffffffdc98,
    vect_recog_func=0xb31b00 <vect_recog_widen_mult_pattern>, si=...)
    at ../../../4.6/gcc/tree-vect-patterns.c:1727
#3 vect_pattern_recog (loop_vinfo=<optimized out>, bb_vinfo=0x126bcf0)
    at ../../../4.6/gcc/tree-vect-patterns.c:1934
#4 0x00000000008260a5 in vect_slp_analyze_bb_1 (bb=0x7ffff52606e8)
    at ../../../4.6/gcc/tree-vect-slp.c:1977
#5 vect_slp_analyze_bb (bb=0x7ffff52606e8) at ../../../4.6/gcc/tree-vect-slp.c:2108
#6 0x0000000000826d7b in execute_vect_slp () at ../../../4.6/gcc/tree-vectorizer.c:256

Changed in gcc-linaro:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Ulrich Weigand (uweigand)
Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :

Building the following testcase with -O -ftree-vectorize on x86_64:

long
test (int *x)
{
  unsigned long sx, xprec;

  sx = *x >= 0 ? *x : -*x;

  xprec = sx * 64;

  if (sx < 16384)
    foo (sx);

  return xprec;
}

results in an ICE:

crash1.c:5:1: internal compiler error: vector VEC(vec_void_p,base) index domain error, in vinfo_for_stmt at tree-vectorizer.h:628

(When building with --disable-checking, we get a segmentation fault instead.)

Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :

It seems the problem is that vect_recog_widen_mult_pattern includes a statement into a pattern it detects which is actually outside of the basic block that SLP is currently operating on. This later on causes the ICE since the statement does not have an assigned stmt_vinfo.

I'm testing a fix.

Revision history for this message
Ulrich Weigand (uweigand) wrote :

This affects current FSF mainline as well. I've opened a GCC bugzilla report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52870

Changed in gcc-linaro:
status: Triaged → In Progress
Revision history for this message
Sleep Less (not-really) wrote :

You mean current svn trunk?

I don't get this error with (released) GCC 4.6.3 nor 4.7.0, just with Ubuntu's 4.6.3-1ubuntu3.

Also your test case from bugzilla works for me with both of these.

Revision history for this message
Michael Hope (michaelh1) wrote :

Yip, in trunk. The fault is in the SLP vectoriser that are in trunk, our 4.7, and our 4.6. They're not in the FSF 4.7.0 release.

Revision history for this message
Maarten Bezemer (veger) wrote :

Thanks for taking the time to report this bug in the upstream bug tracking system this is a tremendous help. Launchpad has the ability to watch lots of upstream bug trackers and this can be done by following the procedure documented at https://wiki.ubuntu.com/Bugs/Watches. I've added the bug watch for this bug report.

Changed in gcc:
importance: Unknown → Medium
status: Unknown → In Progress
Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :
Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :

Author: uweigand
Date: Tue Apr 10 10:56:11 2012
New Revision: 186272

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186272
Log:
 gcc/
 PR tree-optimization/52870
 * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Verify that
 presumed pattern statement is within the same loop or basic block.

 gcc/testsuite/
 PR tree-optimization/52870
 * gcc.dg/vect/pr52870.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr52870.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-patterns.c

Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :

Fixed.

Changed in gcc:
status: In Progress → Fix Released
Revision history for this message
Ulrich Weigand (uweigand) wrote :

Committed backports to Linaro GCC 4.6 and 4.7.

Revision history for this message
In , Paolo-carlini (paolo-carlini) wrote :

*** Bug 52639 has been marked as a duplicate of this bug. ***

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.6 - 4.6.3-4ubuntu1

---------------
gcc-4.6 (4.6.3-4ubuntu1) quantal; urgency=low

  * Update to SVN 20120425 (r186817) from the gcc-4_6-branch.
    - Fix PR middle-end/53084, PR lto/48246.
  * Default to armv5t, soft float on armel.

gcc-4.6 (4.6.3-4) unstable; urgency=low

  [ Matthias Klose ]
  * Update to SVN 20120416 (r186492) from the gcc-4_6-branch.
    - Fix PR middle-end/52894, PR target/52717, PR target/52775,
      PR target/52775.
  * Update the Linaro support to the 4.6-2012.04 release.
  * Fix PR middle-end/52870, taken from the trunk (Ulrich Weigand).
    Linaro only. LP: #968766.
  * Fix ICE (regression) in Linaro gcc-4.6 (Ulrich Weigand).
    LP: #972648.
  * Don't build ARM biarch runtime libraries, now built from the
    gcc-4.7 sources.
  * Set the ARM hard-float linker path according to the consensus:
    http://lists.linaro.org/pipermail/cross-distro/2012-April/000261.html

  [ Samuel Thibault ]
  * ada-s-osinte-gnu.adb.diff, ada-s-osinte-gnu.ads.diff,
    ada-s-taprop-gnu.adb.diff, gcc_ada_gcc-interface_Makefile.in.diff:
    Add ada support for GNU/Hurd, thanks Svante Signell for the patches
    and bootstrap! (Closes: #668425).
 -- Matthias Klose <email address hidden> Wed, 25 Apr 2012 16:26:46 +0200

Changed in gcc-4.6 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Uweigand-gcc (uweigand-gcc) wrote :

Author: uweigand
Date: Fri May 4 14:56:48 2012
New Revision: 187162

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187162
Log:
2012-05-04 Ulrich Weigand <email address hidden>

  Backport from mainline:

  2012-05-04 Ulrich Weigand <email address hidden>

  PR tree-optimization/52633
  * tree-vect-patterns.c (vect_vect_recog_func_ptrs): Swap order of
  vect_recog_widen_shift_pattern and vect_recog_over_widening_pattern.
  (vect_recog_over_widening_pattern): Remove handling of code that was
  already detected as over-widening pattern. Remove special handling
  of "unsigned" cases. Instead, support general case of conversion
  of the shift result to another type.

  2012-05-04 Ulrich Weigand <email address hidden>

  * tree-vect-patterns.c (vect_single_imm_use): New function.
  (vect_recog_widen_mult_pattern): Use it instead of open-coding loop.
  (vect_recog_over_widening_pattern): Likewise.
  (vect_recog_widen_shift_pattern): Likewise.

  2012-04-10 Ulrich Weigand <email address hidden>

  PR tree-optimization/52870
  * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Verify that
  presumed pattern statement is within the same loop or basic block.

2012-05-04 Ulrich Weigand <email address hidden>

  Backport from mainline:

  2012-05-04 Ulrich Weigand <email address hidden>

  PR tree-optimization/52633
  * gcc.dg/vect/vect-over-widen-1.c: Two patterns should now be
  recognized as widening shifts instead of over-widening.
  * gcc.dg/vect/vect-over-widen-1-big-array.c: Likewise.
  * gcc.dg/vect/vect-over-widen-4.c: Likewise.
  * gcc.dg/vect/vect-over-widen-4-big-array.c: Likewise.
  * gcc.target/arm/pr52633.c: New test.

  2012-04-10 Ulrich Weigand <email address hidden>

  PR tree-optimization/52870
  * gcc.dg/vect/pr52870.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/vect/pr52870.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.target/arm/pr52633.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/vect/vect-over-widen-1-big-array.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/vect/vect-over-widen-1.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/vect/vect-over-widen-4-big-array.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/vect/vect-over-widen-4.c
    branches/gcc-4_7-branch/gcc/tree-vect-patterns.c

Revision history for this message
Bruno Medeiros (brunojcm) wrote :

Any hope waiting a release of this fix to precise-backports?

I'm really disappointed with my situation, I'm trying hard to compile something that needs gcc-4.7. The only way to achieve that without compiling it myself is installing a test ppa, https://launchpad.net/~ubuntu-toolchain-r/+archive/test, which doesn't seem safe to a production server, so I decided to compile it myself.
An then... I found this bug trying to compile mpfr. Really sad...

Revision history for this message
Sleep Less (not-really) wrote :

Yes, it's sad Precise's gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) is still broken.

If you want to (re)build MPFR with that, use (just) '-O2', or '-O3 -fno-tree-vectorize'.

Or (build and) use any of FSF's / vanilla GCC 4.7.{0,1,2,3} or 4.8.0 ... :-)

Revision history for this message
Jan Groenewald (jan-aims) wrote :

This says status: fix released and milestone: precise-updates since 2012-05.
Is the bug forgotten or expired?

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in gcc-4.6 (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.