This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16407] New: [3.3/3.4 Regression] Unaligned access to local variables
- From: "rsandifo 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 Jul 2004 12:32:59 -0000
- Subject: [Bug target/16407] New: [3.3/3.4 Regression] Unaligned access to local variables
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase causes an unaligned access when compiled with
mips64-elf-gcc.
struct s { char c1, c2; };
void foo (struct s s)
{
static struct s s1;
s1 = s;
}
int main ()
{
static struct s s2;
foo (s2);
exit (0);
}
The problem is that s1 and s2 are supposed to get word alignment,
but their asm declarations don't guarantee this.
The bug dates back to at least 3.2.3, but not 3.0.4, which didn't
take advantage of the extra alignment.
--
Summary: [3.3/3.4 Regression] Unaligned access to local variables
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rsandifo at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: mips64-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16407