[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-26 Thread sqrammi at hotmail dot com
--- Comment #12 from sqrammi at hotmail dot com 2007-01-26 21:10 --- This was confirmed to be a problem with alignment fixup in the kernel. Do an 'echo 2 > /proc/cpu/alignment' and misaligned accesses are fixed up, and this problem goes away. Misaligned accesses should IMHO not be comp

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #11 from sqrammi at hotmail dot com 2007-01-25 18:01 --- Thinking about it some more, this actually may be a bug in my Linux kernel configuration that fixes up unaligned accesses. It's probably trying to fix up for a big-endian system on my little-endian system. -- http

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #10 from sqrammi at hotmail dot com 2007-01-25 17:55 --- Great. That's perfect. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #8 from sqrammi at hotmail dot com 2007-01-25 17:45 --- It would be easy to add support to the compiler to at least warn about char arrays of non-CPU-word-size length being placed on the stack, right? It wouldn't even have to be a warning that shows up unless -Wall (or it's

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread schwab at suse dot de
--- Comment #9 from schwab at suse dot de 2007-01-25 17:47 --- Use -Wcast-align. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread rearnsha at gcc dot gnu dot org
--- Comment #7 from rearnsha at gcc dot gnu dot org 2007-01-25 17:35 --- (In reply to comment #6) > The problem is that the compiler is not either > 1) automatically aligning the > buffer so that the program actually works or It doesn't have to, because the user hasn't asked it to (a

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #6 from sqrammi at hotmail dot com 2007-01-25 17:28 --- The problem is that the compiler is not either 1) automatically aligning the buffer so that the program actually works or 2) warning the user that their code is retarded and needs to be modified so that all the stacks fi

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread rearnsha at gcc dot gnu dot org
--- Comment #5 from rearnsha at gcc dot gnu dot org 2007-01-25 17:25 --- --> volatile char buf[512] /*__attribute__ ((aligned (4)))*/; WHat makes you think this buffer will be word-aligned? One of your sub-routines creates a variable with 33 bytes, and when inlining happens there's no

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #4 from sqrammi at hotmail dot com 2007-01-25 17:12 --- Created an attachment (id=12956) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12956&action=view) Modified code - no warnings -- sqrammi at hotmail dot com changed: What|Removed

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-25 Thread sqrammi at hotmail dot com
--- Comment #3 from sqrammi at hotmail dot com 2007-01-25 17:11 --- I've modified the source so that there are no warnings and (hopefully) no aliasing violations. The problem still occurs. Here is my line that I use to compile: arm-926ejs-linux-gnu-gcc -Wall -O2 -fno-strict-aliasing g

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-24 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-01-24 23:48 --- First you are violating C aliasing rules here: u8 d[33] = {0}, *e = (u8 *)d; *((unsigned int *)a) = strlen(e); And a couple other places. What options are you running this program wit

[Bug c/30581] Deeply inlined static functions break stack creation

2007-01-24 Thread sqrammi at hotmail dot com
--- Comment #1 from sqrammi at hotmail dot com 2007-01-24 23:44 --- Created an attachment (id=12953) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12953&action=view) Source file to produce this bug -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581