Message ID | 44140111-e81b-407b-9215-78ad85aab1e1@gjlay.de |
---|---|
State | New |
Headers | show |
Series | [avr,applied] Fix PR85624 | expand |
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 84dfe4c40ec..359343e563d 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -1355,6 +1355,8 @@ (define_expand "setmemhi" gen_int_mode (INTVAL (operands[1]), mode)); rtx addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); operands[0] = gen_rtx_MEM (BLKmode, addr0); + // Alignment is unused; just set it to 0. + operands[3] = const0_rtx; }) diff --git a/gcc/testsuite/gcc.target/avr/torture/pr85624.c b/gcc/testsuite/gcc.target/avr/torture/pr85624.c new file mode 100644 index 00000000000..b183d4558df --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/torture/pr85624.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ + +int foo (void) +{ + volatile int arr[3] __attribute__((aligned(128))) = { 0 }; + return arr[2]; +}