From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113743 invoked by alias); 1 Dec 2017 17:36:55 -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 113724 invoked by uid 89); 1 Dec 2017 17:36:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HTo:D*oracle.com, Hx-languages-length:312 X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout2.netcologne.de Received: from cc-smtpout2.netcologne.de (HELO cc-smtpout2.netcologne.de) (89.1.8.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Dec 2017 17:36:53 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 0F39312784; Fri, 1 Dec 2017 18:36:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id 0BCD711D82; Fri, 1 Dec 2017 18:36:49 +0100 (CET) Received: from [78.35.131.21] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5a219331-02b7-7f0000012729-7f0000018365-1 for ; Fri, 01 Dec 2017 18:36:49 +0100 Received: from [192.168.178.20] (xdsl-78-35-131-21.netcologne.de [78.35.131.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA; Fri, 1 Dec 2017 18:36:45 +0100 (CET) Subject: Re: Patch to fix an undefined behavior in fortran/decl.c To: Qing Zhao , gcc-patches Cc: fortran@gcc.gnu.org, blomqvist.janne@gmail.com References: <47AB1118-E914-4ABB-BCE9-89A4C4867768@oracle.com> From: Thomas Koenig Message-ID: <18888b7e-63f5-ab5a-cf06-79e12faedd45@netcologne.de> Date: Fri, 01 Dec 2017 17:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <47AB1118-E914-4ABB-BCE9-89A4C4867768@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-12/txt/msg00058.txt.bz2 HI Quing, > this is a very straightforward fix for an undefined behavior in > fortran/decl.c: > - sprintf (name, "%s_%d", name, kind_value); > + sprintf (name + strlen (name), "_%d", kind_value); OK for trunk. Thanks for the patch! Regards Thomas