From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id A90DA3858D32; Tue, 19 Sep 2023 01:47:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A90DA3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6903caaa021so1071386b3a.0; Mon, 18 Sep 2023 18:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695088042; x=1695692842; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=G45YSPFEVRXlcWK8uGaUkEpRathXtqulxyalufoPdQ4=; b=N33oTUp2rD+iXxVVecVUF/dV2chr5l7+3bue8ioFJ8S+3hwc6RcIrcxssQMDUmbrTT xoxhEckZU951iSTvGdItxjgSZEVot5wriMNGuahCD0tQOyNUi6e75BDfoCU1RYgICZCF kULy4UKVF2jhzkyelddv+qW1idIf0mq8/LV+Oz28wxGC/u0z8qjMARZoKinB8IjM+Zu6 iDnex5URyG4PH/p1a5/sgjSfLYVElGVBnwSMmv8K0YIuzuaD9wsQyv7eLU5C9EY4cGIL 4kuH+uMnU+AekKjTgG9dQYDpfdfGS+vB08EL2Ex8aUvk+x+O5EQ5fO1MWmUzbcKclf9+ 5M+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695088042; x=1695692842; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G45YSPFEVRXlcWK8uGaUkEpRathXtqulxyalufoPdQ4=; b=VJsLAl2qU/En8LhTpYtna5RYafB57wzv9L9NhP35iWepJYey7Z+lk/pWTF2y7lCwX1 a1dTykdliCvaLvzPKOk2qUbPMnR3k6fOaYvvMZMVYPn1m6KkGKrMalMIJZlZnkCCPh94 EXecznsylnbVoYIHMa7Sk9gdoI4z5zwQdgo7KTBegcHKJxNJwQmbXGa7/6X5f+SBu1bs qFTvTm/8fRgDVtYhXh0l/Ids1V037pTHzZsABLYQtYozbDKkrEWuqh/ezMS+7Fw9DtKK CDhJxPRVwxL5Tp4HHdk+BK4WkA8fY26hmrT6l4Zrp59bHMDLHo1XmDWmbYQ6QNzUNDwA 3rcQ== X-Gm-Message-State: AOJu0YzMJBQZNz1O9yfSNYlV3amG21b30ozCUE87uerw/vyXM5vh7OWN rDh+vmF0uGDFh6HTZF8QL0IvUWLWrBk= X-Google-Smtp-Source: AGHT+IGxX9wOLLf/A8wvqdbZjgNMMNLhaWXzJFVk+VRu//zu15gf5mvScQC25mHr+91Y9MnB5t79Fg== X-Received: by 2002:a05:6a00:1c8f:b0:68f:c309:9736 with SMTP id y15-20020a056a001c8f00b0068fc3099736mr11501485pfw.3.1695088042535; Mon, 18 Sep 2023 18:47:22 -0700 (PDT) Received: from [192.168.1.20] ([50.37.177.113]) by smtp.gmail.com with ESMTPSA id z15-20020aa785cf000000b0069029a3196dsm7650317pfn.184.2023.09.18.18.47.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 18:47:22 -0700 (PDT) Message-ID: Date: Mon, 18 Sep 2023 18:47:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] fortran: fix checking of CHARACTER lengths in array constructors [PR70231] Content-Language: en-US To: Harald Anlauf , fortran , gcc-patches References: From: Jerry D In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/18/23 1:27 PM, Harald Anlauf via Fortran wrote: > Dear all, > > as correctly analyzed by Jerry, the code for checking the consistency > of character lengths in array constructors did not properly initialize > the auxiliary variable used in "bounds checking". The attached patch > resolves this by initializing this auxiliary variable with a length > obtained by scanning the constructor. > > Interestingly, the failure depended on optimization level and was > apparent only at -O0, and could exhibit both false-positives and > false-negatives. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > Wow 2016 when I looked at that one. The patch looks reasonable to me. OK for mainline. Jerry