Created attachment 30081 [details] output of the make for newlib, where the error message is Building my native cross-compiler THIS_PLATFORM=i686-pc-linux-gnu WANTED_COMPILER_PLATFORM=THIS_PLATFORM WANTED_COMPILER_CODE=rx-elf binutils, GMP, MPFR, MPC, 1st part of GCC pass ok but at the build of newlib I get the message rx-elf-gcc -B/home/dcalcoen/rx/bld/linux/newlib/rx-elf/64-bit-double/newlib/ -isystem /home/dcalcoen/rx/bld/linux/newlib/rx-elf/64-bit-double/newlib/targ-include -isystem /home/dcalcoen/gitMirror/newlib/newlib/libc/include -B/home/dcalcoen/rx/bld/linux/newlib/rx-elf/64-bit-double/libgloss/rx -L/home/dcalcoen/rx/bld/linux/newlib/rx-elf/64-bit-double/libgloss/libnosys -L/home/dcalcoen/gitMirror/newlib/libgloss/rx -m64bit-doubles -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.0.0\" -DPACKAGE_STRING=\"newlib\ 2.0.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/home/dcalcoen/gitMirror/newlib/newlib/libc/stdlib -ffunction-sections -fdata-sections -Os -DREENTRANT_SYSCALLS_PROVIDED -DINTERNAL_NEWLIB -DDEFINE_MALLOC -DDEFINE_FREE -DDEFINE_REALLOC -DDEFINE_CALLOC -fno-builtin -g -O2 -m64bit-doubles -c -o lib_a-wcstol.o `test -f 'wcstol.c' || echo '/home/dcalcoen/gitMirror/newlib/newlib/libc/stdlib/'`wcstol.c /home/dcalcoen/gitMirror/newlib/newlib/libc/stdlib/wcstol.c: In function "_wcstol_r": /home/dcalcoen/gitMirror/newlib/newlib/libc/stdlib/wcstol.c:213:1: internal compiler error: in variable_post_merge_new_vals, at var-tracking.c:4430 } ^ 0x8548cfc variable_post_merge_new_vals /home/dcalcoen/gitMirror/gcc/gcc/var-tracking.c:4430 0x8685165 htab_traverse_noresize /home/dcalcoen/gitMirror/gcc/libiberty/hashtab.c:784 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 30082 [details] zip with the different configure.out and make.out zip with the different configure.out and make.out I build my gcc cross compiler in 7 steps (building newlib is in step 6)
Well, we will need the preprocessed source.
Created attachment 30083 [details] my "touched" configure.host for newlib I added some switches I need to configure.host for newlib this is the only file I have different from the git repository
Hi, Any file in particular?. I did a git pull on Wednesday on the 4.8 branch. (and binutils and newlib) I attached the sh I use to build my cross compiler and the only file I "touched". Daniel -----Original Message----- From: mpolacek at gcc dot gnu.org [mailto:gcc-bugzilla@gcc.gnu.org] Sent: 10 May 2013 09:31 To: Daniel Calcoen Subject: [Bug debug/57232] wcstol.c:213:1: internal compiler error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57232 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2013-05-10 CC| |mpolacek at gcc dot gnu.org Component|c++ |debug Ever confirmed|0 |1 --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Well, we will need the preprocessed source.
(In reply to daniel.calcoen from comment #4) > Hi, > > Any file in particular?. The one where the ICE occurs, i.e. preprocessed wcstol.c in this case.
The sources I use wcstol.c http://sourceware.org/git/?p=newlib.git;a=blob;f=newlib/libc/stdlib/wcstol.c;h=e23254dc217854801d1c8be76cfc6501c505cc61;hb=053c8948b774d92ab009b30e70a9e65c11bbd5c3 Newlib repo (I use HEAD) http://sourceware.org/git/?p=newlib.git;a=summary binutils repo (I use HEAD) http://sourceware.org/git/?p=binutils.git;a=summary gcc repo (I use branch gcc-4_8-branch) http://gcc.gnu.org/wiki/GitMirror/ ftp://ftp.gmplib.org/pub/gmp-5.1.1/gmp-5.1.1.tar.lz http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2 http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
The file /home/dcalcoen/gitMirror/newlib/newlib/libc/stdlib/wcstol.c preprocessed by appending -save-temps to the command-line that crashes the compiler. The preprocessed source will be named wcstol.i
Created attachment 30085 [details] wcstol.i
building gcc-4_7-branch instead of gcc-4_8-branch pass ok (binutils, GMP, MPFR, MPC, and newlib sources remains the same) is some regression introduced in 4.8
A similar problem is seen in the LM32 port: http://gcc.gnu.org/ml/gcc/2013-03/msg00317.html It appeared for that in GCC 4.8.0 and is still in GCC 4.8.1.
Adding Nick Clifton to the CC list. It seems the bug was known about a while back: http://gcc.gnu.org/ml/gcc/2012-10/msg00314.html Any luck with this Nick?
This looks like it might be similar to bug 57636, which has the same ICE on the cr16 port. Suggestion there is that it was introduced in trunk@188870: 2012-06-21 Alexandre Oliva <aoliva@redhat.com> PR debug/53671 PR debug/49888 * var-tracking.c (vt_initialize): Record initial offset between arg pointer and stack pointer.
Hi Alexandre, I've added you to this bug as it seems to have been caused by this patch you made: http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/var-tracking.c?r1=188869&r2=188870 I've got no idea what this code does, but if I removed it, the ICE disappears on LM32. If you think it is a backend problem, rather than this code, it would be helpful if you could give some guidance as to what needs changing, as it seems three targets currently have this problem. Thanks.
I am getting the exact same problem trying to cross-compile rx-elf-gcc 4.8.2 with gcc 4.8.2 on my x86_64 archlinux.
Mine. It looks like the call to cselib_preserve_cfa_base_value in vt_initialize should be guarded by some conditions, like this: if (reg != hard_frame_pointer_rtx && fixed_regs[REGNO (reg)]) cselib_preserve_cfa_base_value (val, REGNO (reg)); This fixes the reported problem for me (though I haven't otherwise regtested it). Daniel, Jon, Nick, Sebastian, does it fix the problem for you?
Alexandre, curiously, applying this patch to the cross-compiler source tree fixes the problem for me building 4.8.2 for rx-elf using a 4.8.2 x86_64 host gcc. I did not even have to rebuild the host gcc.
Hi Alex, > if (reg != hard_frame_pointer_rtx && fixed_regs[REGNO (reg)]) > cselib_preserve_cfa_base_value (val, REGNO (reg)); This works for the RX port - thanks! Cheers Nick
Thanks, this seems to fix the LM32 port.
Adjusting component before posting patch to gcc-patches.
Author: aoliva Date: Fri Feb 28 12:45:36 2014 New Revision: 208219 URL: http://gcc.gnu.org/viewcvs?rev=208219&root=gcc&view=rev Log: PR debug/57232 * var-tracking.c (vt_initialize): Apply the same condition to preserve the CFA base value. Modified: trunk/gcc/ChangeLog trunk/gcc/var-tracking.c
Fixed