On Thu, Oct 20, 2016 at 01:22:16PM +0200, Eric Botcazou wrote: > If fails because x == 16 and w == 0 on the first invocation to bar but, given > that w is not modified anywhere else, this seems to be expected.
Does this fix it? It still works on Linux: 2016-10-20 Jakub Jelinek <ja...@redhat.com> * g++.dg/cpp1z/inline-var1.C (w): Initialize to 64 + 2. --- gcc/testsuite/g++.dg/cpp1z/inline-var1.C.jj 2016-10-14 12:31:44.000000000 +0200 +++ gcc/testsuite/g++.dg/cpp1z/inline-var1.C 2016-10-20 17:59:26.671358964 +0200 @@ -13,7 +13,7 @@ inline int var22 = foo (7); extern inline int var23, var22; inline int var23 = foo (8); -static int v, w; +static int v, w = 64 + 2; int foo (int x) Jakub