public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ian Lance Taylor via gcc" <gcc@gcc.gnu.org>
To: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Errors building libgcc for powerpc64le-linux-gnu
Date: Sat, 14 Dec 2019 20:47:00 -0000	[thread overview]
Message-ID: <CAKOQZ8wei-Nvr+CC_GYRscNLJsB7cpkPoFQa7speTGedz=mzoQ@mail.gmail.com> (raw)
In-Reply-To: <CAKOQZ8yXML2xPmKPrE7JipB=o7uGi6e9_EASavLTHy0Qkk1oEw@mail.gmail.com>

On Sat, Dec 14, 2019 at 10:51 AM Ian Lance Taylor <iant@google.com> wrote:
>
> I'm seeing compiler crashes building libgcc for powerpc64le-linux-gnu,
> cross-compiling from x86_64-pc-linux-gnu.  I'm at SVN revision 279830.
> I'm seeing the following.  Is anybody else seeing this crash?  Thanks.
>
> Ian
>
> /tmp/go-build-release/gccgo-objdir/ppc/./gcc/xgcc
> -B/tmp/go-build-release/gccgo-objdir/ppc/./gcc/
> -B/tmp/go-build-release/gccgo-installdir/ppc/powerpc64le-linux-gnu/bin/
> -B/tmp/go-build-release/gccgo-installdir/ppc/powerpc64le-linux-gnu/lib/
> -isystem /tmp/go-build-release/gccgo-installdir/ppc/powerpc64le-linux-gnu/include
> -isystem /tmp/go-build-release/gccgo-installdir/ppc/powerpc64le-linux-gnu/sys-include
> --sysroot=/google/src/files/285475989/depot/google3/third_party/grte/v5_ppc/release/usr/grte/v5
>   -g -O2 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall
> -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag
> -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag
> -Wold-style-definition  -isystem ./include   -fPIC -mlong-double-128
> -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc
> -fno-stack-protector   -fPIC -mlong-double-128 -mno-minimal-toc -I.
> -I. -I../.././gcc -I/tmp/go-build-release/gccgo-srcdir/libgcc
> -I/tmp/go-build-release/gccgo-srcdir/libgcc/.
> -I/tmp/go-build-release/gccgo-srcdir/libgcc/../gcc
> -I/tmp/go-build-release/gccgo-srcdir/libgcc/../include
> -I/tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/dpd
> -I/tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber
> -DHAVE_CC_TLS  -o decNumber.o -MT decNumber.o -MD -MP -MF
> decNumber.dep -c
> /tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/decNumber.c
> /tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/decNumber.c:
> In function 'decToString':
> /tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/decNumber.c:3760:3:
> error: unrecognizable insn:
>  3760 |   } /* decToString */
>       |   ^
> (insn/f 1592 1591 1593 145 (set (reg:CC 104 4)
>         (unspec:CC [
>                 (reg:SI 12 12)
>                 (const_int 8 [0x8])
>             ] UNSPEC_MOVESI_TO_CR))
> "/tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/decNumber.c":3760:3
> -1
>      (expr_list:REG_DEAD (reg:SI 12 12)
>         (expr_list:REG_CFA_RESTORE (reg:SI 104 4)
>             (nil))))
> during RTL pass: cprop_hardreg
> /tmp/go-build-release/gccgo-srcdir/libgcc/../libdecnumber/decNumber.c:3760:3:
> internal compiler error: in extract_insn, at recog.c:2294
> 0xb95832 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
> /tmp/go-build-release/gccgo-srcdir/gcc/rtl-error.c:108
> 0xb9585b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
> /tmp/go-build-release/gccgo-srcdir/gcc/rtl-error.c:116
> 0xb63ec2 extract_insn(rtx_insn*)
> /tmp/go-build-release/gccgo-srcdir/gcc/recog.c:2294
> 0xb67995 extract_constrain_insn(rtx_insn*)
> /tmp/go-build-release/gccgo-srcdir/gcc/recog.c:2193
> 0xb6a552 copyprop_hardreg_forward_1(basic_block_def*, value_data*)
> /tmp/go-build-release/gccgo-srcdir/gcc/regcprop.c:802
> 0xb6e207 (anonymous namespace)::pass_cprop_hardreg::execute(function*)
> /tmp/go-build-release/gccgo-srcdir/gcc/regcprop.c:1367
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://go.ext.google.com/go/> for instructions.
> make: *** [Makefile:645: decNumber.o] Error 1


Sorry, I think I see the problem.  I forgot to mention that for
complicated reasons I am building this cross-compiler starting with
clang.  In rs6000.md we see

(define_expand "movsi_to_cr_one"
  [(set (match_operand:CC 0 "cc_reg_operand")
        (unspec:CC [(match_operand:SI 1 "gpc_reg_operand")
    (match_dup 2)] UNSPEC_MOVESI_TO_CR))]
  ""
  "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));")

This code has been around for quite a while, and when it was written
the maximum value of a register matching cc_reg_operand was in fact
75.  But now it is 107.  I'm testing changing this 75, and the
corresponding one a few lines down, to MAX_CR_REGNO.

A PowerPC maintainer may want to take this from here.

Ian

  reply	other threads:[~2019-12-14 20:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 18:52 Ian Lance Taylor via gcc
2019-12-14 20:47 ` Ian Lance Taylor via gcc [this message]
2019-12-15  7:25 ` Segher Boessenkool
2019-12-15 17:43   ` Ian Lance Taylor via gcc
2019-12-15 19:21     ` Segher Boessenkool
2019-12-18 15:58     ` Segher Boessenkool
2019-12-20  0:08       ` Ian Lance Taylor via gcc
2019-12-20  0:27         ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKOQZ8wei-Nvr+CC_GYRscNLJsB7cpkPoFQa7speTGedz=mzoQ@mail.gmail.com' \
    --to=gcc@gcc.gnu.org \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).