From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21011 invoked by alias); 22 Jul 2009 09:21:00 -0000 Received: (qmail 20398 invoked by uid 48); 22 Jul 2009 09:20:03 -0000 Date: Wed, 22 Jul 2009 09:21:00 -0000 Message-ID: <20090722092003.20397.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40737] Pointer references sometimes fail to define "span" symbols 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: 2009-07/txt/msg01713.txt.bz2 ------- Comment #7 from burnus at gcc dot gnu dot org 2009-07-22 09:20 ------- My current understanding is that "span" is only created (in gfc_get_symbol_decl) if (sym->attr.subref_array_pointer) is true - and is then assumed to live at the same place as the symbol (array descriptor) itself. But this fails for use association (and maybe also for host association). Solution 1: Always create that variable if they symbols is a pointer to an array. Solution 2: Defer it until we have the proper array descriptor, which handles this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737