Re: [v3] avoid alignment of static variables affecting stack's

2015-12-10 Thread Bernd Schmidt
On 12/10/2015 05:07 PM, Jan Beulich wrote: If not reaching if (TREE_CODE (origvar) == SSA_NAME) { gcc_assert (TREE_CODE (var) != VAR_DECL || (!DECL_EXTERNAL (var) && !DECL_HAS_VALUE_EXPR_P (var) && !TREE_STATIC (var)

Re: [v3] avoid alignment of static variables affecting stack's

2015-12-10 Thread Jan Beulich
>>> On 10.12.15 at 14:53, wrote: > On 12/10/2015 01:38 PM, Jan Beulich wrote: >> --- 2015-12-09/gcc/cfgexpand.c >> +++ 2015-12-09/gcc/cfgexpand.c >> @@ -1544,12 +1544,15 @@ static HOST_WIDE_INT >> expand_one_var (tree var, bool toplevel, bool really_expand) >> { >> unsigned int align = BIT

Re: [v3] avoid alignment of static variables affecting stack's

2015-12-10 Thread Bernd Schmidt
On 12/10/2015 01:38 PM, Jan Beulich wrote: * cfgexpand.c (expand_one_var): Exclude static and external variables when adjusting stack alignment related state. gcc/testsuite/ 2015-12-10 Jan Beulich * gcc.c-torture/execute/stkalign.c: New. --- 2015-12-09/gcc/cfgexpand

[v3] avoid alignment of static variables affecting stack's

2015-12-10 Thread Jan Beulich
Function (or more narrow) scope static variables (as well as others not placed on the stack) should also not have any effect on the stack alignment. I noticed the issue first with Linux'es dynamic_pr_debug() construct using an 8-byte aligned sub-file-scope local variable. According to my checking