From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30103 invoked by alias); 9 Jul 2015 21:02:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30059 invoked by uid 48); 9 Jul 2015 21:02:11 -0000 From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/66812] jit code-generation example that unexpectedly required -fno-strict-aliasing to work Date: Thu, 09 Jul 2015 21:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg00806.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66812 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-07-09 Ever confirmed|0 |1 --- Comment #7 from David Malcolm --- (In reply to Andrew Pinski from comment #6) > This sounds like there is an aliasing set problem. > > In the C front-end we have: > > > 5174 /* Permit type-punning when accessing a union, provided the access > 5175 is directly through the union. For example, this code does not > 5176 permit taking the address of a union member and then storing > 5177 through it. Even the type-punning allowed here is a GCC > 5178 extension, albeit a common and useful one; the C standard says > 5179 that such accesses have implementation-defined behavior. */ > 5180 for (u = t; > 5181 TREE_CODE (u) == COMPONENT_REF || TREE_CODE (u) == ARRAY_REF; > 5182 u = TREE_OPERAND (u, 0)) > 5183 if (TREE_CODE (u) == COMPONENT_REF > 5184 && TREE_CODE (TREE_TYPE (TREE_OPERAND (u, 0))) == UNION_TYPE) > 5185 return 0; > 5186 > > > In c_common_get_alias_set . Maybe that is missing on the libjit side. Thanks. Yes; I'd just figured that out, by single-stepping.