gimplify_modify_expr: avoid DECL_DEBUG_EXPR links across functions
authorPierre-Marie de Rodat <derodat@adacore.com>
Tue, 30 May 2017 15:34:00 +0000 (15:34 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 30 May 2017 15:34:00 +0000 (15:34 +0000)
commit0a37d40c9ceee7b502a06214037346884debf4e6
treef1761d3932477acc359771d0b1794dacbd2457af
parente2f353338584c197e7d62370821fe48f76a52ce8
gimplify_modify_expr: avoid DECL_DEBUG_EXPR links across functions

An upcoming patch exposes a bug in gimplify_modify_expr.  There, we try
not to create DECL_DEBUG_EXPR links across functions, however we don't
check that *FROM_P actually belongs to the current function before
modifying it.  This patch fixes this oversight.

gcc/

* gimplify.c (gimplify_modify_expr): Don't create a
DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
function.

From-SVN: r248688
gcc/ChangeLog
gcc/gimplify.c