This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/71532] [7 Regression] FAIL: gfortran.dg/select_char_1.f90 -O2 execution test
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2016 13:50:08 +0000
- Subject: [Bug rtl-optimization/71532] [7 Regression] FAIL: gfortran.dg/select_char_1.f90 -O2 execution test
- Auto-submitted: auto-generated
- References: <bug-71532-4 at http dot gcc dot gnu dot org/bugzilla/>
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.