From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21973 invoked by alias); 16 Jul 2010 12:08:28 -0000 Received: (qmail 21851 invoked by uid 48); 16 Jul 2010 12:08:07 -0000 Date: Fri, 16 Jul 2010 12:08:00 -0000 Message-ID: <20100716120807.21850.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/msg01694.txt.bz2 ------- Comment #13 from burnus at gcc dot gnu dot org 2010-07-16 12:08 ------- Patch for -fwhole-file (not regtested). Paul, do you know why derived types where excluded? Index: trans-decl.c =================================================================== --- trans-decl.c (revision 162255) +++ trans-decl.c (working copy) @@ -1149,11 +1149,9 @@ gfc_get_symbol_decl (gfc_symbol * sym) return sym->backend_decl; /* If use associated and whole file compilation, use the module - declaration. This is only needed for intrinsic types because - they are substituted for one another during optimization. */ + declaration. */ if (gfc_option.flag_whole_file && sym->attr.flavor == FL_VARIABLE - && sym->ts.type != BT_DERIVED && sym->attr.use_assoc && sym->module) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945