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/59863] const array in function is placed on stack


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59863

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is caused by checking TREE_ADDRESSABLE on the a decl which is correct
thing to do but the issue is there is no addressing taking in the code (only an
implicit one with a[i]:
      /* An array that is indexed by a non-constant
     cannot be stored in a register; we must be able to do
     address arithmetic on its address.
     Likewise an array of elements of variable size.  */


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