From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96692 invoked by alias); 20 Nov 2019 18:00:46 -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 96274 invoked by uid 89); 20 Nov 2019 18:00:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:56a5680, H*f:sk:56a5680, HX-Received:9dcb X-HELO: mail-wr1-f67.google.com Received: from mail-wr1-f67.google.com (HELO mail-wr1-f67.google.com) (209.85.221.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Nov 2019 18:00:04 +0000 Received: by mail-wr1-f67.google.com with SMTP id q15so930406wrw.7; Wed, 20 Nov 2019 10:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:in-reply-to:references:mime-version:content-transfer-encoding :subject:to:from:message-id; bh=aKSg2JAwGz99ZhgcH4gJvCKMUz0xpz53GTQLp9HjCT8=; b=c0AV1XpkXfzd7yKOakAP1jjdoGHWU9gOLepCk1AyhLbE5MRJivZo2iW8V8NOQ8lhzV vQH6FBQOmuhxevFlIlfkaa8i/tYN6LCbv+kcFnL+hcwyPWOv1RGeo00LDQtfVcs4Q6Sw A5r0mMU1vkHk3gN8MLsRvN6p1YkOoKqzKLn9WKlAbcZgftpCDwV83DmuhIYOqyU0odbX xDL2sDMbe6h2wUyJ6j0jry8NQ9urlm24N+UMdxynQfncmBAaOEatq0VIsSv4etfflL/B /OtJIh1+/G1AQI2/UEKwt7AG3jmLmSY6sN4sJ0avTSps0h8KV7Z1KOzliYolvwKKkOZ/ G8lw== Return-Path: Received: from [100.98.205.25] (213-225-2-12.nat.highway.a1.net. [213.225.2.12]) by smtp.gmail.com with ESMTPSA id b3sm54844wmh.17.2019.11.20.10.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2019 10:00:01 -0800 (PST) Date: Wed, 20 Nov 2019 18:00:00 -0000 In-Reply-To: <56a5680e-5e48-4d74-dfca-0a083aae8a3c@netcologne.de> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures To: Thomas Koenig ,gcc-patches@gcc.gnu.org,=?ISO-8859-1?Q?Thomas_K=F6nig?= ,Tobias Burnus ,"fortran@gcc.gnu.org" From: Bernhard Reutner-Fischer Message-ID: <49A0C81F-85BA-477E-A70C-1AC077EAEA2A@gmail.com> X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg02002.txt.bz2 On 19 November 2019 23:54:55 CET, Thomas Koenig wro= te: >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) !=3D 0) >>=20 >> (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.. >it >is not possible to use a longer symbol name than that, so it needs to >be >truncated. Uniqueness of the variable name is guaranteed by the var_num >variable. > >If the user puts dummy arguments Supercalifragilisticexpialidociousa >and >Supercalifragilisticexpialidociousb into the argument list of a >procedure, he will have to look at the numbers to differentiate them >:-) > >> (II) s/__dummy/__intent_in/ for clarity? > >It's moved away a bit from INTENT(IN) now, because an argument which >cannot be modified (even by passing to a procedure with a dummy >argument >with unknown intent) is now also handled. So maybe __readonly_ , __rdonly_, __rd_or the like? dummy is really mislead= ing a name in the dumps.. thanks,