From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by sourceware.org (Postfix) with ESMTPS id 23357385800B for ; Fri, 5 Nov 2021 12:24:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 23357385800B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f45.google.com with SMTP id b2-20020a1c8002000000b0032fb900951eso9424772wmd.4 for ; Fri, 05 Nov 2021 05:24:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=c0jp1HtGlFI+amBhydrpGiSuSen82tcAVeyOD8Abuz4=; b=CjSWShEUrQkhmM0L6sJn9CVmIQjKcBYJRp783q9jMFHQ5TqgezXbviQeZwNizo87BP 4gpW16sq7zHMv+YexR2PLhLYhatpDOlhL9fdU/L94wpYLVXdhdlhYiq9594NzQx+9o6M D3M2XIBrBq+EoBGPwHLiXVD+vVRanqBglJ7MJCLZfyS/opgtpjB8k//9qPCWqTgPTamR dT0yxVGXzrBwaDOwjkx5RtgBXtXABUdQWgHMOm8EB76qACkePhzKHHldhOiUoz4MBDWG ZCh9YzId5yQFCrZ/v56yJimPC43Sr6XmD8LLNo2UM2Hg0CY8Txr4LNjRtiwIyrEtDD25 L7uw== X-Gm-Message-State: AOAM53096TZv6EoZDEHHbSP0B1qNE4zGFgWPW8kWQvJpSlqk9ThB64aq WUj7D7Z4vTt2+iPdMI5mOOs= X-Google-Smtp-Source: ABdhPJxOVKuQKhYbtWUxNiPRJ8ojhtTxX76xbHzLlKTBA2UU0TjpnQHQeeKJEfZXqX+KpAGl13vtQA== X-Received: by 2002:a05:600c:358a:: with SMTP id p10mr23312786wmq.180.1636115096252; Fri, 05 Nov 2021 05:24:56 -0700 (PDT) Received: from ?IPV6:2001:8a0:f912:1a00:d3db:ac91:4b9e:1449? ([2001:8a0:f912:1a00:d3db:ac91:4b9e:1449]) by smtp.gmail.com with ESMTPSA id o1sm8268270wrn.63.2021.11.05.05.24.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Nov 2021 05:24:55 -0700 (PDT) Message-ID: <0d650a1b-5202-d0dd-d346-f73704b5f594@palves.net> Date: Fri, 5 Nov 2021 12:24:53 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] [gdb/testsuite] Fix gdb.arch/i386-avx.exp with clang Content-Language: en-US To: Andrew Burgess , Tom de Vries Cc: gdb-patches@sourceware.org References: <20211104135559.5875-1-tdevries@suse.de> <20211105093300.GG918204@redhat.com> <20211105115404.GA1816063@redhat.com> From: Pedro Alves In-Reply-To: <20211105115404.GA1816063@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2021 12:25:02 -0000 On 2021-11-05 11:54, Andrew Burgess via Gdb-patches wrote: > * Tom de Vries via Gdb-patches [2021-11-05 10:43:38 +0100]: >>> I see the same problem. Did you consider using: >>> >>> /* Some useful comment .... */ >>> v8sf_t data[] __attribute__ ((aligned(32))) = .... >>> >>> this seems to fix the problem on clang for me, and still works fine >>> with gcc. >> >> I did consider this, and decided against it because it's not >> portable. >> >> Note btw that there is no other usage of this: >> ... >> $ find gdb/testsuite/ -type f | xargs grep attribute.*align >> $ > > No, but in gdb/testsuite/lib/attribute.h we do setup a compatibility > macro for 'noclone', so there's definitely precedent for using > attributes that might not be supported everywhere. > > I'd hope most production level compilers would, if they don't support > 'aligned' have something similar/equivalent. > > Personally, I'd go with a compatibility macro, and let folk who care > about other compilers figure out what they need when they hit the > problem. I agree, and I'm not aware of any serious production compiler that doesn't support some way of forcing alignment. Pedro Alves > But I'm not blocking your proposed solution if you feel > strongly about it.