public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/65502] New: pure-const should play well with clobbers.
@ 2015-03-21 10:47 hubicka at gcc dot gnu.org
  2015-03-22  9:54 ` [Bug ipa/65502] " hubicka at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-21 10:47 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-24  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21 10:47 [Bug ipa/65502] New: pure-const should play well with clobbers hubicka at gcc dot gnu.org
2015-03-22  9:54 ` [Bug ipa/65502] " hubicka at gcc dot gnu.org
2015-03-23  0:16 ` hubicka at gcc dot gnu.org
2015-03-23  9:57 ` rguenth at gcc dot gnu.org
2015-03-24  6:33 ` hubicka at ucw dot cz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).