From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by sourceware.org (Postfix) with ESMTPS id DA92B3857B97 for ; Sun, 12 Jun 2022 15:38:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA92B3857B97 Received: by mail-pj1-x102b.google.com with SMTP id q12-20020a17090a304c00b001e2d4fb0eb4so6569631pjl.4 for ; Sun, 12 Jun 2022 08:38:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=59P7B60BiBtJz1z/HlEiWwUdpvohzCWDUDHrSqDJqYE=; b=W6mfUDxmU3Y4V4SkysiKucioc5xK9TEGDCs0rozAeIs4tmr4TkZEaKWdSIcUdHQ33h VSifam/eM8BI+GvmVdPBvsFikvAlKVWAU2MsTkShX5frAPATfqshpdfrQ4aDsqhpRXQi CtXvotuZMKlhyf5fd9iLF00dKwvtGA6Cl38ZI+JnurYEoB+IGSh7GMn5N6CQqSKwutUQ LwAahNaKmZY9i9qPv8k/9naLnzgUdUBWBathEFNKjC5Rw34UmPsMtODGX7t/XXqbDU7P OjP9ykHkvU4tospN6YAWuWGYgL3s2JORRddJIDip9QfTg4KGRlObPcP7ylKojdrsiZNf nreQ== X-Gm-Message-State: AOAM530vgT9AxHVeYvqav2BO8E1YFoOlESf4wvuPG6ynSmDNaRFJwze1 7GqlALDaC4Hq0sKcvHrSjtgdlzHLWV6iZQ== X-Google-Smtp-Source: ABdhPJydLVFaSVyPyxr7cTioUVxmaVFujai2eJ6A5fkHbdu/TMjc3m94ApT8OjKWqGFFnFMkeahVzg== X-Received: by 2002:a17:90a:d507:b0:1ea:a977:c07b with SMTP id t7-20020a17090ad50700b001eaa977c07bmr3024175pju.33.1655048298450; Sun, 12 Jun 2022 08:38:18 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id a12-20020a056a001d0c00b0051bba89c2bcsm3392183pfx.58.2022.06.12.08.38.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jun 2022 08:38:18 -0700 (PDT) Message-ID: <5b63a39f-551f-54cb-23f7-6dc7192e74d2@gmail.com> Date: Sun, 12 Jun 2022 09:38:16 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] Do not erase warning data in gimple_set_location Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <7390933.EvYhyI6sBW@fomalhaut> From: Jeff Law In-Reply-To: <7390933.EvYhyI6sBW@fomalhaut> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2022 15:38:22 -0000 On 6/10/2022 4:57 AM, Eric Botcazou via Gcc-patches wrote: > Hi, > > gimple_set_location is mostly invoked on newly built GIMPLE statements, so > their location is UNKNOWN_LOCATION and setting it will clobber the warning > data of the passed location, if any. > > Tested on x86-64/Linux, OK for mainline and 12 branch? > > > 2022-06-10 Eric Botcazou > > * gimple.h (gimple_set_location): Do not copy warning data from > the previous location when it is UNKNOWN_LOCATION. > > > 2022-06-10 Eric Botcazou > > testsuite/ > * c-c++-common/nonnull-1.c: Remove XFAIL for C++. OK for trunk and gcc-12. jeff