Bug 90327 - [9/10 Regression] ICE in convert_move, at expr.c:218 since r265677 on s390x
Summary: [9/10 Regression] ICE in convert_move, at expr.c:218 since r265677 on s390x
Status: RESOLVED DUPLICATE of bug 90756
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: 9.2
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2019-05-03 13:21 UTC by Martin Liška
Modified: 2019-07-03 07:49 UTC (History)
3 users (show)

See Also:
Host: x86_64-linux-gnu
Target: s390x-linux-gnu
Build:
Known to work: 8.3.0
Known to fail: 10.0, 9.1.0
Last reconfirmed: 2019-05-06 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2019-05-03 13:21:52 UTC
Following is causing ICE:

$ ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr90139.c -Og -c
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr90139.c: In function ‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr90139.c:8:1: internal compiler error: in convert_move, at expr.c:218
    8 | foo (void)
      | ^~~
0x10c7156 emit_partition_copy
	/home/marxin/Programming/gcc2/gcc/tree-outof-ssa.c:222
0x10c7156 insert_part_to_rtx_on_edge
	/home/marxin/Programming/gcc2/gcc/tree-outof-ssa.c:391
0x10c7156 elim_create
	/home/marxin/Programming/gcc2/gcc/tree-outof-ssa.c:677
0x10c7156 eliminate_phi
	/home/marxin/Programming/gcc2/gcc/tree-outof-ssa.c:735
0x10c7156 expand_phi_nodes(ssaexpand*)
	/home/marxin/Programming/gcc2/gcc/tree-outof-ssa.c:1007
0x7ffff7b6ab7a __libc_start_main
	../csu/libc-start.c:308
0x7f00d9 ???
	../sysdeps/x86_64/start.S:120
Comment 1 Richard Biener 2019-05-06 09:16:04 UTC
Confirmed.

We're emitting a partition copy from

(mem/c:BLK (plus:DI (reg/f:DI 55 virtual-stack-vars)
        (const_int -4 [0xfffffffffffffffc])) [2 n+0 S4 A32])

to

(reg:V1SF 61)

We don't seem to expect this looking at emit_partition_copy, which
just expects a BLKmode/BLKmode combo but not a mixed case.

/* Emit insns to copy SRC into DEST converting SRC if necessary.  As
   SRC/DEST might be BLKmode memory locations SIZEEXP is a tree from
   which we deduce the size to copy in that case.  */

static inline rtx_insn *
emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
{
  start_sequence ();

  if (GET_MODE (src) != VOIDmode && GET_MODE (src) != GET_MODE (dest))
    src = convert_to_mode (GET_MODE (dest), src, unsignedsrcp);
  if (GET_MODE (src) == BLKmode)
    {
      gcc_assert (GET_MODE (dest) == BLKmode);
      emit_block_move (dest, src, expr_size (sizeexp), BLOCK_OP_NORMAL);
    }
Comment 2 Jakub Jelinek 2019-07-03 07:49:36 UTC
Dup.

*** This bug has been marked as a duplicate of bug 90756 ***