From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82023 invoked by alias); 20 Nov 2019 21:04:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 82008 invoked by uid 89); 20 Nov 2019 21:04:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,SPAM_BODY autolearn=no version=3.3.1 spammy=H*f:JD88NOHhudXDt, H*i:CAO9iq9EnFB8bBQ, H*i:JD88NOHhudXDt, H*f:CAO9iq9EnFB8bBQ X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Nov 2019 21:04:00 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id xAKL3vKg062337 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 20 Nov 2019 13:03:57 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id xAKL3uU0062335; Wed, 20 Nov 2019 13:03:56 -0800 (PST) (envelope-from sgk) Date: Wed, 20 Nov 2019 21:07:00 -0000 From: Steve Kargl To: Janne Blomqvist Cc: Bernhard Reutner-Fischer , Thomas Koenig , GCC Patches , Thomas =?iso-8859-1?Q?K=F6nig?= , Tobias Burnus , "fortran@gcc.gnu.org" Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures Message-ID: <20191120210356.GA62006@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <48286910-ebbb-10e4-488b-8c96e505375c@tkoenig.net> <43b9fcf0-f457-90a7-c807-4aebc65cb045@tkoenig.net> <2981fd67-007e-7327-8208-27e8fd18d9db@netcologne.de> <56a5680e-5e48-4d74-dfca-0a083aae8a3c@netcologne.de> <49A0C81F-85BA-477E-A70C-1AC077EAEA2A@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-SW-Source: 2019-11/txt/msg02024.txt.bz2 On Wed, Nov 20, 2019 at 10:38:30PM +0200, Janne Blomqvist wrote: > On Wed, Nov 20, 2019 at 8:00 PM Bernhard Reutner-Fischer > wrote: > > > > On 19 November 2019 23:54:55 CET, Thomas Koenig wrote: > > >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: > > >> + char name[GFC_MAX_SYMBOL_LEN + 1]; > > >> + snprintf (name, GFC_MAX_SYMBOL_LEN, "__dummy_%d_%s", var_num++, > > >> + f->sym->name); > > >> + > > >> + if (gfc_get_sym_tree (name, ns, &symtree, false) != 0) > > >> > > >> (I) you should + sizeof(__dummy__) + 10 for unsigned long %d or the > > >like. > > > > > >GFC_MAX_SYMBOL_LEN is the maximum length of a gfortran symbol. AFAIK, > > > > This is only true for user-provided names in the source code. > > > > Think e.g. class names as can be seen in the dumps.. > > We have GFC_MAX_MANGLED_SYMBOL_LEN for that. *Insert my standard pet > peeve rant that we should use heap allocated unlimited length strings > for these rather than copying stack allocated strings around, or > preferable a symbol table* > I agree with Janne. This seems like a very good candidate for someone that would like to contribute to gfortran, but does not know where to start. Any lurkers on the mailing list care to give it shot? -- Steve