From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15250 invoked by alias); 15 Jul 2010 20:20:55 -0000 Received: (qmail 14944 invoked by uid 48); 15 Jul 2010 20:20:33 -0000 Date: Thu, 15 Jul 2010 20:20:00 -0000 Message-ID: <20100715202033.14943.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/44945] [4.6 Regression] FAIL: gfortran.dg/char_array_structure_constructor.f90 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01639.txt.bz2 ------- 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