This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug jit/66812] jit code-generation example that unexpectedly required -fno-strict-aliasing to work


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66812

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias, wrong-code

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]