diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-09-22 21:57:39 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2013-09-22 21:57:39 +0000 |
commit | ca081cc8daedb96f611909ab0351546b327e9957 (patch) | |
tree | fbbc9ef0803d049e20bb2941a4a18497a72da342 /gcc/gimplify.c | |
parent | 9779c871afc648329500747748c70b59b47abdf7 (diff) | |
download | gcc-ca081cc8daedb96f611909ab0351546b327e9957.zip gcc-ca081cc8daedb96f611909ab0351546b327e9957.tar.gz gcc-ca081cc8daedb96f611909ab0351546b327e9957.tar.bz2 |
gimplify.c (gimplify_asm_expr): Reset the TREE_CHAIN of clobbers to NULL_TREE before pushing them onto the vector.
* gimplify.c (gimplify_asm_expr): Reset the TREE_CHAIN of clobbers to
NULL_TREE before pushing them onto the vector. Likewise for labels.
From-SVN: r202819
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 1589db4..86bda77 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5419,11 +5419,21 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) vec_safe_push (inputs, link); } - for (link = ASM_CLOBBERS (expr); link; ++i, link = TREE_CHAIN (link)) - vec_safe_push (clobbers, link); + link_next = NULL_TREE; + for (link = ASM_CLOBBERS (expr); link; ++i, link = link_next) + { + link_next = TREE_CHAIN (link); + TREE_CHAIN (link) = NULL_TREE; + vec_safe_push (clobbers, link); + } - for (link = ASM_LABELS (expr); link; ++i, link = TREE_CHAIN (link)) - vec_safe_push (labels, link); + link_next = NULL_TREE; + for (link = ASM_LABELS (expr); link; ++i, link = link_next) + { + link_next = TREE_CHAIN (link); + TREE_CHAIN (link) = NULL_TREE; + vec_safe_push (labels, link); + } /* Do not add ASMs with errors to the gimple IL stream. */ if (ret != GS_ERROR) |