This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20794] [4.0/4.1 Regression] Miscompilation with __attribute ((aligned))
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Apr 2005 14:08:25 -0000
- Subject: [Bug middle-end/20794] [4.0/4.1 Regression] Miscompilation with __attribute ((aligned))
- References: <20050406144601.20794.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2005-04-07 14:08 -------
This is caused by the big Ada patch that introduced the extra 2 ARRAY_REF
arguments. Unfortunately, I couldn't find the reason why is the last
ARRAY_REF's argument measured in aligment units and not in bytes
(and what was the reason for adding this argument).
The size_zero_node in last ARRAY_REF's argument is created in
gimplify.c (canonicalize_addr_expr), because the element type has
TYPE_ALIGN_UNIT 16, but TYPE_SIZE_UNIT 4, therefore it is 0 strides and
when array_ref_element_size multiplies it again by TYPE_ALIGN_UNIT, the result
is 0 and not 4.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org,
| |kenner at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20794