This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65657] [avr] read from __memx address space tramples argument to following function
- From: "senthil_kumar.selvaraj at atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Apr 2015 20:39:27 +0000
- Subject: [Bug target/65657] [avr] read from __memx address space tramples argument to following function
- Auto-submitted: auto-generated
- References: <bug-65657-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65657
--- Comment #4 from Senthil Kumar Selvaraj <senthil_kumar.selvaraj at atmel dot com> ---
Doesn't appear to be a missed clobber in the md file, as *.expand shows in insn
7 - r22 is in the clobbered registers list. Later passes assume r22 is unused
after insn 6 (reg:R22 QI is marked as REG_UNUSED), and proceed to set r22
instead of r24 in insn 7.
(note 4 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 2 4 3 2 (set (reg/v/f:PSI 43 [ x ])
(reg:PSI 22 r22 [ x ])) foo.c:3 -1
(nil))
(note 3 2 6 2 NOTE_INSN_FUNCTION_BEG)
(insn 6 3 7 2 (set (reg:HI 22 r22)
(const_int -21555 [0xffffffffffffabcd])) foo.c:4 -1
(nil))
(insn 7 6 8 2 (parallel [
(set (reg:QI 24 r24)
(mem:QI (reg/v/f:PSI 43 [ x ]) [0 *x_2(D)+0 S1 A8 AS7]))
(clobber (reg:QI 22 r22))
(clobber (reg:QI 21 r21))
(clobber (reg:HI 30 r30))
]) foo.c:4 -1
(nil))
(call_insn/j 8 7 9 2 (parallel [
(call (mem:HI (symbol_ref:HI ("foo") [flags 0x41] <function_decl
0x7f635059f360 foo>) [0 foo S2 A8])
(const_int 0 [0]))
(use (const_int 1 [0x1]))
]) foo.c:4 -1
(expr_list:REG_CALL_DECL (symbol_ref:HI ("foo") [flags 0x41]
<function_decl 0x7f635059f360 foo>)
(nil))
(expr_list:QI (use (reg:QI 24 r24))
(expr_list:HI (use (reg:HI 22 r22))
(nil))))
(barrier 9 8 0)