From: Jakub Jelinek Date: Thu, 28 Jul 2011 20:35:12 +0000 (+0200) Subject: re PR debug/49846 (entryval: missing DW_TAG_GNU_call_site_parameter for stack-passed... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fe249e74807053dac6c37a8e23f43155ecb6ccb;p=gcc.git re PR debug/49846 (entryval: missing DW_TAG_GNU_call_site_parameter for stack-passed `double' parameter) PR debug/49846 * var-tracking.c (prepare_call_arguments): For non-MODE_INT stack arguments also check if they aren't initialized with a MODE_INT mode of the same size. From-SVN: r176892 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c0ec7cfd8b..bda5cc2b009 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-07-28 Jakub Jelinek + + PR debug/49846 + * var-tracking.c (prepare_call_arguments): For non-MODE_INT stack + arguments also check if they aren't initialized with a MODE_INT + mode of the same size. + 2011-07-28 Aldy Hernandez * expr.c (get_bit_range): Handle *MEM_REF's. diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 56f698391b7..f67b3f5d183 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5777,6 +5777,22 @@ prepare_call_arguments (basic_block bb, rtx insn) val = cselib_lookup (mem, GET_MODE (mem), 0, VOIDmode); if (val && cselib_preserved_value_p (val)) item = gen_rtx_CONCAT (GET_MODE (x), copy_rtx (x), val->val_rtx); + else if (GET_MODE_CLASS (GET_MODE (mem)) != MODE_INT) + { + /* For non-integer stack argument see also if they weren't + initialized by integers. */ + enum machine_mode imode = int_mode_for_mode (GET_MODE (mem)); + if (imode != GET_MODE (mem) && imode != BLKmode) + { + val = cselib_lookup (adjust_address_nv (mem, imode, 0), + imode, 0, VOIDmode); + if (val && cselib_preserved_value_p (val)) + item = gen_rtx_CONCAT (GET_MODE (x), copy_rtx (x), + lowpart_subreg (GET_MODE (x), + val->val_rtx, + imode)); + } + } } if (item) call_arguments = gen_rtx_EXPR_LIST (VOIDmode, item, call_arguments);