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 c/18287] New: Unaligned access to fields inside packed records


The testcase I'm about to attach generates a bug error at runtime on the SPARC
(and very likely on any other STRICT_ALIGNMENT target).  Verified with 2.95.3,
3.3.x, 3.4.x and 4.0pre.

I think the front-end wrongly turns ADDR_EXPR<COMPONENT_REF<INDIRECT_REF>> into
PLUS_EXPR whatever the alignment of the field.  For reference, the Ada front-end
doesn't do the simplification and lets the middle-end generate the temporary if
required.

-- 
           Summary: Unaligned access to fields inside packed records
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ebotcazou at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: *-*-*
  GCC host triplet: *-*-*
GCC target triplet: *-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18287


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