* config/avr/avr.c (print_operand_address): Fix invalid RTL access.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 8 May 2011 09:15:34 +0000 (09:15 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 8 May 2011 09:15:34 +0000 (09:15 +0000)
From-SVN: r173548

gcc/ChangeLog
gcc/config/avr/avr.c

index 30717f571443ef8ebc4e69e97c77d4e2c92aacfc..c1a359d61d5d73cc772636ea8305dc6bd85ba7e5 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-08  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * config/avr/avr.c (print_operand_address): Fix invalid RTL access.
+
 2011-05-08  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/rs6000/rs6000.c (output_profile_hook): Fix thinko.
index ba78160281b02d2125b3aa1fb7411cf88324b722..522a3563e4edb76ae9f46e5e1e04ca7088dd0a3f 100644 (file)
@@ -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