diff options
Diffstat (limited to 'gcc/var-tracking.c')
| -rw-r--r-- | gcc/var-tracking.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 14a1dc263f6..7621313fa13 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -1460,8 +1460,15 @@ track_expr_p (tree expr) don't need to track this expression if the ultimate declaration is ignored. */ realdecl = expr; - if (DECL_DEBUG_ALIAS_OF (realdecl)) - realdecl = DECL_DEBUG_ALIAS_OF (realdecl); + if (DECL_DEBUG_EXPR (realdecl) + && DECL_DEBUG_EXPR_IS_FROM (realdecl)) + { + realdecl = DECL_DEBUG_EXPR (realdecl); + /* ??? We don't yet know how to emit DW_OP_piece for variable + that has been SRA'ed. */ + if (!DECL_P (realdecl)) + return 0; + } /* Do not track EXPR if REALDECL it should be ignored for debugging purposes. */ |

