http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47255

Seth Robertson <in-gnu at baka dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22946|0                           |1
        is obsolete|                            |

--- Comment #5 from Seth Robertson <in-gnu at baka dot org> 2011-02-07 16:50:45 
UTC ---
Created attachment 23265
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23265
Correct version of revised test program exhibiting missed optimization

Hmm.  I somehow managed to not attach the correct second example, I must have
changed the program between the attach and submit steps or something.obsoleting
the incorrect test progam

But I as a developer have additional information not known to the compiler.  I
know that getgid and getuid are const FOR ME because I'm not going to be
running setuid and friends and those are not changible through external force
through standard APIs (unlike, say, current priority).  We have a way to
provide this sort of information to the compiler.  Why shouldn't the compiler
take advantage of the information I provide?

Reply via email to