------- Comment #3 from ubizjak at gmail dot com 2010-01-17 19:47 ------- Well, gcc would just generate invalid code without this assert.
Reduced test: --cut here-- typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long int uint64_t; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; enum { FSYSHEADKEY_NULL = 0, FSYSHEADKEY_FILESYSTEM, FSYSHEADKEY_MNTPATH, FSYSHEADKEY_BYTESTOTAL, FSYSHEADKEY_MINFSAVERSION, FSYSHEADKEY_MOUNTINFO, FSYSHEADKEY_ORIGDEV, FSYSHEADKEY_FSEXTEOPTRAIDSTRIDE }; typedef struct s_dico { } cdico; struct s_ntfsinfo { u32 bytes_per_sector; u64 uuid; }; enum { MSG_FORCE = 0, MSG_VERB1 = 1, MSG_VERB2 = 2, MSG_STACK = 3, MSG_DEBUG1 = 4, MSG_DEBUG2 = 5, MSG_DEBUG3 = 6, MSG_DEBUG4 = 7, MSG_DEBUG5 = 8 }; ntfs_getinfo (cdico * d, char *devname) { struct s_ntfsinfo info; char bootsect[512]; int fd = -1; info.bytes_per_sector = ((u16) (*((u16 *) (bootsect + 0xB)))); foo (info.bytes_per_sector); info.uuid = ((u64) (*((u64 *) (bootsect + 0x48)))); fsaprintf (MSG_VERB2, 0, MSG_VERB2 >= 3, "fs_ntfs.c", __FUNCTION__, 107, "bytes_per_sector=[%lld]\n", (long long) info.bytes_per_sector); fsaprintf (MSG_VERB2, 0, MSG_VERB2 >= 3, "fs_ntfs.c", __FUNCTION__, 109, "uuid=[%016llX]\n", (long long unsigned int) info.uuid); dico_add_u64 (d, 0, FSYSHEADKEY_MINFSAVERSION, ((u64) ((((u64) 0 & 0xFFFF) << 48) + (((u64) 6 & 0xFFFF) << 32) + (((u64) 4 & 0xFFFF) << 16) + (((u64) 0 & 0xFFFF) << 0)))); } --cut here-- Problematic line is bootsect + 0xB that crosses SImode aligned load. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42774 ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org