From ca081cc8daedb96f611909ab0351546b327e9957 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 22 Sep 2013 21:57:39 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/gimplify.c | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57fb929ebb9..211dfb70ac5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-09-22 Eric Botcazou + + * gimplify.c (gimplify_asm_expr): Reset the TREE_CHAIN of clobbers to + NULL_TREE before pushing them onto the vector. Likewise for labels. + 2013-09-21 Eric Botcazou * config/ia64/predicates.md (ia64_cbranch_operator): Accept unordered diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 1589db44b42..86bda77692f 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) -- 2.30.2