------- Comment #8 from jakub at gcc dot gnu dot org 2010-07-15 20:20 ------- Ah, so -fdump-tree-optimized dump doesn't reveal the problem, but -fdump-tree-optimized-all actually does. The problem is that each routine - char_array_structure_constructor and alloc, use different decls for the same global variable, in my case __global_MOD_cD.1531 and __global_MOD_cD.1555. When alloc is inlined into char_array_structure_constructor, this means the same global var is accessed through 2 different aliases, and then scheduling actually happens to reorder the store of the malloc result stored to one of these c variables' data field with the read from the other c variable's data field.
The DECL_PURE_P change just uncovered this latent issue, wonder why it hasn't been seen earlier. Guess Fortran code isn't inlined too much, with the exception of contained functions. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945