Commit a8eeec27 by Steve Ellcey Committed by Steve Ellcey

re PR middle-end/65315 (incorrect alignment of local variable with aligned attribute)

2015-03-05  Steve Ellcey  <sellcey@imgtec.com>

	PR middle-end/65315
	* cfgexpand.c (expand_stack_vars): Update large_align to maximum
	needed alignment.

From-SVN: r221219
parent 7ef96183
2015-03-05 Steve Ellcey <sellcey@imgtec.com>
PR middle-end/65315
* cfgexpand.c (expand_stack_vars): Update large_align to maximum
needed alignment.
2015-03-05 Martin Liska <mliska@suse.cz> 2015-03-05 Martin Liska <mliska@suse.cz>
* ipa-inline.c (inline_small_functions): Set default value to * ipa-inline.c (inline_small_functions): Set default value to
......
...@@ -973,6 +973,13 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data) ...@@ -973,6 +973,13 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data)
i = stack_vars_sorted[si]; i = stack_vars_sorted[si];
alignb = stack_vars[i].alignb; alignb = stack_vars[i].alignb;
/* All "large" alignment decls come before all "small" alignment
decls, but "large" alignment decls are not sorted based on
their alignment. Increase large_align to track the largest
required alignment. */
if ((alignb * BITS_PER_UNIT) > large_align)
large_align = alignb * BITS_PER_UNIT;
/* Stop when we get to the first decl with "small" alignment. */ /* Stop when we get to the first decl with "small" alignment. */
if (alignb * BITS_PER_UNIT <= MAX_SUPPORTED_STACK_ALIGNMENT) if (alignb * BITS_PER_UNIT <= MAX_SUPPORTED_STACK_ALIGNMENT)
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment