public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc
@ 2015-02-13 15:28 dhowells at redhat dot com
  2015-02-13 15:30 ` [Bug c/65052] " dhowells at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-02-13 15:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

            Bug ID: 65052
           Summary: ICE in c6x-uclinux target when building libgcc
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dhowells at redhat dot com

When building libgcc using a c6x-uclinux gcc-5 that I've just built, I see the
following ICE:

/data/fedora/cross-gcc/tmp/build/./gcc/xgcc
-B/data/fedora/cross-gcc/tmp/build/./gcc/ -B/usr/c6x-uclinux/bin/
-B/usr/c6x-uclinux/lib/ -isystem /usr/c6x-uclinux/include -isystem
/usr/c6x-uclinux/sys-include    -O2 -g -Wall -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-mbig-endian -O2  -O2 -g -Wall -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches  -DIN_GCC 
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include   -msdata=none -msdata=none -fPIC -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -msdata=none
-msdata=none -fPIC -I. -I. -I../../.././gcc
-I../../../../gcc-5.0.0-20150210/libgcc
-I../../../../gcc-5.0.0-20150210/libgcc/.
-I../../../../gcc-5.0.0-20150210/libgcc/../gcc
-I../../../../gcc-5.0.0-20150210/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS
-o _lshrdi3.o -MT _lshrdi3.o -MD -MP -MF _lshrdi3.dep -DL_lshrdi3 -c
../../../../gcc-5.0.0-20150210/libgcc/libgcc2.c -fvisibility=hidden
-DHIDE_EXPORTS
../../../../gcc-5.0.0-20150210/libgcc/libgcc2.c: In function '__gnu_lshrdi3':
../../../../gcc-5.0.0-20150210/libgcc/libgcc2.c:426:1: error: insn does not
satisfy its constraints:
 }
 ^
(insn 86 72 8 2 (cond_exec (eq (reg:SI 0 A0)
            (const_int 0 [0]))
        (unspec [
                (label_ref:SI 36)
                (const_int 0 [0])
            ] UNSPEC_REAL_JUMP))
../../../../gcc-5.0.0-20150210/libgcc/libgcc2.c:405 439 {*p real_jump}
     (nil))
../../../../gcc-5.0.0-20150210/libgcc/libgcc2.c:426:1: internal compiler error:
in extract_constrain_insn_cached, at recog.c:2258
0x885148 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
    ../../gcc-5.0.0-20150210/gcc/rtl-error.c:110
0x88516f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
    ../../gcc-5.0.0-20150210/gcc/rtl-error.c:121
0x85d159 extract_constrain_insn_cached(rtx_insn*)
    ../../gcc-5.0.0-20150210/gcc/recog.c:2258
0xb0cb77 internal_dfa_insn_code(rtx_insn*)
    ../../gcc-5.0.0-20150210/gcc/config/c6x/c6x.md:407
0xb0be79 dfa_insn_code
    /data/fedora/cross-gcc/tmp/build/gcc/insn-automata.c:735634
0xb0be79 state_transition(void*, rtx_def*)
    /data/fedora/cross-gcc/tmp/build/gcc/insn-automata.c:735655
0xbbe910 prune_ready_list
    ../../gcc-5.0.0-20150210/gcc/haifa-sched.c:6278
0xbbf907 prune_ready_list
    ../../gcc-5.0.0-20150210/gcc/haifa-sched.c:6193
0xbbf907 schedule_block(basic_block_def**, void*)
    ../../gcc-5.0.0-20150210/gcc/haifa-sched.c:6604
0xc14e06 schedule_ebb(rtx_insn*, rtx_insn*, bool)
    ../../gcc-5.0.0-20150210/gcc/sched-ebb.c:557
0xc15516 schedule_ebbs()
    ../../gcc-5.0.0-20150210/gcc/sched-ebb.c:676
0xb0435b c6x_reorg
    ../../gcc-5.0.0-20150210/gcc/config/c6x/c6x.c:5998
0x883fb9 execute
    ../../gcc-5.0.0-20150210/gcc/reorg.c:4064
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://bugzilla.redhat.com/bugzilla/> for instructions.
Makefile:466: recipe for target '_lshrdi3.o' failed
make[3]: *** [_lshrdi3.o] Error 1
make[3]: Leaving directory
'/data/fedora/cross-gcc/tmp/build/c6x-uclinux/be/libgcc'


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
@ 2015-02-13 15:30 ` dhowells at redhat dot com
  2015-02-13 15:31 ` dhowells at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-02-13 15:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #1 from dhowells at redhat dot com <dhowells at redhat dot com> ---
This can be produced by the following minimal source:

typedef int DItype __attribute__ ((mode (DI)));
typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__)));
int __gnu_lshrdi3 (DItype u, shift_count_type b)
{
  if (b == 0)
    return u;
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
  2015-02-13 15:30 ` [Bug c/65052] " dhowells at redhat dot com
@ 2015-02-13 15:31 ` dhowells at redhat dot com
  2015-02-13 15:38 ` dhowells at redhat dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-02-13 15:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #2 from dhowells at redhat dot com <dhowells at redhat dot com> ---
Compiled with:

/data/fedora/cross-gcc/tmp/build/./gcc/xgcc
-B/data/fedora/cross-gcc/tmp/build/gcc/ -B/usr/c6x-uclinux/bin/ -O2 -c min.i


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
  2015-02-13 15:30 ` [Bug c/65052] " dhowells at redhat dot com
  2015-02-13 15:31 ` dhowells at redhat dot com
@ 2015-02-13 15:38 ` dhowells at redhat dot com
  2015-03-24 10:13 ` [Bug target/65052] " nickc at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-02-13 15:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #3 from dhowells at redhat dot com <dhowells at redhat dot com> ---
The compiler was built as:

#!/bin/bash

cd /data/fedora/cross-gcc/tmp/
tar xf /tmp/gcc-5.0.0-20150210.tar.bz2
mkdir build
cd build

CC=gcc \
CXX=g++ \
CFLAGS='-O2 -g -Wall -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic' \
CXXFLAGS=' -O2 -g -Wformat -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -mtune=generic ' \
CFLAGS_FOR_TARGET=' -O2 -g -Wall -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches ' \
AR_FOR_TARGET=/usr/bin/c6x-linux-gnu-ar \
AS_FOR_TARGET=/usr/bin/c6x-linux-gnu-as \
DLLTOOL_FOR_TARGET=/usr/bin/c6x-linux-gnu-dlltool \
LD_FOR_TARGET=/usr/bin/c6x-linux-gnu-ld \
NM_FOR_TARGET=/usr/bin/c6x-linux-gnu-nm \
OBJDUMP_FOR_TARGET=/usr/bin/c6x-linux-gnu-objdump \
RANLIB_FOR_TARGET=/usr/bin/c6x-linux-gnu-ranlib \
READELF_FOR_TARGET=/usr/bin/c6x-linux-gnu-readelf \
STRIP_FOR_TARGET=/usr/bin/c6x-linux-gnu-strip \
WINDRES_FOR_TARGET=/usr/bin/c6x-linux-gnu-windres \
WINDMC_FOR_TARGET=/usr/bin/c6x-linux-gnu-windmc \
LDFLAGS='-Wl,-z,relro ' \
nice -19 ../gcc-5.0.0-20150210/configure \
    --bindir=/usr/bin \
    --build=x86_64-redhat-linux-gnu \
    --datadir=/usr/share \
    --disable-decimal-float \
    --disable-dependency-tracking \
    --disable-gold \
    --disable-libgcj \
    --disable-libgomp \
    --disable-libmudflap \
    --disable-libquadmath \
    --disable-libssp \
    --disable-libunwind-exceptions \
    --disable-nls \
    --disable-plugin \
    --disable-shared \
    --disable-silent-rules \
    --disable-sjlj-exceptions \
    --disable-threads \
    --with-ld=/usr/bin/c6x-linux-gnu-ld \
    --enable-__cxa_atexit \
    --enable-checking=release \
    --enable-gnu-indirect-function \
    --enable-gnu-unique-object \
    --enable-initfini-array \
    --enable-languages=c,c++ \
    --enable-linker-build-id \
    --enable-nls \
    --enable-obsolete \
    --enable-plugin \
    --enable-targets=all \
    --exec-prefix=/usr \
    --host=x86_64-redhat-linux-gnu \
    --includedir=/usr/include \
    --infodir=/usr/share/info \
    --libexecdir=/usr/libexec \
    --localstatedir=/var \
    --mandir=/usr/share/man \
    --prefix=/usr \
    --program-prefix=c6x-linux-gnu- \
    --sbindir=/usr/sbin \
    --sharedstatedir=/var/lib \
    --sysconfdir=/etc \
    --target=c6x-uclinux \
    --with-bugurl=http://bugzilla.redhat.com/bugzilla/ \
    --with-isl \
    --with-linker-hash-style=gnu \
    --with-newlib \
    --with-sysroot=/usr/c6x-linux-gnu/sys-root \
    --with-system-libunwind \
    --with-system-zlib \
    --without-headers

echo "=== BUILDING c6x-linux"
AR_FOR_TARGET=/usr/bin/c6x-linux-gnu-ar \
AS_FOR_TARGET=/usr/bin/c6x-linux-gnu-as \
DLLTOOL_FOR_TARGET=/usr/bin/c6x-linux-gnu-dlltool \
LD_FOR_TARGET=/usr/bin/c6x-linux-gnu-ld \
NM_FOR_TARGET=/usr/bin/c6x-linux-gnu-nm \
OBJDUMP_FOR_TARGET=/usr/bin/c6x-linux-gnu-objdump \
RANLIB_FOR_TARGET=/usr/bin/c6x-linux-gnu-ranlib \
READELF_FOR_TARGET=/usr/bin/c6x-linux-gnu-readelf \
STRIP_FOR_TARGET=/usr/bin/c6x-linux-gnu-strip \
WINDRES_FOR_TARGET=/usr/bin/c6x-linux-gnu-windres \
WINDMC_FOR_TARGET=/usr/bin/c6x-linux-gnu-windmc \
nice -19 make tooldir=/usr all-gcc

echo "=== BUILDING LIBGCC c6x-linux"
nice -19 make tooldir=/bin all-target-libgcc


---
binutils-2.25 was used for the cross compiler.

The compiler was built with:

gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC)
binutils-2.24


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
                   ` (2 preceding siblings ...)
  2015-02-13 15:38 ` dhowells at redhat dot com
@ 2015-03-24 10:13 ` nickc at redhat dot com
  2015-03-27 13:58 ` bernds at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: nickc at redhat dot com @ 2015-03-24 10:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #4 from Nick Clifton <nickc at redhat dot com> ---
Created attachment 35123
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35123&action=edit
Disable the generation of real_jump insns

This patch works around the problem by disabling the generation of the
real_jump insns.  I am not enough of a C6X expert to determine why these
instruction patterns are not working, but they are definitely part of the
problem.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
                   ` (3 preceding siblings ...)
  2015-03-24 10:13 ` [Bug target/65052] " nickc at redhat dot com
@ 2015-03-27 13:58 ` bernds at gcc dot gnu.org
  2015-03-27 15:20 ` dhowells at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bernds at gcc dot gnu.org @ 2015-03-27 13:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

Bernd Schmidt <bernds at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |bernds at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #5 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
Should be fixed now.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
                   ` (4 preceding siblings ...)
  2015-03-27 13:58 ` bernds at gcc dot gnu.org
@ 2015-03-27 15:20 ` dhowells at redhat dot com
  2015-03-28 17:42 ` bernds at gcc dot gnu.org
  2015-04-07  9:06 ` dhowells at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-03-27 15:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #6 from dhowells at redhat dot com <dhowells at redhat dot com> ---
Fixed how?  Is Nick's patch good?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
                   ` (5 preceding siblings ...)
  2015-03-27 15:20 ` dhowells at redhat dot com
@ 2015-03-28 17:42 ` bernds at gcc dot gnu.org
  2015-04-07  9:06 ` dhowells at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: bernds at gcc dot gnu.org @ 2015-03-28 17:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #7 from Bernd Schmidt <bernds at gcc dot gnu.org> ---
I committed a different one.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65052] ICE in c6x-uclinux target when building libgcc
  2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
                   ` (6 preceding siblings ...)
  2015-03-28 17:42 ` bernds at gcc dot gnu.org
@ 2015-04-07  9:06 ` dhowells at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: dhowells at redhat dot com @ 2015-04-07  9:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65052

--- Comment #8 from dhowells at redhat dot com <dhowells at redhat dot com> ---
This seems to work for me, thanks!


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-07  9:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 15:28 [Bug c/65052] New: ICE in c6x-uclinux target when building libgcc dhowells at redhat dot com
2015-02-13 15:30 ` [Bug c/65052] " dhowells at redhat dot com
2015-02-13 15:31 ` dhowells at redhat dot com
2015-02-13 15:38 ` dhowells at redhat dot com
2015-03-24 10:13 ` [Bug target/65052] " nickc at redhat dot com
2015-03-27 13:58 ` bernds at gcc dot gnu.org
2015-03-27 15:20 ` dhowells at redhat dot com
2015-03-28 17:42 ` bernds at gcc dot gnu.org
2015-04-07  9:06 ` dhowells at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).