This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] pre vs asm statements



On Jan 5, 2004, at 12:58 AM, Richard Henderson wrote:


A current regression on tree-ssa, g++.dg/opt/noreturn-1.C, is due to
PRE smashing an ASM_EXPR.

Uh, it shouldn't have ever touched them.


Oh, let me guess.
You have a MODIFY_EXPR assigning an ASM_EXPR to something?

Otherwise, it wouldn't fit in the check for expressions we process:
 if ((TREE_CODE_CLASS (TREE_CODE (expr)) == '2'
     || TREE_CODE_CLASS (TREE_CODE (expr)) == '<'
     || TREE_CODE (expr) == SSA_NAME
     || TREE_CODE (expr) == INDIRECT_REF)
    && !ann->makes_aliased_stores
    && !ann->has_volatile_ops)


2619 copy = TREE_OPERAND (use_stmt, 1);
2620 copy = unshare_expr (copy);
2621 newexpr = build (MODIFY_EXPR, TREE_TYPE (temp), temp, copy);
2622 newtemp = make_ssa_name (temp, newexpr);
2623 EREF_TEMP (use) = newtemp;
2624 TREE_OPERAND (newexpr, 0) = newtemp;
2625 TREE_OPERAND (use_stmt, 1) = newtemp;


Operand 1 of an asm_expr is a tree_list of constraint/value pairs.
Here you're smashing the whole thing to an ssa_name.  We die later
trying to dereference it.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]