Message ID | 20240105071913.593978-1-cederman@gaisler.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6069821dyb; Thu, 4 Jan 2024 23:20:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHk80A+hGQrXBpk2aI25N++kNYzAjEat4kVVkG9jTk2qaOLOBlC1bORi1NdyKtzdZGjY8PS X-Received: by 2002:a05:6214:2389:b0:680:b80b:273e with SMTP id fw9-20020a056214238900b00680b80b273emr1595730qvb.99.1704439232075; Thu, 04 Jan 2024 23:20:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704439232; cv=pass; d=google.com; s=arc-20160816; b=GdIDizx07WumR8L43FQOTuzqMGqUY+qlbtx/nETkP+rOLYTLZx2Pyp3X4ywaHlh1HM EahBchaSOHtSGGvlTCYz/wLFG5LSL8dzzEdsHkts2on2TVpZs7leJt/ql2Z6WnwT7CtP Oc9qBVJfN1wbI3TIZYNgL4daSO6fsLpAISBZAShzFWqIZBAzkE7zX8F6J0Wvu4vST8WJ i8hPM1z3UL2LWwucrgnEVUT/0tMNT1VIYe/MVhVgmyplGBY9IIxP0LCkXkiA2fY/K7+n SGhg7Z3g3aquL56Jq74zJuFc7j+3pj2uvm+mlM0ltJNYxWI561ETCXrz6FiWaMFvES8D CaHw== 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-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=2JQagp0J+4u3G+o0CteIXRXZHBOoyf0n64hgbdwbXH8=; fh=rIObTAxIziLroRYYyAaA4FmRqLBS8lo6qLKQtV3fxpU=; b=a6jYxu8nquO8yxakO+oJe5AO5RVDQt7Zh+DdNb80FQBGAiY1agoiX9Dq5KdOzx4IZZ hwMhuqpr0kaTPPKzss2Tf4njK6QwSWYEe2RrcuRX1401E+BQKwxX5A5h270hafVlzIPB eZmQuMTLqptyhZ3P6GprI4D3O9vdlasiJc/9sf7ui6SSQ6UNh8VmCGPLSF6K+6hV9j7x NfBhTAc5sxbUhG1zV9l3agRepa4pDqKqUfwZfFHuhYIXjEqS3xeBiy9LBnAdGefwZSAN QhnPxX1e/FpjzWPQ3nu90teSRsRbVHEE9Lmj5NruYn4GApp/LHq3yR7C9N0W/MQZCVbb 1inQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=CEwleQsn; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a11-20020a0ca98b000000b0067f870851ffsi1229929qvb.25.2024.01.04.23.20.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 23:20:32 -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; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=CEwleQsn; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3CDD385E007 for <ouuuleilei@gmail.com>; Fri, 5 Jan 2024 07:20:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) by sourceware.org (Postfix) with ESMTPS id 5E5AE3858004 for <gcc-patches@gcc.gnu.org>; Fri, 5 Jan 2024 07:19:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E5AE3858004 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=gaisler.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gaisler.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5E5AE3858004 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704439180; cv=none; b=wNZC3XhyaIbFOim+Eia10mIQCP+STMLgZ1HSRyUt74Fygkjg8HZhtbvvF9d5hnJRaO5EA6kZ3EjQruQVYHCjI5zReXg95nrGSZ5S8lsxp/CgAUMboNbJZnkg764QPG/DHhw/YlOtwTDMGmfo0BS3j6E+VRCfLIVbDsCIa8ZGUvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704439180; c=relaxed/simple; bh=OipN3PKxUxwELW6xiEB9UPd5EhcxjcTIE8G8J6+7Nds=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Sg2+YCaAGTgBv0znAjytzA6BKYgTNjdFd7vYDnxLIAxHqyxz0Tf7HzdnUZBUZMyDGrSJ9DVK9yJsx/cguY54MPdM0rq+LObSkAxhTMPINUd2NSFTGJEvyJJ+i0Y8KB2M33j6Pvml1zv9Ia+5B2jZqguo1wg9SS80HXUa1qCweHo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4T5vwT0y57z67wf; Fri, 5 Jan 2024 08:19:37 +0100 (CET) Received: from cederman.got.gaisler.com (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) by smtp.simply.com (Simply.com) with ESMTPA id 4T5vwS6SyVz67qq; Fri, 5 Jan 2024 08:19:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=unoeuro; t=1704439177; bh=2JQagp0J+4u3G+o0CteIXRXZHBOoyf0n64hgbdwbXH8=; h=From:To:Cc:Subject:Date; b=CEwleQsnOYxSniZroN+7/BSV3m/NsG1xec+CMNuGlP0X1jNps48g2NNNRxHKYNcIV Q1NfP8svM47sBgE+Jvosh5dqUt84XZZ69zh9NHqbpfeLrRDX2W3JgczNdI8ntlAel3 jqHuQB37zRMc+lNJEn6eJ0rPC3AC+DCZcRo7j9tY= From: Daniel Cederman <cederman@gaisler.com> To: gcc-patches@gcc.gnu.org Cc: ebotcazou@libertysurf.fr, daniel@gaisler.com Subject: [PATCH] sparc: Char arrays are 64-bit aligned on SPARC Date: Fri, 5 Jan 2024 08:19:10 +0100 Message-Id: <20240105071913.593978-1-cederman@gaisler.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787234072514489940 X-GMAIL-MSGID: 1787234072514489940 |
Series |
sparc: Char arrays are 64-bit aligned on SPARC
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Daniel Cederman
Jan. 5, 2024, 7:19 a.m. UTC
pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and long HeaderStr in pr88077_0.c differs in alignment. warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is smaller than 8 used by the common definition in c_lto_pr88077_1.o gcc/testsuite/ChangeLog: * gcc.dg/lto/pr88077_0.c: Change type to match alignment for SPARC --- gcc/testsuite/gcc.dg/lto/pr88077_0.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
> pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and > long HeaderStr in pr88077_0.c differs in alignment. > > warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is > smaller than 8 used by the common definition in c_lto_pr88077_1.o I have never seen it though. Is that really a warning issued by GCC?
On 2024-01-08 10:20, Eric Botcazou wrote: >> pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and >> long HeaderStr in pr88077_0.c differs in alignment. >> >> warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is >> smaller than 8 used by the common definition in c_lto_pr88077_1.o > > I have never seen it though. Is that really a warning issued by GCC? > Hello Eric! Thank you for reviewing the patches! No, this warning is not from GCC, it is from binutils ld. I forgot to mention that in the message. I get a similar warning from older versions of ld, so I do not think it is a new warning. It is also there with GCC 10. For the OK:ed patches (with your changes), can I push them to release/gcc-13 in addition to master? /Daniel
> Hello Eric! Thank you for reviewing the patches! You're welcome. > No, this warning is not from GCC, it is from binutils ld. I forgot to > mention that in the message. I get a similar warning from older versions > of ld, so I do not think it is a new warning. It is also there with GCC 10. I see, thanks for the explanation, the patch is OK then. > For the OK:ed patches (with your changes), can I push them to > release/gcc-13 in addition to master? Sure.
diff --git a/gcc/testsuite/gcc.dg/lto/pr88077_0.c b/gcc/testsuite/gcc.dg/lto/pr88077_0.c index 924fe9fc3f01..9455295051fc 100644 --- a/gcc/testsuite/gcc.dg/lto/pr88077_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr88077_0.c @@ -1,3 +1,7 @@ /* { dg-lto-do link } */ +#if defined __sparc__ +long long HeaderStr; +#else long HeaderStr; +#endif