From patchwork Mon Jan 8 20:38:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 186139 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp1263003dyq; Mon, 8 Jan 2024 12:39:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNZy4DrLe78PLQeYMDW0pCV4DnJ9Tz8pBuFNSPcyHFchN5CLwnIjp/EjpDOgtqsCXXQuBn X-Received: by 2002:a05:6808:198c:b0:3bb:e572:af57 with SMTP id bj12-20020a056808198c00b003bbe572af57mr5637853oib.49.1704746371622; Mon, 08 Jan 2024 12:39:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704746371; cv=pass; d=google.com; s=arc-20160816; b=GRmAHbER5Xc8JNWBZGJN9APRJ2PvdZzXzZ/kE6AmHb8znNClLvuwQw66aggrvLiYMS qfttWWtKW2JNAMTilPFwW9zUvcwztswhEIBIbe5Kf1ysIWw3PljSylfjHmNnIypQAzt+ ibXUDtIGDOAh0wHyfyEtARK8PTaSI15bRbCzmW3l2bIMNj4n/sdGztcSbkHwCt9C/7Qe oj1jVvPwwgmcMP3a9YNR9pcN6MGGZOzal4aMfN/smAqVdwBPj8QdZN51bfG5KtE0yk+s QpLulmDC3aX8Kt7/y3B3jjkzeLFAh/dX9HTC6NMc0mnFhkOGtBT5QrVbUddihUo2KGGN Zkig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:arc-filter :dmarc-filter:delivered-to; bh=0w4C8iHn06rCxbmyM7eh3b6R1ZxU6EC2+KbJN2yW62A=; fh=1L2/IiukS00vgiXcKREcvt+pFBEM8GuYOng2C1a9k1k=; b=ve5RMGdinifFyKReuYjz98Gg1iSHtm5lxw2SbGVO895gJpbWk3wEzb+oJrwrYk0DR2 osGDKVARGjEAxUFGvgVKeGcc2cjpEo4rnfdhx2LpLCKHe8KHSJk8rXR9/+6/SQT8Df0p VretYCcocIrPUYQQrpFTlV/nAoFh82hBIagXs0nCAWCox9AT+aKuyjj9K6l6wOgoNr8L WAxDhjERqRCekVjEeHB1V/s1oxEimGlvTglR/BKv6Ho01iQvn5/AFocIxAbPmqDnR31f q/EJlJlBVycctrf+cq8D1VNDAyDWFESQ7q6J3syxjaR4LsrO5y37T3z5Qtf+PH0T+NnF zBzA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j16-20020a0ce010000000b0067f28c68f6fsi716375qvk.513.2024.01.08.12.39.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 12:39:31 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E0A6385828C for ; Mon, 8 Jan 2024 20:39:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (dellerweb.de [173.249.48.176]) by sourceware.org (Postfix) with ESMTPS id 7AC713858CDB for ; Mon, 8 Jan 2024 20:38:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7AC713858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7AC713858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=173.249.48.176 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704746331; cv=none; b=BIVloXhhTNLjYt2W/B+21LSTvjG4B5PYf0xIooztwFv6ZnpUePCoyS3RRLnuZn9KvT+gA2SSsEmjiwsSmzx6K6h5I5F5LT6hhsQxmztkl8uGFvodHxBwSW5iKkGdEmYhlpNhkbVSka/j495/QOdcptHN+159x0cXH0KEHt5Ml/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704746331; c=relaxed/simple; bh=HjStKTRkM1l4nH2lYjg8no42QLAjqO37fIpjVtUps2s=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=hDvUwMgpghXONPL00yiNKnS4/3GR/H7XywVQY7dKFVW40+DT0iEIcMQnsmETf/ViYERnneCk5Ui0QkrP9+QDE70RJlYnd/j1pj6mVc8vSAAgHp5fd2BKJUe/rKuCoOfR5NZb9/hMklEEObgbgY0O2hZv3r7rugP41U1uvVHp/KA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mx3210.localdomain (unknown [142.126.114.79]) by dellerweb.de (Postfix) with ESMTPSA id 480E6160008A; Mon, 8 Jan 2024 21:38:48 +0100 (CET) Received: by mx3210.localdomain (Postfix, from userid 1000) id 7905C22012C; Mon, 8 Jan 2024 20:38:46 +0000 (UTC) Date: Mon, 8 Jan 2024 20:38:46 +0000 From: John David Anglin To: GCC Patches Subject: [committed] hppa: Fix bind_c_coms.f90 and bind_c_vars.f90 tests on hppa Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787556131500491432 X-GMAIL-MSGID: 1787556131500491432 Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix bind_c_coms.f90 and bind_c_vars.f90 tests on hppa Commit 6271dd98 changed the default from -fcommon to -fno-common. This silently changed the alignment of uninitialized BSS data on hppa where the alignment of common data must be greater or equal to the alignment of the largest type that will fit in the block. For example, the alignment of `double d[2];' changed from 16 to 8 on hppa64. The hppa architecture requires strict alignment and the linker warns about inconsistent alignment of variables. This change broke the gfortran.dg/bind_c_coms.f90 and gfortran.dg/bind_c_vars.f90 tests. These tests check whether bind_c works between fortran and C. Adding the -fcommon option fixes the tests. Probably, gcc and HP C are now by default inconsistent but that's water under the bridge. 2024-01-08 John David Anglin gcc/testsuite/ChangeLog: PR testsuite/94253 * gfortran.dg/bind_c_coms.f90: Add -fcommon option on hppa*-*-*. * gfortran.dg/bind_c_vars.f90: Likewise. diff --git a/gcc/testsuite/gfortran.dg/bind_c_coms.f90 b/gcc/testsuite/gfortran.dg/bind_c_coms.f90 index 85ead9fb636..2f9714947c7 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_coms.f90 +++ b/gcc/testsuite/gfortran.dg/bind_c_coms.f90 @@ -3,6 +3,7 @@ ! { dg-options "-w" } ! the -w option is to prevent the warning about long long ints module bind_c_coms +! { dg-additional-options "-fcommon" { target hppa*-*-hpux* } } use, intrinsic :: iso_c_binding implicit none diff --git a/gcc/testsuite/gfortran.dg/bind_c_vars.f90 b/gcc/testsuite/gfortran.dg/bind_c_vars.f90 index 4f4a0cfd795..ede3ffd8c21 100644 --- a/gcc/testsuite/gfortran.dg/bind_c_vars.f90 +++ b/gcc/testsuite/gfortran.dg/bind_c_vars.f90 @@ -1,6 +1,7 @@ ! { dg-do run } ! { dg-additional-sources bind_c_vars_driver.c } module bind_c_vars +! { dg-additional-options "-fcommon" { target hppa*-*-hpux* } } use, intrinsic :: iso_c_binding implicit none