https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #11 from CVS Commits ---
The master branch has been updated by Jan Hubicka :
https://gcc.gnu.org/g:7b6ca93b2d57ead352cd5cc3e10be4c33dda674b
commit r11-7895-g7b6ca93b2d57ead352cd5cc3e10be4c33dda674b
Author: Jan Hubicka
Date: Mon M
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
Jan Hubicka changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #9 from Jan Hubicka ---
OK, so actually there is logic to handle return values (even for consts) but it
has wrong if. I am testing the attached fix.
diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index 7aaf53be8f4..5f33bb5b410 100
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #8 from Jan Hubicka ---
So we wrongly identify nodirectescape in store_to_c this is due to early exit
in analyze_call that does not account for const call possibly returning its
parameter. (An early confusion in EAF tracking logic bef
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
Jan Hubicka changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #6 from Martin Liška ---
Maybe a nicer names:
$ cat pr99751.c
int *ptr1 = 0, **ptr2 = &ptr1;
int *identity(int *p)
{
return p;
}
void store_to_c(int *p)
{
*ptr2 = identity(p);
}
int main()
{
int f;
store_to_c(&f);
if (pt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #5 from Richard Biener ---
parm 0 flags: nodirectescape
void e (int * d)
{
int * * c.0_1;
int * _2;
:
c.0_1 = c;
_2 = b (d_4(D));
*c.0_1 = _2;
return;
is wrong, it does escape through the *c store. I suppose b (d)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
--- Comment #4 from Jakub Jelinek ---
Started with r11-5391-gbb07490abba850fd5b1d2d09d76d18b8bdc7d817
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99751
Richard Biener changed:
What|Removed |Added
Component|tree-optimization |ipa
Priority|P3