[Bug target/92841] Optimize -fstack-protector-strong code generation a bit

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 9 16:40:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92841

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-12-09
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase that reproduces this with -O2 -fstack-protector-strong on
x86_64-linux -m64:
const struct S { int b; } c[] = {30, 12, 20, 0, 11};
void bar (int *);

void
foo (void)
{
  int e[4];
  const struct S *a;
  for (a = c; a < c + sizeof (c); a++)
    if (a->b)
      bar (e);
}


More information about the Gcc-bugs mailing list