This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20625] [4.0 regression] ivopts produces code that generates "unaligned access exception"
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2005 13:04:04 -0000
- Subject: [Bug target/20625] [4.0 regression] ivopts produces code that generates "unaligned access exception"
- References: <20050324165328.20625.tsv@solvo.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From falk at debian dot org 2005-03-29 13:03 -------
I can reproduce this with gcc 4.0.0 20050329 on alphaev68-unknown-linux-gnu.
Test case:
struct BS {
int i;
char c[46];
};
void foo(struct BS* p)
{
int i;
for (i = 0; p->c[i]; i++)
;
}
int main()
{
#if defined(__alpha__) && defined(__linux__)
#include <asm/sysinfo.h>
#include <asm/unistd.h>
unsigned int buf[2] = { SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT };
syscall(__NR_osf_setsysinfo, SSI_NVPAIRS, buf, 1, 0, 0, 0);
#endif
struct BS p = { 0, "12" };
foo(&p);
return 0;
}
falk@juist:/tmp% gcc -mcpu=ev4 -O2 t.c && ./a.out
zsh: bus error (core dumped) ./a.out
falk@juist:/tmp% gcc -fno-ivopts -mcpu=ev4 -O2 t.c && ./a.out
falk@juist:/tmp%
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |4.0.0
Summary|gcc with -O2 produces code |[4.0 regression] ivopts
|that generates "unaligned |produces code that generates
|access exception" |"unaligned access exception"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20625