------- Comment #5 from dje at gcc dot gnu dot org 2009-06-02 12:51 ------- cfgexpand.c:expand_used_vars() expands and instantiates virtual-stack-vars for INSNs when it walks the partion map:
for (i = 0; i < SA.map->num_partitions; i++) { tree var = partition_to_var (SA.map, i); gcc_assert (is_gimple_reg (var)); if (TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL) expand_one_var (var, true, true); It then instantiates the same virtual-stack-vars in debug DECLs when it calls expand_used_vars_for_block (outer_block, true), which calls /* Expand all variables at this level. */ for (t = BLOCK_VARS (block); t ; t = TREE_CHAIN (t)) if (TREE_USED (t)) expand_one_var (t, toplevel, true); The INSN var is an SSA_NAME and expand_one_stack_var_at() uses the alignment in the DECL; the BLOCK var is not an SSA_NAME and the alignment is computed as the STACK_BOUNDARY. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40012