------- 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