re PR middle-end/18683 (seg fault in local allocate)
authorRoger Sayle <roger@eyesopen.com>
Tue, 21 Dec 2004 03:18:47 +0000 (03:18 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 21 Dec 2004 03:18:47 +0000 (03:18 +0000)
PR middle-end/18683
* config/rs6000/rs6000.c (current_file_function_operand): Only check
current_function_decl's DECL_RTL if it has already been set.

From-SVN: r92453

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 5026be960a782d6fe8b88def708d7d93d0050135..cbcd64fb961c326efcbc96d1c52f8b6c6de5c91d 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-20  Roger Sayle  <roger@eyesopen.com>
+
+       PR middle-end/18683
+       * config/rs6000/rs6000.c (current_file_function_operand): Only check
+       current_function_decl's DECL_RTL if it has already been set.
+
 2004-12-20  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/18683
index b2e64f66aac18bd4ea1676c8c08f9b062dfc8bd0..8bedc5873941f7362511f39b2eeef2fa048c675b 100644 (file)
@@ -2960,7 +2960,8 @@ current_file_function_operand (rtx op,
   return (GET_CODE (op) == SYMBOL_REF
          && (DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op))
          && (SYMBOL_REF_LOCAL_P (op)
-             || (op == XEXP (DECL_RTL (current_function_decl), 0))));
+             || (DECL_RTL_SET_P (current_function_decl)
+                 && op == XEXP (DECL_RTL (current_function_decl), 0))));
 }
 
 /* Return 1 if this operand is a valid input for a move insn.  */