This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/45351] many unaligned accesses in libgomp tests
- From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2011 16:57:59 +0000
- Subject: [Bug libgomp/45351] many unaligned accesses in libgomp tests
- Auto-submitted: auto-generated
- References: <bug-45351-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45351
--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-19 16:57:00 UTC ---
> Do struct alignment rules on Tru64 have an effect? Not that I
> looked-up/read the ABI details..
I had a look at `Calling Standard for Alpha Systems', and the rules
seemed as expected and straight-forward.
> But I'd be curious what this does:
>
> #include something
> #include stddef.h
>
>
> int main()
> {
> typedef struct { char a; sem_t b; } t1;
> printf("%u %u\n", sizeof(t1), offsetof(t1, b));
> return 0;
> }
>
> 5 or 6 or 8 or other?
> and 1 or 2 or 4 or other?
> If the alignment is really only 2, then I'd expect 6 and 2.
This is what I get, with both cc and gcc.
Rainer