Check SUBREG in prepare_call_arguments.
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 17 Mar 2011 19:51:03 +0000 (19:51 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 17 Mar 2011 19:51:03 +0000 (12:51 -0700)
2011-03-17  H.J. Lu  <hongjiu.lu@intel.com>

PR debug/48160
* var-tracking.c (prepare_call_arguments): Check SUBREG.

From-SVN: r171108

gcc/ChangeLog
gcc/var-tracking.c

index 7d028f7fae824b2d6e4fa93047400cff1923208f..887e014cbba76112f80fb2d61b387e38af6f8888 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR debug/48160
+       * var-tracking.c (prepare_call_arguments): Check SUBREG.
+
 2011-03-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/48171
index aab98331df31bd6ea2056835c8937da0b269c8e9..7c4c2c57b362d26a719e70c3f9e54d6f4e59f152 100644 (file)
@@ -5770,7 +5770,11 @@ prepare_call_arguments (basic_block bb, rtx insn)
 
                    /* Try harder, when passing address of a constant
                       pool integer it can be easily read back.  */
-                   val = CSELIB_VAL_PTR (XEXP (item, 1));
+                   item = XEXP (item, 1);
+                   if (GET_CODE (item) == SUBREG)
+                     item = SUBREG_REG (item);
+                   gcc_assert (GET_CODE (item) == VALUE);
+                   val = CSELIB_VAL_PTR (item);
                    for (l = val->locs; l; l = l->next)
                      if (GET_CODE (l->loc) == SYMBOL_REF
                          && TREE_CONSTANT_POOL_ADDRESS_P (l->loc)