From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76546 invoked by alias); 16 Jan 2019 14:22:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 76535 invoked by uid 89); 16 Jan 2019 14:22:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:827, powerpc64-linux, powerpc64linux, p.i X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Jan 2019 14:22:02 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26DB22F4A for ; Wed, 16 Jan 2019 14:22:01 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C07485C21A for ; Wed, 16 Jan 2019 14:22:00 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x0GELw0T017207 for ; Wed, 16 Jan 2019 15:21:59 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x0GELvh8017206 for gcc-patches@gcc.gnu.org; Wed, 16 Jan 2019 15:21:57 +0100 Date: Wed, 16 Jan 2019 14:22:00 -0000 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix up pr51628-10.c testcase (PR target/88682) Message-ID: <20190116142157.GU30353@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00913.txt.bz2 Hi! This testcase violates aliasing and so is "miscompiled" e.g. on powerpc64 or aarch64 at -O2. Fixed thusly, tested on powerpc64-linux, committed to trunk as obvious. 2019-01-16 Jakub Jelinek PR c/51628 PR target/88682 * c-c++-common/pr51628-10.c (unaligned_int128_t): Add may_alias attribute. --- gcc/testsuite/c-c++-common/pr51628-10.c.jj 2018-12-21 00:40:49.048937834 +0100 +++ gcc/testsuite/c-c++-common/pr51628-10.c 2019-01-16 15:15:51.515279138 +0100 @@ -11,7 +11,7 @@ struct pair_t typedef struct unaligned_int128_t_ { __int128_t value; -} __attribute__((packed)) unaligned_int128_t; +} __attribute__((packed, may_alias)) unaligned_int128_t; struct pair_t p = {0, 1}; unaligned_int128_t *addr = (unaligned_int128_t *) &p.i; Jakub