[Bug c/59863] const array in function is placed on stack

2014-01-20 Thread sam at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59863 --- Comment #4 from Samuel Tardieu --- Note that clang has this bug "in reverse": it unifies the arrays even when recursive calls are possible and address escapes the defining function (http://llvm.org/bugs/show_bug.cgi?id=18557).

[Bug c/59863] New: const array in function is placed on stack

2014-01-17 Thread sam at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: sam at gcc dot gnu.org Created attachment 31875 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31875&action=edit Source file to reproduce the issue This source code int f(int i) { const int a[] = {1, 2, 3, 4}; ret