From patchwork Tue Apr 16 03:42:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1923962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=B+SvEL5v; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJVJ34Zjnz1yZ2 for ; Tue, 16 Apr 2024 13:43:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D64453858C78 for ; Tue, 16 Apr 2024 03:43:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id E4D2C3858D32 for ; Tue, 16 Apr 2024 03:43:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4D2C3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E4D2C3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713238992; cv=none; b=qV+3rOZIGnozVQH+4mL4ADXABuoUoph1h0IYG+WXEhTyxkoBmieUj/GOijO37/oBAAlw7oxCHpB6VLQUmIiUWlQNuSUSi5Vk2JIYvyxIGCZV7l+piJEIixV0eQyJee4kGDInwTYxeMl4L9AMv8mExpSvdb6pMqYqexZ2SM4hirk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713238992; c=relaxed/simple; bh=YOE+KL6t/ArS4JJDo3HMwt1+Oal1BD1NtuRRz2neJLY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=J8W0CNT25joIw45vCNq9mLngzYyESCMVRtlBaQpL/Q0qzFI0ucHfCOtp9krNG/sNjGzurjkNDcUmOYIfqTIemNWv1syXNp4zhDLnMMBphTvpsFaE8bN0nJ6uyHjJ2TKGJ5Vf9rsXP+5vq87v5IdAf1Rta2BrBTIZ9wPd1P3l9Xw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-22fa7e4b0beso2559860fac.1 for ; Mon, 15 Apr 2024 20:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1713238988; x=1713843788; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=59qyP2WSp4/LVuWssXDHyXt9X8b0W2eiuVwK+8fRi/w=; b=B+SvEL5vpzB4PdcHmcQCTryz4dbNvN8RTiftqM85y5kHQhAqZ/PkEGQkgLQYxdck/3 oIRQg2tgVOlCzjpMKv4z3DfCV7YegTT0DLcl6294c/w9pAC6C3eUEtohXG8wBfTVIBdp Z30N9/+08J8DFIi89jqc0Ze+x7hUVhpRFcjmI8GXWaYIW6xJnEtgkP0NHiSWuKudy8kI gqjAiYSNBfuJPEImGfeKtzmcHtgXE4wOoi5KRO3Qcx+kw0/rvq4bI5KOYq17rfOsNMcx 6P/UTPccqKGXGevfaFsb7W1uYqygBKcjHeI3JqFr9jh92BN8MO2APb5Dxlu87QaGjZuJ OylA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713238988; x=1713843788; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=59qyP2WSp4/LVuWssXDHyXt9X8b0W2eiuVwK+8fRi/w=; b=eZvDePjzj4UQ1j5r3FUWNhkYtOJIKAGBzDAF9PPL/Lp2P3dDQsYe5OHh1sZDBo9dZC 6r33dmpUktneYq4/HSAB6x6j/VwqUp/XuPFHn0cvWu47OH8Cm6TpTCE7jIHXaNNEYBVt VTAShF/Qoo5bsrzwvs4VC8TjSd0CheKDgyCQgScB0hFYyXexm7fc8HUP3rXrxNmmn1mb DFzvnIcllI1HVVAUNlSboMalP6/hKDTpHkATHKmGKoMJRlkCLQkNlkyV5csOZOaiqxWT gZgFxfmTrH1D8S9T6Rypy3DcGPdNKc94SBqjp47kw7Xw/3PV2Tl9fN1HfG7e0mjSrEnq dWtQ== X-Gm-Message-State: AOJu0YwRGF937QuZts0cEx/gZrqeqAcj6K2CA/Sf6vJ5IEJPj+MhDg/l g8mLGjiZpWph0uTJntHY7SKtNO71xFHnYtxXn1MCe4Z/pJgFFTTDlkq9L7yUutH0Gfiq+XiOjui O8w== X-Google-Smtp-Source: AGHT+IG3ZeZIczhnMmrY08SYXt6mwluyQrTk7kFHIU9gM91Xgi20lTlFb8xMTOh5qiY1CSEjNbx1bg== X-Received: by 2002:a05:6870:13d0:b0:22a:b358:268 with SMTP id 16-20020a05687013d000b0022ab3580268mr11620455oat.25.1713238988233; Mon, 15 Apr 2024 20:43:08 -0700 (PDT) Received: from free.home ([2804:7f1:218b:5e2:c43b:e0c4:71a:241b]) by smtp.gmail.com with ESMTPSA id gx13-20020a056a001e0d00b006ecf25d0b8dsm8016670pfb.184.2024.04.15.20.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 20:43:07 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 43G3gpFB2387971 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 00:42:51 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , Jan Hubicka , Uros Bizjak Subject: [PATCH] [testsuite] [i386] require fpic for pr111497.C Organization: Free thinker, does not speak for AdaCore Date: Tue, 16 Apr 2024 00:42:51 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Fix another test that uses -fPIC without requiring fpic support. Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-, aarch64-, x86- and x86_64-vxworks7r2. Ok to install? PS: This is neither the first nor the last such patch. Maybe the test harness could detect -fPIC et al in compile options and react intelligently to them, whether by warning if dg-require-effective-target fpic is missing, or adding it implicitly. We could have more such smarts in the testsuite machinery. WDYT? for gcc/testsuite/ChangeLog * g++.target/i386/pr111497.C: Require fpic support. --- gcc/testsuite/g++.target/i386/pr111497.C | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/g++.target/i386/pr111497.C b/gcc/testsuite/g++.target/i386/pr111497.C index a645bb95907ee..30e2e0409ad0e 100644 --- a/gcc/testsuite/g++.target/i386/pr111497.C +++ b/gcc/testsuite/g++.target/i386/pr111497.C @@ -1,5 +1,6 @@ // { dg-do compile { target ia32 } } // { dg-options "-march=i686 -mtune=generic -fPIC -O2 -g" } +// { dg-require-effective-target fpic } class A; struct B { const char *b1; int b2; };