From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aye.elm.relay.mailchannels.net (aye.elm.relay.mailchannels.net [23.83.212.6]) by sourceware.org (Postfix) with ESMTPS id C696F3858D28 for ; Thu, 6 Apr 2023 16:18:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C696F3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 28482101D05; Thu, 6 Apr 2023 16:18:09 +0000 (UTC) Received: from pdx1-sub0-mail-a210.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9A0E4101D08; Thu, 6 Apr 2023 16:18:08 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1680797888; a=rsa-sha256; cv=none; b=e2FIkeHvCjly+YOuWs+6BdtARf/JoI6L1ke7E41hsK9CAz0BxylfxYyTRa7mkT1nqsnNi+ vVS48eXg2az8BikMfma80IU6tgWuiCl2vyaz4OXU3oZ0RwD4GtrjDGzu31jRukAKmkjXvw WT5R6zPZuxORXloprAaN4dxLgrDonBKoMqkNcNRxZ4x0s5HE5Pg3kltvymNwOV7s5FVYQa F+mY3jsCWJWvcwF+270X/DKA7FtZpRzpcY6wBn0LuLatkRUUDhtF60AR4FLwAeTWhjV3Rw J3EgG9GLd4PeJNeMWmPHC5yKGSjIF/6TdAP4SMtwyqA9xiUPNo8ATSA9pFoyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1680797888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PGwqgFUcAijVCQGh5zSG4VUG6mEnb7zf7szle3jaUQQ=; b=J3c57e7W2TMUyydSqWsYT7J4n2eg5HX/0Kl63iJmg3uD5AQY56Nkkw8at5oMTArVcjVE++ Y6DAhAk74WK8S5cOd0JTV6/8KBFHbJFRrFYvArqd5tZG/srLXrj9oC7vs4GMku5F1NQIfr RTqmihrFv9VYBl1fqt+q4vqWpfcoynYXASQaOG1jTi3pxYoAi5m7fo2Suqj8kpx8de0/wv PTiTnQ4L90mOLwzL8w1cF7tdypGdNq52ZZqFJuHzNiTXMZb+QM13/37uB2dZHZXxfeYWZy hLI+dEYgsdG7ELFlgWtJzsYduVbm4f5KMm/B7uUYBkJGLJG2ej3ihaSThK8aIw== ARC-Authentication-Results: i=1; rspamd-786cb55f77-ndbfl; auth=pass smtp.auth=dreamhost smtp.mailfrom=pedro@palves.net X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Industry-Daffy: 5e5d364d4e7cb301_1680797888936_1709464258 X-MC-Loop-Signature: 1680797888936:2668661386 X-MC-Ingress-Time: 1680797888936 Received: from pdx1-sub0-mail-a210.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.126.30.39 (trex/6.7.2); Thu, 06 Apr 2023 16:18:08 +0000 Received: from [10.1.3.204] (unknown [62.28.99.34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a210.dreamhost.com (Postfix) with ESMTPSA id 4PsmrH0l9NzGP; Thu, 6 Apr 2023 09:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1680797888; bh=NFDafgv3OfXMM7XIfF6vzVgWyBkB6HUPV/ZNT0cHu+A=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=VlxF5PLnmNQ83VafXi27BOp5eHnBrp+JIwyDekbqn/XROemDujWtW5i1pnmBI6sP8 99RNeFg3CrxBB9hJspL+71ZLAEJT5jS6Sff6F8N6UJ/lbyLaJ2zIsL3vX0mQGdjpeO DQOPQDWTxOyTj4IYRoC3e0YuV4Gzd1hVFdNczeaf+a6/zbOFMiHOOcTwFGuPdFzA0k 6lAtUF5dGL3vMtyCkcsZGumnOgHJ8LJJ4p18G94KK/eHQpKn6BEzvewJMintNEy1dZ Oy+CB7YrkYEF55NKezBY3fH6XshLIGJ4237u+MH4qbF1qwfleCDkPtjqQUQRLHybhY ySzuYOreQCTHQ== Message-ID: Date: Thu, 6 Apr 2023 17:18:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] Modify align-c/align-c++ test case for AIX Content-Language: pt_PT To: Aditya Kamath1 , Ulrich Weigand , "gdb-patches@sourceware.org" , "tom@tromey.com" Cc: Sangamesh Mallayya , "simon.marchi@efficios.com" References: <3636157c35660e96f2da98eb70cbac597d0a092c.camel@de.ibm.com> <87r0tqchea.fsf@tromey.com> <87zg8bave2.fsf@tromey.com> <61289f79c8c08ebe15112711954e1b05d49c92be.camel@de.ibm.com> <877cvagpeh.fsf@tromey.com> <82c24017291c399d58fc87d7ae7fc1b17c665295.camel@de.ibm.com> <488d8a7c-1144-c78e-7ba7-e9be3db6c19a@palves.net> From: Pedro Alves In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 List-Id: Às 14:15 de 06/04/2023, Aditya Kamath1 escreveu: > Hi Pedro, Ulrich, Tom and community, > > I actually made a mistake while I was experimenting. I copied this line > in two places resulting in this hunk by mistake which was not required. > That is why I saw the error of initialising a non-static member. I > apologise for the same. Ah, OK. Makes sense now. No worries. > I am okay with the patch with change ID = > I874b717afde7b6fb1e45e526912b518a20a12716 pasted to me on the 29^th of > March. It is the same in AIX as well. Kindly commit the same. Alright, merged. > > > Only one more problem Pedro, Tom and Ulrich.. > Consider the code below.. > > #include > > using namespace std; > > #define DEF(T,U) struct align_pair_ ## T ## _x_ ## U { T one; U two; } > > DEF (char, double); > > struct align_pair_char_x_double item_char_x_double; > > int main (){ > >     int x = alignof (struct align_pair_char_x_double); > >     printf ("%d \n", x); > >     return 0; > > } > > The output of this in linux is 8. But in AIX is 4. Though the size is 8 > for double, alignment is 4. > > bash-5.1$ ~/gdb_tests/align > > 4 That it's different between Linux and AIX does not by itself indicate a problem. > > So we have failures in all test cases involving double data type in AIX. ... because GDB's alignof operator returns 8? It sounds like what the compiler says is the type's alignment differs from GDB's built-in knowledge of the type's alignment. I.e., GDB alignof implementation returns the wrong alignment. This is exactly the sort of bug that the testcase is meant to catch. Grepping around, it doesn't seem like AIX installs a gdbarch_type_align hook, so the fix may to install one, and make it handle the double type specially. Pedro Alves