From patchwork Wed Sep 5 14:57:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 966432 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-485230-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="C56Bakzs"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YMac8CAE"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4256NW60JCz9sCn for ; Thu, 6 Sep 2018 01:01:31 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; q=dns; s=default; b=JKO DW0hoqDSkO1f57gNWjsI1V3R0p8M6sor9jkWPXDJQhLlIlTjcMLD3/Zu1kCLPbes RVaj3SLM0JQmCnM9mipf+eAidRiqrUZXP7e4+ksZBf0hfduW5tUsHdJDQG/tOKJo 2ZNrJlFUSgga69nXLvWr6TMBdUCvZxZgBpdZ8w74= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=default; bh=TTZwi/akZ BCamJ8F3exWP11jTy0=; b=C56BakzsECDC/n8su5ZrpW1g494WThCbjGQBAlYzd VZEgA0QCKrjosA5PcLQ0fEJLnMnM4MowsVuRJTaTU8mDGGe0Nl2Jp3u8CHs/Cdyz OZWP8RYYoGRKvlDXTPSOlAVRjGgehaxt9XNq068cSxeCf+yo2tNFpYmTwbW2iL3Z d4= Received: (qmail 69456 invoked by alias); 5 Sep 2018 14:58:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 68748 invoked by uid 89); 5 Sep 2018 14:57:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1015, HContent-Transfer-Encoding:8bit X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 14:57:54 +0000 Received: by mail-wm0-f45.google.com with SMTP id y2-v6so8334699wma.1; Wed, 05 Sep 2018 07:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qqhcz3+bnygvA7YCAIXM1AgYjXQkfcjt8wshDOLl9jY=; b=YMac8CAEl+VHF24EJYHFn9f7aRmZO+9HtCetJFe85yQtZOrPGf5ehaM4y4eatugxFO BNC4iVbuNzyA15Sel2vgRWCTaJ1lB8ria8QFzE3YBqUnVnQY+6n520DY/H0giLlUTd5x XyVCpss2ScXBKBWJMoqg0orNSWAHYaJ04I5XwMwvBKWPuD3lBTQDaK6Ldm+nRHVCKrk8 GoMoFV2lw8cjL3eT43XfaPZNNs5Md/y+13W7PzYrCRK4N1n6+TNf0DnMah26mI6SIVPE 5gb0dXolfMKVObYLXN/FHSHPZ1d9tsDCcO0luAgwCOsgy6bKEc+XbIyB+ByDT3fVJAGb 7tgQ== Received: from s46.loc (91-119-125-11.dsl.dynamic.surfer.at. [91.119.125.11]) by smtp.gmail.com with ESMTPSA id v2-v6sm1637423wme.36.2018.09.05.07.57.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Sep 2018 07:57:51 -0700 (PDT) Received: from cow by s46.loc with local (Exim 4.91) (envelope-from ) id 1fxZFb-00008U-Fc; Wed, 05 Sep 2018 14:57:47 +0000 From: Bernhard Reutner-Fischer To: fortran@gcc.gnu.org Cc: Bernhard Reutner-Fischer , gcc-patches@gcc.gnu.org Subject: [PATCH,FORTRAN 26/29] Use stringpool for mangled common names Date: Wed, 5 Sep 2018 14:57:29 +0000 Message-Id: <20180905145732.404-27-rep.dot.nop@gmail.com> In-Reply-To: References: MIME-Version: 1.0 X-IsSubscribed: yes From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-29 Bernhard Reutner-Fischer * match.c (gfc_get_common): Use stringpool for mangled name. --- gcc/fortran/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index fd91e280b93..8d073f28f67 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -5008,13 +5008,13 @@ gfc_get_common (const char *name, int from_module) { gfc_symtree *st; static int serial = 0; - char mangled_name[GFC_MAX_SYMBOL_LEN + 1]; + const char *mangled_name; if (from_module) { /* A use associated common block is only needed to correctly layout the variables it contains. */ - snprintf (mangled_name, GFC_MAX_SYMBOL_LEN, "_%d_%s", serial++, name); + mangled_name = gfc_get_string ("_%d_%s", serial++, name); st = gfc_new_symtree (&gfc_current_ns->common_root, mangled_name); } else