> ...ok, now i don't know what to think of it. The described behaviour was > observed on a Fedora Core 4 system (gcc 4, IIRC) - and right now i tried it > on a different linux system, with gcc 3.4 installed - and it works fine there > as well, with [9] set. Any idea what's causing this?
The compiler in OpenBSD will reorder local variables. In your case, ``type'' is below ``perms'' (unlike the Linux compiler), and due to alignment, you can be lucky enough to overflow perms a bit without this causing problems. Miod