From: Andreas Schwab Date: Tue, 20 Jun 2017 10:15:47 +0000 (+0000) Subject: re PR target/80970 (internal compiler error in find_reloads, at reload.c:4077) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad2f2a35d33ea79f95b70f8d96ee1445fabed402;p=gcc.git re PR target/80970 (internal compiler error in find_reloads, at reload.c:4077) PR target/80970 * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d" instead of "+d". From-SVN: r249401 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 10434ed8b51..7cb99a6d88d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-06-20 Andreas Schwab + + PR target/80970 + * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d" + instead of "+d". + 2017-06-20 Prakhar Bahuguna * config/arm/arm-c.c (arm_cpu_builtins): New block to define diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 5bf6c92d3d5..7933f8eb253 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -5337,7 +5337,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bsetdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (ior:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5350,7 +5350,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bchgdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (xor:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5363,7 +5363,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bclrdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (and:SI (rotate:SI (const_int -2) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) diff --git a/gcc/testsuite/gcc.dg/torture/pr80970.c b/gcc/testsuite/gcc.dg/torture/pr80970.c new file mode 100644 index 00000000000..3b96b581e33 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr80970.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ + +int a, b, c, d, e; +void f () +{ + long g, h; + if (c) + e = d; + g = d & 31; + h = 1 << g; + a = e | h; + b = a; +}