[Bug ipa/65502] New: pure-const should play well with clobbers.
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 21 10:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65502
Bug ID: 65502
Summary: pure-const should play well with clobbers.
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: hubicka at gcc dot gnu.org
I just noticed that C++ destructors are not conisdered const/pure:
local analysis of Smarts::IterateScheduler<Smarts::Stub>::~IterateScheduler()
scanning: MEM[(struct &)this_2(D)] ={v} {CLOBBER};
Indirect ref write is not const/pure
scanning: return;
Smarts::IterateScheduler<Smarts::Stub>::~IterateScheduler() (struct
IterateScheduler * const this)
{
<bb 2>:
MEM[(struct &)this_2(D)] ={v} {CLOBBER};
return;
}
This is of course wrong, empty function is const. One issue however is that we
want to preserve CLOBBER when inlining, so during early passes we may want to
keep clobbers nonpure.
More information about the Gcc-bugs
mailing list