From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11283 invoked by alias); 16 Jul 2010 09:12:06 -0000 Received: (qmail 11039 invoked by uid 48); 16 Jul 2010 09:11:45 -0000 Date: Fri, 16 Jul 2010 09:12:00 -0000 Message-ID: <20100716091145.11038.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/44945] [4.6 Regression] Wrong decl for module vars / 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: "burnus 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/msg01687.txt.bz2 ------- Comment #11 from burnus at gcc dot gnu dot org 2010-07-16 09:11 ------- Seemingly, we currently only "recycle" DECLs for procedure decls, but not for module variable decls. Looking at gfortran -fdump-tree-optimized-all -O3 char_array_structure_constructor.f90 one finds (grep MOD_c): __global_MOD_cD.1586 __global_MOD_cD.1606 However, if one removes the second "USE global" and uses the host-associated variable, it works (i.e. there is only one "__global_MOD_cD"). Expected: The same DECL is used for host associated variables - and, at least with -fwhole-file, the same DECL is used for the whole file. I wonder whether the same problem also exists for COMMON symbols. (Note: While the wrong-code only becomes apparent on x86_64-apple-darwin10, the bug itself exists on all platforms. Thus, I have emptied the PR's target field.) -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|x86_64-apple-darwin10 | GCC host triplet|x86_64-apple-darwin10 | GCC target triplet|x86_64-apple-darwin10 | Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2010-07-16 09:11:44 date| | Summary|[4.6 Regression] FAIL: |[4.6 Regression] Wrong decl |gfortran.dg/char_array_struc|for module vars / FAIL: |ture_constructor.f90 |gfortran.dg/char_array_struc | |ture_constructor.f90 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945