From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C103C3858D39; Wed, 8 Feb 2023 07:38:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C103C3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675841892; bh=SzIVOIiM+0C7XT4CfXdRGJWvF67Roduy2XvAZack1Ow=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hMjpm+VUho3L8C++lBCzISDJCom68c1XK52v4OcUsoIdfvgI+NBgYlTl3vXroufxn ii+ti6d4GSrWQYyjg+wg8nbP4vsNZKZn5tjmWoP04to2tBmOhil2fKiD0I4ocDkatt La4em75MYYI7dP9DBgA+DwiEy5s8QGvQ5HbuB1jk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/108695] [13 Regression] Wrong code since r13-5215-gb1f30bf42d8d47 for dd_rescue package Date: Wed, 08 Feb 2023 07:38:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: lto, needs-reduction, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108695 --- Comment #5 from Andrew Pinski --- I am 99% sure there is aliasing violations in this code too: #if _MSC_VER #define GETU32(p) SWAP(*((u32 *)(p))) #define PUTU32(ct, st) \ { \ *((u32 *)(ct)) =3D SWAP((st)); \ } #else /* _MSC_VER */ # if __BYTE_ORDER =3D=3D __BIG_ENDIAN #define GETU32(p) *((u32*)(p)) #define PUTU32(ct, st) *((u32*)(ct)) =3D (st) #else /* BIG_ENDIAN */ #if 0 //def HAVE_LINUX_SWAB_H #define GETU32(p) __swab32(*((u32*)(p))) #define PUTU32(ct, st) *((u32*)(ct)) =3D __swab32((st)) #else /* __GNUC__ */ #include #define GETU32(p) ntohl(*((u32*)(p))) #define PUTU32(ct, st) *((u32*)(ct)) =3D htonl((st)) #endif /* __GNUC__ */ #endif /* BIG_ENDIAN */ #endif /*_MSC_VER */ #if 0 #define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt= )[2] << 8) ^ ((u32)(pt)[3])) #define PUTU32(ct, st) \ { \ (ct)[0] =3D (u8)((st) >> 24); \ (ct)[1] =3D (u8)((st) >> 16); \ (ct)[2] =3D (u8)((st) >> 8); \ (ct)[3] =3D (u8)(st); \ } #endif A few other places too ...=