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 rtl-optimization/71532] [7 Regression] FAIL: gfortran.dg/select_char_1.f90 -O2 execution test


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.

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