This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/81877] [7/8 Regression] Incorrect results with lto and -fipa-cp and -fipa-cp-clone
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Aug 2017 14:55:48 +0000
- Subject: [Bug ipa/81877] [7/8 Regression] Incorrect results with lto and -fipa-cp and -fipa-cp-clone
- Auto-submitted: auto-generated
- References: <bug-81877-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81877
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Small C testcase demonstrating the issue with -O2 -fno-tree-sra:
void g(int *out)
{
struct s {int x;} s;
#pragma GCC ivdep
for (int i = 0; i < 100; i++)
{
int *x = &s.x;
asm("" : "+r"(x));
*x = 42;
out[i] = s.x;
}
}
I think the main question is how safelen introduced via pragma-ivdep or
do-concurrent is supposed to interact with addressable vars written in the loop
body? It doesn't seem well-defined?..