This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/12913] Jumps into variable length array scope not rejected


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]