[Bug ipa/81877] [7/8 Regression] Incorrect results with lto and -fipa-cp and -fipa-cp-clone
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 17 16:51:00 GMT 2017
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?..
More information about the Gcc-bugs
mailing list