This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12913] Jumps into variable length array scope not rejected
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2004 01:43:34 -0000
- Subject: [Bug c/12913] Jumps into variable length array scope not rejected
- References: <20031105172327.12913.falk@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-07 01:43 -------
It is even worse (at least as I can see) on the tree-ssa because it will produce the
following code:
int a[l.1 * 4];
void * saved_stack.3;
long unsigned int T.2;
long unsigned int l.1;
int l.0;
<bb 0>:
switch (l)
{
case 1: goto <L0>;
default : goto <L1>;
}
<L0>:;
l.0 = 1;
l.1 = (long unsigned int)l.0;
T.2 = l.1 * 4;
__builtin_stack_alloc (&a, T.2);
<L1>:;
__builtin_stack_restore (saved_stack.3);
return;
so it will try do restore even though it did not save anything.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-03-07 01:43:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12913