This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/44613] Declaring an array with non-constant length inside a switch corrupts stack pointer.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2010 11:16:16 -0000
- Subject: [Bug middle-end/44613] Declaring an array with non-constant length inside a switch corrupts stack pointer.
- References: <bug-44613-19353@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-06-22 11:16 -------
gimplification is bogus:
switch (1) <default: <D.2122>, case 1: <D.2096>>
{
char x[0:D.2106] [value-expr: *x.0];
saved_stack.1 = __builtin_stack_save ();
try
{
<D.2096>:
...
}
finally
{
__builtin_stack_restore (saved_stack.1);
}
but pre-tree-ssa we didn't get it right either.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
Keywords| |wrong-code
Known to fail| |3.4.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44613