[Bug rtl-optimization/71532] [7 Regression] FAIL: gfortran.dg/select_char_1.f90 -O2 execution test

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 15 13:50:00 GMT 2016


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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simpler testcase:
int foo (int, int, int, int, int, int, int, int, int, int)
__attribute__((pure));
int bar (int, int, int, int, int, int, int, int, int, int)
__attribute__((pure));

int
test (void)
{
  int a = foo (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  a += bar (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  return a;
}

The question is if const/pure function can clobber the argument slots in which
the arguments are passed to it.
CSE doesn't invalidate those, so with -O2 -march=corei7 -mtune=slm we get all
the arguments written to the stack just once, not twice.


More information about the Gcc-bugs mailing list