From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D1533858D1E; Mon, 19 Sep 2022 10:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D1533858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663585002; bh=FIbz5pVgdQnQ1NIbRQNTgDzS8E3bpfb2PG4/XJG+SvI=; h=From:To:Subject:Date:From; b=AKBxw814LKgIHJK8ASdCQpH9wU6ViLvQf4KYjs4zZVIDrAAXrINWH1T2cgDb6DJE2 1kvjB4IJ8DgczfjwxtLdeEja9kTIHtAsOH9IDp8RmKc1K4jBN7rK6exh8j7Lqyoks7 HxIUhxF+HnUHdSh/whdmTPsmC+u/+vNn0pAflh4M= From: "christian.ehrhardt at canonical dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" Date: Mon, 19 Sep 2022 10:56:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: christian.ehrhardt at canonical dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106966 Bug ID: 106966 Summary: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: christian.ehrhardt at canonical dot com Target Milestone: --- Created attachment 53591 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53591&action=3Dedit Full interim state generated with -freport-bug Hi, this was found as part of Ubuntu's build of qemu for the upcoming 22.10 release. That already uses gcc 12.2. But gladly it can be reproduced much easier as = it breaks in cross-building one of the firmware blobs. Repro steps in Ubuntu 22.10: $ git clone https://gitlab.com/qemu-project/qemu-palcode.git $ cd qemu-palcode/ $ apt install gcc-alpha-linux-gnu $ make CROSS=3Dalpha-linux-gnu- ... alpha-linux-gnu-gcc -O2 -g1 -Wall -fvisibility=3Dhidden -fno-strict-aliasing -msmall-text -msmall-data -mno-fp-regs -mbuild-constants -mcpu=3Dev67 -DSYSTEM_H=3D'"sys-clipper.h"' -c -o console.o console.c during RTL pass: expand console.c: In function =E2=80=98do_console=E2=80=99: console.c:130:12: internal compiler error: in emit_move_insn, at expr.cc:40= 10 130 | vga[0] =3D 'H' + attr; | ~~~~~~~^~~~~~~~~~~~ 0x137917b internal_error(char const*, ...) ???:0 0x5a9326 fancy_abort(char const*, int, char const*) ???:0 0xe0a692 alpha_split_const_mov(machine_mode, rtx_def**) ???:0 0xe0a801 alpha_expand_mov(machine_mode, rtx_def**) ???:0 0x112e2dd gen_movv4hi(rtx_def*, rtx_def*) ???:0 0x7eedeb emit_move_insn_1(rtx_def*, rtx_def*) ???:0 0x7ef1d7 emit_move_insn(rtx_def*, rtx_def*) ???:0 0xe0d016 alpha_expand_movmisalign(machine_mode, rtx_def**) ???:0 0x112e5aa gen_movmisalignv4hi(rtx_def*, rtx_def*) ???:0 0xa278fc expand_insn(insn_code, unsigned int, expand_operand*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. make: *** [: console.o] Error 1 Note: Sadly I have no more recent e.g. gcc-snapshot of the cross toolchain = to test. The issue occurred on my laptop on the builders of Ubuntu, so I assume it is pretty generic. Details about how GCC was built can be fetched from the Ubuntu build logs at https://launchpad.net/ubuntu/+source/gcc-12/12.2.0-2ubuntu1 I have tried to compare older builds using gcc on Jammy. The version 11.3.0-1ubuntu1~22.04 there works fine. So it seems to be a regression betw= een that and 12.2.0-2ubuntu1. Note: I have found that setting -O1 (instead of the -O2 default) will mitig= ate the issue.=