From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E5454385C6F7 for ; Fri, 15 Mar 2024 09:08:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E5454385C6F7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E5454385C6F7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710493717; cv=none; b=uMcJQvM52zBURMdl9yoktGnVMHMoYyiw0uLzDpwTuUUxfKfAKw7aaxyLaXkLNSoWLdbT6e9dU0MT/R95uUo5fSgdx7J59bAiqHIX/mSwvufJhPuA54eChvE6RBsTkyrQYcuiOmWuQqO/pgYqQ4TH4OIVoWuCPNYrYdHUl8254wM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710493717; c=relaxed/simple; bh=lIIYYiJtoSX7go4M1s5L3vRlfPOzA7ker5fGmoqXAkE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=SeZb4+9jkcnU23vrfPUjcmuzs0DO0BEoTTOjNAa7bgZKdy8F7XkNmIaIfLzfu2YJDzzsvTGLzzteclJCee+ZRbzZSNGpuiuEcaAj4vdChnDE0X4mcHPg5qEZr+Kf0XbN/ag3PNIwTZqnJZj3pQjrEZEv9Cw1idk2+91U/6/XKjk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710493715; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=wDYS9WChzrCURx5MdIXH8dDAsYjCuTqbIkAD1AZUahU=; b=gq7Lla4DurOwUqyseMUvCoAgmyvRvrfCEVggciwFdPlJSJmEAZostU4vbrY7VfT/IBBkcU rBUvIpAdQzgowIoEvtUBEJCoUyrBlVZdmhV5qwFQ+jRtSt3z1A41NW2LR2pd2enjBotOAR qL6h6372/I9+OlMnG5jiMzerFigKZLo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-106-xe8SUQ82M8mhfB9LaZ2DJw-1; Fri, 15 Mar 2024 05:08:32 -0400 X-MC-Unique: xe8SUQ82M8mhfB9LaZ2DJw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 551D13C02798; Fri, 15 Mar 2024 09:08:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.225.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19B92492BD1; Fri, 15 Mar 2024 09:08:31 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 42F98UkP2932704 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 15 Mar 2024 10:08:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 42F98Uko2932703; Fri, 15 Mar 2024 10:08:30 +0100 Date: Fri, 15 Mar 2024 10:08:29 +0100 From: Jakub Jelinek To: Jonathan Wakely Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Fix up pr104601.C for recent libstdc++ changes Message-ID: Reply-To: Jakub Jelinek References: <20240314170050.2835263-1-jwakely@redhat.com> MIME-Version: 1.0 In-Reply-To: <20240314170050.2835263-1-jwakely@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Thu, Mar 14, 2024 at 04:58:41PM +0000, Jonathan Wakely wrote: > Add the [[nodiscard]] attribute to several functions in . r14-9478 added [[nodiscard]] to various APIs including find_if the pr104601.C testcase uses. As it is an optimization bug fix testcase, haven't tried to adjust the testcase to use the find_if result, but instead have added -Wno-unused-result flag to quiet the warning. The testcase tests side-effects of the lambda used by find_if rather than its actual result. Tested on x86_64-linux -m32/-m64, committed to trunk as obvious. 2024-03-15 Jakub Jelinek * g++.dg/torture/pr104601.C: Add -Wno-unused-result to dg-options. --- gcc/testsuite/g++.dg/torture/pr104601.C.jj 2022-05-23 21:44:48.390854093 +0200 +++ gcc/testsuite/g++.dg/torture/pr104601.C 2024-03-15 09:59:08.581824938 +0100 @@ -1,6 +1,6 @@ // PR tree-optimization/104601 // { dg-do run } -// { dg-options "-std=c++17" } +// { dg-options "-std=c++17 -Wno-unused-result" } #include #include Jakub