Bug 27943 - packed union doesn't make the unaligned magic on sh64-*
Summary: packed union doesn't make the unaligned magic on sh64-*
Status: RESOLVED DUPLICATE of bug 27942
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2006-06-07 23:14 UTC by Kazumoto Kojima
Modified: 2006-06-08 00:01 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh64-*-*
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kazumoto Kojima 2006-06-07 23:14:37 UTC
union unaligned
{
  void *ptr;
} __attribute__((__packed__));

void *foo (void *p)
{
  return (((union unaligned *) p)->ptr);
}

is compiled to an aligned word access on sh64-*.  It was compiled
to an unaligned access before the patch

r114364 | echristo | 2006-06-05 04:50:48 +0900 (Mon, 05 Jun 2006) | 17 lines
Comment 1 Andrew Pinski 2006-06-08 00:01:29 UTC

*** This bug has been marked as a duplicate of 27942 ***