From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18826 invoked by alias); 16 Jul 2010 14:22:22 -0000 Received: (qmail 17748 invoked by uid 48); 16 Jul 2010 14:21:34 -0000 Date: Fri, 16 Jul 2010 14:22:00 -0000 Message-ID: <20100716142134.17747.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/msg01709.txt.bz2 ------- Comment #16 from burnus at gcc dot gnu dot org 2010-07-16 14:21 ------- (In reply to comment #15) > I wonder whether the middle-end will not mind different types (the "recycled" > decl will use backend_decl and its type from wherever it has been generated, > and the current function will likely have a different type). I am not sure whether I understand your concern. This is about recycling the decl of a module variable (sym->attr.flavor == FL_VARIABLE) which should have the same type everywhere. Thus, from that side there should be no problem. The only potential issue I see is: use module type(t) :: x x = y ! where "y" is a module variable of type "t" where "x" has locally been declared - and thus might have a different type decl than the module variable. I think one should check this, but I think that does not make the current patch wrong. > Plus there is -fno-whole-file (unless we want to make -fwhole-file default and > remove -fno-whole-file for 4.6). My idea is to change at some point during 4.6 to using -fwhole-file by default - though I would not yet remove -fno-whole-file, yet. But the ultimate goal is to remove -fno-whole-file and add some new flag (-fpermissive) for the few cases where one wants to disable compilations errors due to fwhole-file diagnostics. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945