From patchwork Thu Oct 24 22:30:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 99513 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 41A493858D33 for ; Thu, 24 Oct 2024 22:32:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 5B3123858D21 for ; Thu, 24 Oct 2024 22:31:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B3123858D21 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 5B3123858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729809096; cv=none; b=pig5ypi+bUvjjpC+2dPa3/qtvCO/ru4XrYD6ZWg/niInwzHBAu3uIv/PDcYHt56dTdfQ2UQXQdJvY82MchMa7gNJgjm7tMnhM6p61SURIBvbI/cYzrn2SAR/vSyWORUVoAr1BRQIX2KQXr3PSGywqTtnmdakeaUfL50wT6geUW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729809096; c=relaxed/simple; bh=jDQxFCn3HpowjzSSFB1JV3wMHuObis5FzfuM3rc6ebw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=OLCtJLtW+p/foQnQx6PIsFDsL3jX9NTwvw7nP/OCB3aBQuQna6/lasqoRWjFluxaomXJDLMxTmLnWJFG4M8MTGLoUMtH+n/ErmaL2iQ/5t0pZuyqf9nGFLtTDlbaCKNnBrd2RbqNUWtuQtT4NzJ5m5ALGlQZLmbJBO9cl3AjTbE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729809095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=/h+yGgaPKOvMI6GjcSWR+2rzwGsXPryGrM35jRUJ4as=; b=NzzODrePiIDV2E4NzG/1r3DNiphrgWwWVvrEbo7ScGoAi/g7LhCj4a6yoMDU4I5Ki/Uf4m eFc0aCTiM5zALt48+t+nK9hRu0bMj8JypDX+DkwEUpJ0n9L7sDb80KLtThAdE2ODZ3G43o xDf5RQHeJFoFX4ERL9zKaNpLSRpgjMc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-457-nZDEU1b8M4qIs34PkEJqZg-1; Thu, 24 Oct 2024 18:31:33 -0400 X-MC-Unique: nZDEU1b8M4qIs34PkEJqZg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d4854fa0eso698294f8f.2 for ; Thu, 24 Oct 2024 15:31:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729809092; x=1730413892; h=mime-version:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/h+yGgaPKOvMI6GjcSWR+2rzwGsXPryGrM35jRUJ4as=; b=h47QgCjnQ95nNY80i8JFQxUhcMJJa2IVA2Tvg1AEsFIQQWkCfyzuoeP1roD+pPE6FU 0MxhOkePvcMaHLALM9vHM7Frse6EYlwCYh2kVWu+sIMuHDEvSdiKIVYMRVzwYwWrG8rj 8fQf1khI4JjdYOQFW7DP/8PeoxBAhAqMbj8mDS8V3jEg7RRdrc01eK+5e8PR/4L8WwV2 tBNd5srPqZl6fwesaRi1+Agu41sOJyj5CSNeyJvcYsEa1EBgDZACzDMCMhdVO8XkOMlO XN5prhXTaGy7NLye4RbDv/JTxY6fzzWtdf5Sku2byhwhsnA1Ww/emxhIbazxf8vTnxU4 RudA== X-Gm-Message-State: AOJu0YwGY/x+nW4JGLeV3eAHR/VpnwHDTe3lgjcbnOEUgQXVYXr3aDpR i0hEbRJhaz8SBGA8KLb7TIl/GLJI6zJ4RL80aPJGJEy4+P4MI55G+lMl/5DCwNnUq0sjN+rOc6o iXwS6aw74rydNJtM7NN22Dbf+hV4J4lFj2CrIPwoFhl16Wkjx0nLFse7JKEmvlAZt63NkVIc8VZ UbX1fVMFea9pY8jH8QRt34XKNs4mdB8EKk/zn4/CE= X-Received: by 2002:adf:e985:0:b0:37d:4ebe:1644 with SMTP id ffacd0b85a97d-380458ec199mr2438544f8f.43.1729809091681; Thu, 24 Oct 2024 15:31:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIuROwEV4sqjKW+huIzLT4XB8E1ZV4UbQ2dEKvUE7/U3VBqdRMEushcHHdrAPOqEfuL5X6Xg== X-Received: by 2002:adf:e985:0:b0:37d:4ebe:1644 with SMTP id ffacd0b85a97d-380458ec199mr2438527f8f.43.1729809091170; Thu, 24 Oct 2024 15:31:31 -0700 (PDT) Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b55f779sm30004125e9.18.2024.10.24.15.31.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 15:31:29 -0700 (PDT) Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.97) (envelope-from ) id 1t46Lw-00000006m2w-1dtX for gcc-patches@gcc.gnu.org; Thu, 24 Oct 2024 22:30:48 +0000 Date: Thu, 24 Oct 2024 22:30:48 +0000 (UTC) From: Joseph Myers To: gcc-patches@gcc.gnu.org Subject: testsuite: Use noinline in gcc.dg/simulate-thread/simulate-thread.h Message-ID: <1c6edd09-93e4-f352-8569-435dba55c723@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Among the changes of test results with a -std=gnu23 default were two tests changing from PASS to UNSUPPORTED: UNSUPPORTED: gcc.dg/simulate-thread/speculative-store.c -O2 -g thread simulation test UNSUPPORTED: gcc.dg/simulate-thread/speculative-store.c -O3 -g thread simulation test It appears that functions defined with () becoming prototyped affects inlining, and changing the code to use (void) allows UNSUPPORTED results to be reproduced with -std=gnu17. Add __attribute__ ((noinline)) on one more function to avoid the UNSUPPORTED results; some of the tests in this directory already have such an attribute on some functions. Tested for x86_64-pc-linux-gnu. OK to commit? * gcc.dg/simulate-thread/simulate-thread.h (simulate_thread_wrapper_final_verify): Mark noinline. diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.h b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.h index 22c05084ee7..b582220694e 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.h +++ b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.h @@ -116,7 +116,7 @@ simulate_thread_wrapper_other_threads() /* If the test case defines HOSTILE_PAUSE_ERROR, then the test case will fail execution if it had a hostile pause. */ -int +__attribute__ ((noinline)) int simulate_thread_wrapper_final_verify () { int ret = simulate_thread_final_verify ();