[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-06 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #48 from John Paul Adrian Glaubitz --- Alright, I found it, -fstack-protector-strong is the culprit. Will file a new bug report now. Adrian

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-05 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #47 from John Paul Adrian Glaubitz --- Well, now I just compiled both procps and grep with the latest toolchain (gcc-4.9_4.9.3 and binutils_2.25-9) from a pristine tarball with no Debian patches applied and *outside* of the build root

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-05 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #46 from John Paul Adrian Glaubitz --- Furthermore, gcc also built a version of grep that is broken and simply refuses to read any options: root@tirpitz:..grep-test2/bin> ls egrep fgrep grep root@tirpitz:..grep-test2/bin> ./grep U

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-05 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #45 from John Paul Adrian Glaubitz --- (In reply to Kazumoto Kojima from comment #44) > Not likely. The sane gmp/mpfr/mpc libraries are needed, though. Hmm, so the gcc I built is still broken. Many packages compiled with it still se

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-01 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #44 from Kazumoto Kojima --- (In reply to John Paul Adrian Glaubitz from comment #43) > Btw, could building the fixed gcc-4.9 with a compiler affected by this > particular bug still propagate the problem? Or, asking the other way arou

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-01 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #43 from John Paul Adrian Glaubitz --- (In reply to John Paul Adrian Glaubitz from comment #42) > Cross your fingers ;). Btw, could building the fixed gcc-4.9 with a compiler affected by this particular bug still propagate the probl

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-07-01 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #42 from John Paul Adrian Glaubitz --- (In reply to John Paul Adrian Glaubitz from comment #41) > So, please bear with me until I can give some feedback. Matthias has uploaded the 4.9.3 release now with additional patches from the sn

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-30 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #41 from John Paul Adrian Glaubitz --- (In reply to Kazumoto Kojima from comment #40) > with my 4.9 native compiler built with 4.9 cross compiler for svn > gcc-4_9-branch. I hope that miscompilation for mpfr is gone for > bootstrappe

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-30 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #40 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #39) > Can we close this PR as fixed? I've got Testsuite summary for MPFR 3.1.3 ==

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-29 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #39 from Oleg Endo --- Can we close this PR as fixed?

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-28 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #38 from Kazumoto Kojima --- Author: kkojima Date: Sun Jun 28 07:02:47 2015 New Revision: 225104 URL: https://gcc.gnu.org/viewcvs?rev=225104&root=gcc&view=rev Log: PR target/66563 * [SH] Add a new operand to GOTaddr2picreg so to avoi

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 Jakub Jelinek changed: What|Removed |Added Target Milestone|4.9.3 |4.9.4

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #37 from Jakub Jelinek --- GCC 4.9.3 has been released.

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-25 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #36 from Kazumoto Kojima --- Author: kkojima Date: Thu Jun 25 10:15:18 2015 New Revision: 224935 URL: https://gcc.gnu.org/viewcvs?rev=224935&root=gcc&view=rev Log: PR target/66563 * [SH] Add a new operand to GOTaddr2picreg so to avoi

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-24 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #35 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #33) > I see, thanks. In this case, could you please add a comment e.g.: > > ;; Loads of the GOTPC relocation values must not be optimized away > ;; by e.g. any kind o

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-24 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #34 from Kazumoto Kojima --- Author: kkojima Date: Wed Jun 24 22:11:04 2015 New Revision: 224925 URL: https://gcc.gnu.org/viewcvs?rev=224925&root=gcc&view=rev Log: PR target/66563 * [SH] Add a new operand to GOTaddr2picreg so to avoi

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-24 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #33 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #32) I see, thanks. In this case, could you please add a comment e.g.: ;; Loads of the GOTPC relocation values must not be optimized away ;; by e.g. any kind of CSE a

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-23 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #32 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #31) Yes, your insn_and_split is quite same with the one I've tried first and it resolved this case too. The volatile will work of cause. The CSE in problem was done b

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-23 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #31 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #29) > Unfortunately, 4.9 and later compilers 'optimize' the above code > to the code like Just for my understanding ... In the pattern ... (define_expand "GOTaddr2pi

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-22 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #30 from Kazumoto Kojima --- Created attachment 35829 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35829&action=edit possible patch for 4.9 The patch adds a counter to unspec vector of (unspec [...] UNSPEC_PIC) pattern to avo

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-22 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #29 from Kazumoto Kojima --- I've reproduced one problem for mpfr-3.1.3 with the cross compiler. For some TLS variables, we need to set GOT address to the PIC register R12 even in non-PIC objects. Here is a hypothetical example what

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-22 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #28 from John Paul Adrian Glaubitz --- Addendum: mpfr4_3.1.3-1 seems to be affected as well but I need to perform more testing. But it's definitely the jump from 3.1.2-1 to 3.1.2-3 that caused the bug!

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-22 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #27 from John Paul Adrian Glaubitz --- Alright, I have tracked it down now! It's definitely a bug in mpfr4 and *not* gcc. I rebuilt both mpfr4_3.1.2-1 and mpfr4_3.1.2-3 with the latest compiler we have in Debian which is gcc-4.9_4.9.

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-22 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #26 from John Paul Adrian Glaubitz --- (In reply to Oleg Endo from comment #25) > I don't know the code of mpfr. It could use __builtin_strlen for stuff like > parsing numbers etc. However, the builtin_strlen code looks OK and hasn'

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-21 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #25 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #22) > Provided that you're right, how would a bug in strlen this explain that gcc > always segfaults when it needs to do float arithmetics? I don't know the

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #24 from John Paul Adrian Glaubitz --- (In reply to John Paul Adrian Glaubitz from comment #23) > It seems that Kaz was right. Downgrading libmpfr fixes the issue for me: In order to test whether this problem is actually a result of

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #23 from John Paul Adrian Glaubitz --- It seems that Kaz was right. Downgrading libmpfr fixes the issue for me: glaubitz@tirpitz:~/debian/segfault-test/wmfire-1.2.4/src$ gcc wmfire.c -o wmfire.o $(pkg-config --cflags gdk-2.0) $(pkg-c

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #22 from John Paul Adrian Glaubitz --- (In reply to Oleg Endo from comment #20) > (In reply to John Paul Adrian Glaubitz from comment #16) > > ... > > 763a3c: 03 61 mov r0,r1 > > 763a3

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #21 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #20) > I'm curious... Kaz, when bootstrapping the native 4.9 on sh4-linux, did you > use the 4.9 native compiler to build mpfr, mpc, gmp libraries? They might > indeed

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #20 from Oleg Endo --- (In reply to John Paul Adrian Glaubitz from comment #16) > ... > 763a3c: 03 61 mov r0,r1 > 763a3e: 00 e3 mov #0,r3 > 763a40: 16 62

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #19 from Kazumoto Kojima --- (In reply to John Paul Adrian Glaubitz from comment #18) > You seem to be on to something here as, in fact, mpfr had problems > previously when built with "make check" [1]: I see many segfaults and bus er

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-20 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #18 from John Paul Adrian Glaubitz --- (In reply to Kazumoto Kojima from comment #17) > Which version of mpfr/gmp is used for compilers? mpfr has self > test and you could run it with "make check" in its build directory. You seem to

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #17 from Kazumoto Kojima --- (In reply to John Paul Adrian Glaubitz from comment #16) >From the dump and floatformat.c:529:2: internal compiler error: Segmentation fault dto = ldexp (1.0, exponent); wmfire.c:559:6: internal compil

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #16 from John Paul Adrian Glaubitz --- I included some more context: glaubitz@tirpitz:~/debian/segfault-test$ objdump -d /usr/lib/gcc/sh4-linux-gnu/4.9/cc1 |grep -C20 763a40 763a18: 10 38 cmp/eq r1,r8 763a1a:

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #15 from Kazumoto Kojima --- (In reply to John Paul Adrian Glaubitz from comment #14) > Created attachment 35812 [details] > Log for strace -i -f -o segfaultlog /usr/lib/gcc/sh4-linux-gnu/4.9/cc1 > wmfire.i 30836 [00763a40] --- SIGSE

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #14 from John Paul Adrian Glaubitz --- Created attachment 35812 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35812&action=edit Log for strace -i -f -o segfaultlog /usr/lib/gcc/sh4-linux-gnu/4.9/cc1 wmfire.i

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #13 from John Paul Adrian Glaubitz --- Alright: glaubitz@tirpitz:~/debian/segfault-test/wmfire-1.2.4/src$ gcc -E wmfire.c -o wmfire.i $(pkg-config --cflags gdk-2.0) $(pkg-config --cflags libgtop-2.0) glaubitz@tirpitz:~/debian/segfaul

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #12 from Kazumoto Kojima --- All my 4.9 compilers don't fail for given pre-processed source. Could you show us segfaultlog with running the following commands? gcc -E wmfire.c -o wmfire.i strace -i -f -o segfaultlog /usr/lib/gcc/sh4-

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #11 from John Paul Adrian Glaubitz --- Created attachment 35811 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35811&action=edit Same compiler invocation, but this time with strace -f

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #10 from John Paul Adrian Glaubitz --- Created attachment 35810 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35810&action=edit Pre-processed source for wmfire.c test compile (run without strace)

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #9 from John Paul Adrian Glaubitz --- Created attachment 35809 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35809&action=edit Pre-processed source for wmfire.c test compile (run with strace)

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #8 from John Paul Adrian Glaubitz --- Created attachment 35808 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35808&action=edit strace of gcc segfaulting when compiling wmfire.c on sh4

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #7 from John Paul Adrian Glaubitz --- Alright, I did some further tests. I downloaded the source package for "wmfire" with "apt-get source wmfire" and installed its build dependencies with "apt-get build-dep wmfire". Then I just trie

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #6 from John Paul Adrian Glaubitz --- (In reply to Kazumoto Kojima from comment #5) > (In reply to Matthias Klose from comment #0) > > Created attachment 35792 [details] > > preprocessed source > > > > seen while building the GCC 5 b

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #5 from Kazumoto Kojima --- (In reply to Matthias Klose from comment #0) > Created attachment 35792 [details] > preprocessed source > > seen while building the GCC 5 branch using GCC 4.9 SVN 20150531 (r223898): I can't reproduce the

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #4 from John Paul Adrian Glaubitz --- Created attachment 35807 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35807&action=edit strace of journalctl_220-6-sh4 during segfault

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-19 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #3 from John Paul Adrian Glaubitz --- So, it seems Matthias is right, there is definitely a regression in gcc-4.9 in the code generation. Packages that were recently build with gcc-4.9_4.9.2-20 or newer tend to segfault. I noticed th

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-17 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #2 from John Paul Adrian Glaubitz --- Just as a heads up: Once the buildd has finished building the latest gcc-4.9_4.9.2-21 package, I will update all buildds and reschedule all affected packages to see if that fixes the problem. If

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 Richard Biener changed: What|Removed |Added Target Milestone|--- |4.9.3

[Bug target/66563] [4.9 Regression] ICE (segmentation fault) on sh4-linux-gnu

2015-06-17 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66563 --- Comment #1 from John Paul Adrian Glaubitz --- Hi Matthias! Thanks for the bug report but I think this might actually a problem with the host compiler or its libraries. I have seen segfaults in multiple packages now [1-3] and so I am very sur