L.S. Was instructed (on irc.oftc.net:#gcc) to file a bug report. It seems gcc silently ignores __attribute__((aligned(N))) on stack variables (even with -mpreferred-stack-boundary=K, K >= 2logN). My own test is with: compiler: Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs Configured with: ../gcc-3.2.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux Thread model: posix gcc version 3.2.3 commandline: gcc -W -Wall -o example example.c or gcc -W -Wall -mpreferred-stack-boundary=12 -o example example.c compiler output: none program output (showing the alignment didn't work): read: Invalid argument Works fine with the buffer in .bbs/.data. I can sort of imagine there might be good reasons for not allowing alignment on auto vars, but in that case, I guess a warning could be in order. Also confirmed with current mainline on PPC by someone in the irc.oftc.net:#gcc Preprocessed testcase attached. Testcase assumes linux kernel v2.6, on 2.4 alignment for O_DIRECT needs to be to multiple of blocksize of underlying filesystem. Hope this is useful. Rene.