This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20625] [4.0/4.1 regression] ivopts produces code that generates "unaligned access exception"
- From: "tsv at solvo dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2005 19:07:17 -0000
- Subject: [Bug target/20625] [4.0/4.1 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 tsv at solvo dot ru 2005-05-05 19:07 -------
gcc version 4.0.0 20050423 (Red Hat 4.0.0-2)
Here is another test case that generates unaligned access exception:
----------------------------------------
typedef union
{
short i16;
unsigned short u16;
int i32;
unsigned int u32;
long i64;
unsigned long u64;
double dbl;
unsigned char byt;
char *str;
} DBusBasicValue;
void foo(void *p)
{
DBusBasicValue *a;
a = p;
a->byt = 'a';
}
int main()
{
# include <asm/sysinfo.h>
# include <asm/unistd.h>
unsigned int buf[2] =
{
SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT
};
char buff[100];
syscall(__NR_osf_setsysinfo, SSI_NVPAIRS, buf, 1, 0, 0, 0);
foo(&buff[1]);
}
--------------------------------
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20625