From: Eric Botcazou Date: Sun, 8 May 2011 09:15:34 +0000 (+0000) Subject: * config/avr/avr.c (print_operand_address): Fix invalid RTL access. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f64c36badca16712f27b498b5db1802aee935c66;p=gcc.git * config/avr/avr.c (print_operand_address): Fix invalid RTL access. From-SVN: r173548 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 30717f57144..c1a359d61d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-05-08 Eric Botcazou + + * config/avr/avr.c (print_operand_address): Fix invalid RTL access. + 2011-05-08 Eric Botcazou * config/rs6000/rs6000.c (output_profile_hook): Fix thinko. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index ba78160281b..522a3563e4e 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1318,7 +1318,9 @@ print_operand_address (FILE *file, rtx addr) if (CONSTANT_ADDRESS_P (addr) && text_segment_operand (addr, VOIDmode)) { - rtx x = XEXP (addr,0); + rtx x = addr; + if (GET_CODE (x) == CONST) + x = XEXP (x, 0); if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x,1)) == CONST_INT) { /* Assembler gs() will implant word address. Make offset