public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
@ 2022-09-19 10:56 christian.ehrhardt at canonical dot com
  2022-09-19 11:11 ` [Bug c/106966] " christian.ehrhardt at canonical dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: christian.ehrhardt at canonical dot com @ 2022-09-19 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

            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=53591&action=edit
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=alpha-linux-gnu-
...

alpha-linux-gnu-gcc -O2 -g1 -Wall -fvisibility=hidden -fno-strict-aliasing
-msmall-text -msmall-data -mno-fp-regs -mbuild-constants -mcpu=ev67
-DSYSTEM_H='"sys-clipper.h"'  -c -o console.o console.c
during RTL pass: expand
console.c: In function ‘do_console’:
console.c:130:12: internal compiler error: in emit_move_insn, at expr.cc:4010
  130 |     vga[0] = '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 <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
make: *** [<builtin>: 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 between
that and 12.2.0-2ubuntu1.

Note: I have found that setting -O1 (instead of the -O2 default) will mitigate
the issue.

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

* [Bug c/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
@ 2022-09-19 11:11 ` christian.ehrhardt at canonical dot com
  2022-09-19 13:49 ` [Bug target/106966] " ubizjak at gmail dot com
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: christian.ehrhardt at canonical dot com @ 2022-09-19 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Christian Ehrhardt <christian.ehrhardt at canonical dot com> ---
I compared a few more cross-gcc's I could get hold of.
Thereby I can state this was already broken with 12.1.0 on Ubuntu 22.04 and
Fedora 36.

Note: I'm only listing where the instructions for these differ

1. Fedora 36
gcc version 12.1.1 20220507 (Red Hat Cross 12.1.1-1) (GCC) 

$ dnf install gcc-alpha-linux-gnu make git
...
alpha-linux-gnu-gcc -O2 -g1 -Wall -fvisibility=hidden -fno-strict-aliasing
-msmall-text -msmall-data -mno-fp-regs -mbuild-constants -mcpu=ev67
-DSYSTEM_H='"sys-clipper.h"'  -c -o console.o console.c
during RTL pass: expand
console.c: In function ‘do_console’:
console.c:130:12: internal compiler error: in emit_move_insn, at expr.cc:4010
  130 |     vga[0] = 'H' + attr;
      |     ~~~~~~~^~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <http://bugzilla.redhat.com/bugzilla/> for instructions.
Preprocessed source stored into /tmp/cchVNtxj.out file, please attach this to
your bugreport.
make: *** [<builtin>: console.o] Error 1



2. Ubuntu 22.04 gcc-12
gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04) 

$ apt install gcc-12-alpha-linux-gnu
...
alpha-linux-gnu-gcc-12 -O2 -g1 -Wall -fvisibility=hidden -fno-strict-aliasing
-msmall-text -msmall-data -mno-fp-regs -mbuild-constants -mcpu=ev67
-DSYSTEM_H='"sys-clipper.h"'  -c -o console.o console.c
during RTL pass: expand
console.c: In function ‘do_console’:
console.c:130:12: internal compiler error: in emit_move_insn, at expr.cc:4010
  130 |     vga[0] = 'H' + attr;
      |     ~~~~~~~^~~~~~~~~~~~
0x13767bb internal_error(char const*, ...)
        ???:0
0x5a92b0 fancy_abort(char const*, int, char const*)
        ???:0
0xe09a32 alpha_split_const_mov(machine_mode, rtx_def**)
        ???:0
0xe09ba1 alpha_expand_mov(machine_mode, rtx_def**)
        ???:0
0x112c7fd gen_movv4hi(rtx_def*, rtx_def*)
        ???:0
0x7ee88b emit_move_insn_1(rtx_def*, rtx_def*)
        ???:0
0x7eec77 emit_move_insn(rtx_def*, rtx_def*)
        ???:0
0xe0c3b6 alpha_expand_movmisalign(machine_mode, rtx_def**)
        ???:0
0x112caca gen_movmisalignv4hi(rtx_def*, rtx_def*)
        ???:0
0xa272fc 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 <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
make: *** [<builtin>: console.o] Error 1

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
  2022-09-19 11:11 ` [Bug c/106966] " christian.ehrhardt at canonical dot com
@ 2022-09-19 13:49 ` ubizjak at gmail dot com
  2022-09-19 14:15 ` christian.ehrhardt at canonical dot com
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2022-09-19 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Christian Ehrhardt from comment #0)

> alpha-linux-gnu-gcc -O2 -g1 -Wall -fvisibility=hidden -fno-strict-aliasing
> -msmall-text -msmall-data -mno-fp-regs -mbuild-constants -mcpu=ev67

Just drop -mbuild-constants.

(There is a problem in alpha_emit_set_long_const which is not prepared to
handle V4HImode target).

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
  2022-09-19 11:11 ` [Bug c/106966] " christian.ehrhardt at canonical dot com
  2022-09-19 13:49 ` [Bug target/106966] " ubizjak at gmail dot com
@ 2022-09-19 14:15 ` christian.ehrhardt at canonical dot com
  2022-09-20  7:19 ` ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: christian.ehrhardt at canonical dot com @ 2022-09-19 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Christian Ehrhardt <christian.ehrhardt at canonical dot com> ---
> Just drop -mbuild-constants.

Thanks for the hint Uroš, but I'm not sure if one can do that, this option is
from [1]. I do not have the background on this, but it reads as there was a
reason "Use -mbuild-constants to prevent the compiler using static data" to set
this which seems more breaking than my current workaround (reduce -O2 to -O1).

[1]:
https://github.com/qemu/qemu-palcode/commit/0830e72f0bce29bdf1de0d67ad503a9a8b99c968

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (2 preceding siblings ...)
  2022-09-19 14:15 ` christian.ehrhardt at canonical dot com
@ 2022-09-20  7:19 ` ubizjak at gmail dot com
  2022-09-22  6:30 ` christian.ehrhardt at canonical dot com
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2022-09-20  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Christian Ehrhardt from comment #3)
> > Just drop -mbuild-constants.
> 
> Thanks for the hint Uroš, but I'm not sure if one can do that, this option
> is from [1]. I do not have the background on this, but it reads as there was
> a reason "Use -mbuild-constants to prevent the compiler using static data"
> to set this which seems more breaking than my current workaround (reduce -O2
> to -O1).
> 
> [1]:
> https://github.com/qemu/qemu-palcode/commit/
> 0830e72f0bce29bdf1de0d67ad503a9a8b99c968

-mbuild-constants is used here together with -msmall-data (which limits
relocations to the small data area to 16 bits). -mbuild-constants option tries
harder to construct 64-bit constants using arithmetic with immediates instead
of loads from the small data area. So, if the linker does not error out with
relocation overflow, it can be safely omitted.

The fix to the compiler is relatively straightforward, but I have no access to
alpha system any more to properly test the fix (and I have no patience to run
the testsuite on the simulator). The -mbuild-constant option is rarely used,
and the proposed workaround should be safe.

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (3 preceding siblings ...)
  2022-09-20  7:19 ` ubizjak at gmail dot com
@ 2022-09-22  6:30 ` christian.ehrhardt at canonical dot com
  2022-09-23  8:20 ` ubizjak at gmail dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: christian.ehrhardt at canonical dot com @ 2022-09-22  6:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Christian Ehrhardt <christian.ehrhardt at canonical dot com> ---
Thanks Uroš for the explanation.

I've tried and it does not bail out with a relocation overflow when dropping
-mbuild-constants.

I've suggested to upstream to consider that change.
=> https://gitlab.com/qemu-project/qemu-palcode/-/merge_requests/1

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (4 preceding siblings ...)
  2022-09-22  6:30 ` christian.ehrhardt at canonical dot com
@ 2022-09-23  8:20 ` ubizjak at gmail dot com
  2023-07-08 12:11 ` ubizjak at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2022-09-23  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-09-23

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
Testcase:

void
do_console (unsigned short *vga)
{
  vga[0] = 'H';
  vga[1] = 'e';
  vga[2] = 'l';
  vga[3] = 'l';
  vga[4] = 'o';
}

cc1 -O2 -mbuild-constants:

during RTL pass: expand
pr106966.c: In function ‘do_console’:
pr106966.c:4:10: internal compiler error: in emit_move_insn, at expr.cc:4052
    4 |   vga[0] = 'H';
      |   ~~~~~~~^~~~~
0x5ed664 emit_move_insn(rtx_def*, rtx_def*)
        ../../git/gcc/gcc/expr.cc:4052
0x113a708 alpha_emit_set_long_const
        ../../git/gcc/gcc/config/alpha/alpha.cc:2090
0x113abfc alpha_split_const_mov(machine_mode, rtx_def**)
        ../../git/gcc/gcc/config/alpha/alpha.cc:2204
0x113ade7 alpha_expand_mov(machine_mode, rtx_def**)
        ../../git/gcc/gcc/config/alpha/alpha.cc:2250
0x15510a8 gen_movv4hi(rtx_def*, rtx_def*)
        ../../git/gcc/gcc/config/alpha/alpha.md:4463
...


(gdb) bt
#0  internal_error (gmsgid=gmsgid@entry=0x1a9cf85 "in %s, at %s:%d") at
../../git/gcc/gcc/diagnostic.cc:2107
#1  0x00000000007918d6 in fancy_abort (file=file@entry=0x1910cf9
"../../git/gcc/gcc/expr.cc", line=line@entry=4052, 
    function=function@entry=0x1a23a78 "emit_move_insn") at
../../git/gcc/gcc/diagnostic.cc:2211
#2  0x00000000005ed665 in emit_move_insn (x=<optimized out>, y=<optimized out>)
at ../../git/gcc/gcc/expr.cc:4052
#3  0x000000000113a709 in alpha_emit_set_long_const (target=0x7fffea2ef9f0,
c1=7077888) at ../../git/gcc/gcc/config/alpha/alpha.cc:2090
#4  0x000000000113abfd in alpha_split_const_mov (mode=E_V4HImode,
operands=0x7fffffffd5a0) at ../../git/gcc/gcc/config/alpha/alpha.cc:2204
#5  0x000000000113ade8 in alpha_expand_mov (mode=E_V4HImode,
operands=0x7fffffffd5a0) at ../../git/gcc/gcc/config/alpha/alpha.cc:2250
#6  0x00000000015510a9 in gen_movv4hi (operand0=0x7fffea2ef9f0,
operand1=0x7fffea29ebc0) at ../../git/gcc/gcc/config/alpha/alpha.md:4463

(gdb) f 3
#3  0x000000000113a709 in alpha_emit_set_long_const (target=0x7fffea2ef9f0,
c1=7077888) at ../../git/gcc/gcc/config/alpha/alpha.cc:2090
2090            emit_move_insn (target, gen_rtx_PLUS (DImode, target, GEN_INT
(d3)));
(gdb) p debug_rtx (target)
(reg:V4HI 71)
$1 = void

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (5 preceding siblings ...)
  2022-09-23  8:20 ` ubizjak at gmail dot com
@ 2023-07-08 12:11 ` ubizjak at gmail dot com
  2023-07-08 13:47 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2023-07-08 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at gcc dot gnu.org

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
*** Bug 110597 has been marked as a duplicate of this bug. ***

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

* [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (6 preceding siblings ...)
  2023-07-08 12:11 ` ubizjak at gmail dot com
@ 2023-07-08 13:47 ` ubizjak at gmail dot com
  2023-07-08 13:50 ` [Bug target/106966] [12/13/14 Regression] " ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2023-07-08 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 55504
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55504&action=edit
Proposed patch.

Can someone please bootstrap and test the attached patch?

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (7 preceding siblings ...)
  2023-07-08 13:47 ` ubizjak at gmail dot com
@ 2023-07-08 13:50 ` ubizjak at gmail dot com
  2023-07-10  3:58 ` matoro_gcc_bugzilla at matoro dot tk
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2023-07-08 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|alpha cross build crashes   |[12/13/14 Regression] alpha
                   |gcc-12 "internal compiler   |cross build crashes gcc-12
                   |error: in emit_move_insn"   |"internal compiler error:
                   |                            |in emit_move_insn"
   Target Milestone|---                         |12.4
      Known to fail|                            |12.3.1, 13.1.1, 14.0
      Known to work|                            |11.4.1

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (8 preceding siblings ...)
  2023-07-08 13:50 ` [Bug target/106966] [12/13/14 Regression] " ubizjak at gmail dot com
@ 2023-07-10  3:58 ` matoro_gcc_bugzilla at matoro dot tk
  2023-07-10  6:32 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: matoro_gcc_bugzilla at matoro dot tk @ 2023-07-10  3:58 UTC (permalink / raw)
  To: gcc-bugs

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

matoro <matoro_gcc_bugzilla at matoro dot tk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matoro_gcc_bugzilla@matoro.
                   |                            |tk

--- Comment #9 from matoro <matoro_gcc_bugzilla at matoro dot tk> ---
(In reply to Uroš Bizjak from comment #8)
> Created attachment 55504 [details]
> Proposed patch.
> 
> Can someone please bootstrap and test the attached patch?

I can queue this up to test on real hardware.  By bootstrap, do you mean with
--enable-bootstrap, and by test do you mean a full testsuite run or just
checking that it doesn't ICE on the reproducer here?

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (9 preceding siblings ...)
  2023-07-10  3:58 ` matoro_gcc_bugzilla at matoro dot tk
@ 2023-07-10  6:32 ` ubizjak at gmail dot com
  2023-07-10 14:41 ` matoro_gcc_bugzilla at matoro dot tk
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2023-07-10  6:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to matoro from comment #9)
> (In reply to Uroš Bizjak from comment #8)
> > Created attachment 55504 [details]
> > Proposed patch.
> > 
> > Can someone please bootstrap and test the attached patch?
> 
> I can queue this up to test on real hardware.  By bootstrap, do you mean
> with --enable-bootstrap, and by test do you mean a full testsuite run or
> just checking that it doesn't ICE on the reproducer here?

I have already checked that it doesn't ICE with a crosscompiler. Regarding the
bootstrap, please note that --enable-bootstrap is the default nowadays, so the
option it is not needed to make a full build ("bootstrap"). Also, "make -j N -k
check-gcc" should be enough to test the compiler, since other parts of the
compiler never exercise -mbuild-constants (N in the command should be
substituted with a number of processors to parallelize the testsuite run).

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (10 preceding siblings ...)
  2023-07-10  6:32 ` ubizjak at gmail dot com
@ 2023-07-10 14:41 ` matoro_gcc_bugzilla at matoro dot tk
  2023-07-10 15:05 ` doko at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: matoro_gcc_bugzilla at matoro dot tk @ 2023-07-10 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from matoro <matoro_gcc_bugzilla at matoro dot tk> ---
(In reply to Uroš Bizjak from comment #10)
> (In reply to matoro from comment #9)
> > (In reply to Uroš Bizjak from comment #8)
> > > Created attachment 55504 [details]
> > > Proposed patch.
> > > 
> > > Can someone please bootstrap and test the attached patch?
> > 
> > I can queue this up to test on real hardware.  By bootstrap, do you mean
> > with --enable-bootstrap, and by test do you mean a full testsuite run or
> > just checking that it doesn't ICE on the reproducer here?
> 
> I have already checked that it doesn't ICE with a crosscompiler. Regarding
> the bootstrap, please note that --enable-bootstrap is the default nowadays,
> so the option it is not needed to make a full build ("bootstrap"). Also,
> "make -j N -k check-gcc" should be enough to test the compiler, since other
> parts of the compiler never exercise -mbuild-constants (N in the command
> should be substituted with a number of processors to parallelize the
> testsuite run).

I was just checking because alpha hardware is quite antique, it's single-core
so a full compile with bootstrap takes around ~72 hours.  I don't know how long
the test suite takes because I've never run it on this machine, but I would
expect it to add a couple additional days to that.  If that's fine I'll kick it
off, just want to be clear on what exactly you'd like to see.

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (11 preceding siblings ...)
  2023-07-10 14:41 ` matoro_gcc_bugzilla at matoro dot tk
@ 2023-07-10 15:05 ` doko at gcc dot gnu.org
  2023-07-13 13:19 ` doko at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: doko at gcc dot gnu.org @ 2023-07-10 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Matthias Klose <doko at gcc dot gnu.org> ---
I'll apply the proposed patch for the next gcc-13 Debian upload, then reporting
back test results.

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (12 preceding siblings ...)
  2023-07-10 15:05 ` doko at gcc dot gnu.org
@ 2023-07-13 13:19 ` doko at gcc dot gnu.org
  2023-07-13 16:32 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: doko at gcc dot gnu.org @ 2023-07-13 13:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Matthias Klose <doko at gcc dot gnu.org> ---
search for "test-summary"
https://buildd.debian.org/status/logs.php?pkg=gcc-12&arch=alpha

12.3.0-5 is gcc-12 branch 20230630
12.3.0-6 is gcc-12 branch 20230707 with the proposed patch applied

comparing gcc summary (-5 to -6):

                === gcc Summary ===

# of expected passes            136199
# of unexpected failures        657
# of unexpected successes       16
# of expected failures          1112
# of unresolved testcases       8
# of unsupported tests          2539
/<<PKGBUILDDIR>>/build/gcc/xgcc  version 12.3.0 (Debian 12.3.0-5) 

                === gcc Summary ===

# of expected passes            136261
# of unexpected failures        652
# of unexpected successes       16
# of expected failures          1112
# of unresolved testcases       8
# of unsupported tests          2539
/<<PKGBUILDDIR>>/build/gcc/xgcc  version 12.3.0 (Debian 12.3.0-6)

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (13 preceding siblings ...)
  2023-07-13 13:19 ` doko at gcc dot gnu.org
@ 2023-07-13 16:32 ` cvs-commit at gcc dot gnu.org
  2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-13 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:337649c1660211db733c1ba34ae260b8c66a3578

commit r14-2503-g337649c1660211db733c1ba34ae260b8c66a3578
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Thu Jul 13 18:32:15 2023 +0200

    alpha: Fix computation mode in alpha_emit_set_long_cost [PR106966]

            PR target/106966

    gcc/ChangeLog:

            * config/alpha/alpha.cc (alpha_emit_set_long_const):
            Always use DImode when constructing long const.

    gcc/testsuite/ChangeLog:

            * gcc.target/alpha/pr106966.c: New test.

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (14 preceding siblings ...)
  2023-07-13 16:32 ` cvs-commit at gcc dot gnu.org
@ 2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
  2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
  2023-07-13 16:37 ` ubizjak at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-13 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:27e421319efcf47280339fbc17c263f36c92eee6

commit r13-7561-g27e421319efcf47280339fbc17c263f36c92eee6
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Thu Jul 13 18:32:15 2023 +0200

    alpha: Fix computation mode in alpha_emit_set_long_cost [PR106966]

            PR target/106966

    gcc/ChangeLog:

            * config/alpha/alpha.cc (alpha_emit_set_long_const):
            Always use DImode when constructing long const.

    gcc/testsuite/ChangeLog:

            * gcc.target/alpha/pr106966.c: New test.

    (cherry picked from commit 337649c1660211db733c1ba34ae260b8c66a3578)

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (15 preceding siblings ...)
  2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
@ 2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
  2023-07-13 16:37 ` ubizjak at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-13 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:4520e2dbc73262028ad556f732871565101ef615

commit r12-9770-g4520e2dbc73262028ad556f732871565101ef615
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Thu Jul 13 18:32:15 2023 +0200

    alpha: Fix computation mode in alpha_emit_set_long_cost [PR106966]

            PR target/106966

    gcc/ChangeLog:

            * config/alpha/alpha.cc (alpha_emit_set_long_const):
            Always use DImode when constructing long const.

    gcc/testsuite/ChangeLog:

            * gcc.target/alpha/pr106966.c: New test.

    (cherry picked from commit 337649c1660211db733c1ba34ae260b8c66a3578)

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

* [Bug target/106966] [12/13/14 Regression] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
  2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
                   ` (16 preceding siblings ...)
  2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
@ 2023-07-13 16:37 ` ubizjak at gmail dot com
  17 siblings, 0 replies; 19+ messages in thread
From: ubizjak at gmail dot com @ 2023-07-13 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #17 from Uroš Bizjak <ubizjak at gmail dot com> ---
Thanks for helping with tests!

Fixed for gcc-12.4+

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

end of thread, other threads:[~2023-07-13 16:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 10:56 [Bug c/106966] New: alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" christian.ehrhardt at canonical dot com
2022-09-19 11:11 ` [Bug c/106966] " christian.ehrhardt at canonical dot com
2022-09-19 13:49 ` [Bug target/106966] " ubizjak at gmail dot com
2022-09-19 14:15 ` christian.ehrhardt at canonical dot com
2022-09-20  7:19 ` ubizjak at gmail dot com
2022-09-22  6:30 ` christian.ehrhardt at canonical dot com
2022-09-23  8:20 ` ubizjak at gmail dot com
2023-07-08 12:11 ` ubizjak at gmail dot com
2023-07-08 13:47 ` ubizjak at gmail dot com
2023-07-08 13:50 ` [Bug target/106966] [12/13/14 Regression] " ubizjak at gmail dot com
2023-07-10  3:58 ` matoro_gcc_bugzilla at matoro dot tk
2023-07-10  6:32 ` ubizjak at gmail dot com
2023-07-10 14:41 ` matoro_gcc_bugzilla at matoro dot tk
2023-07-10 15:05 ` doko at gcc dot gnu.org
2023-07-13 13:19 ` doko at gcc dot gnu.org
2023-07-13 16:32 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:37 ` ubizjak at gmail 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).