On Fri, May 13, 2016 at 11:25:28PM +0200, Cyril Bonté wrote:
> > In the mean time, there may be a -fsomething option to disable a
> > bogus optimization which causes this, but that's not easy to spot
> > as it will depend on any side effect of other code :-/
> 
> I was trying to identify one, and indeed, once I add "-fno-tree-sra", it
> works as expected.

This one already exists in gcc 4 and 5, so its implementation might be bogus
in 6. The doc says :

   -ftree-sra
           Perform scalar replacement of aggregates.  This pass replaces
           structure references with scalars to prevent committing structures
           to memory too early.  This flag is enabled by default at -O and
           higher.

Thus I suspect that by delaying memory references a bit too much they end
up completely forgetting to commit the changes :-/

Willy


Reply via email to