public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107011] New: instruction with undefined behavior not optimized away
@ 2022-09-22 20:01 hiraditya at msn dot com
  2022-09-22 20:04 ` [Bug tree-optimization/107011] " pinskia at gcc dot gnu.org
  2022-09-22 23:04 ` hiraditya at msn dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hiraditya at msn dot com @ 2022-09-22 20:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107011

            Bug ID: 107011
           Summary: instruction with undefined behavior not optimized away
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hiraditya at msn dot com
  Target Milestone: ---

#include<limits.h>

int main() {
    return INT_MIN / -1;
}


$ gcc -O3

main:
        mov     eax, -2147483648
        ret


$ clang -O3

main:                                   # @main
        ret


https://godbolt.org/z/393EMqs1E

PS: I reported this bug yesterday as well but for some reason it does not
appear in bugzilla so I'm creating another one.

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

end of thread, other threads:[~2022-09-22 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 20:01 [Bug tree-optimization/107011] New: instruction with undefined behavior not optimized away hiraditya at msn dot com
2022-09-22 20:04 ` [Bug tree-optimization/107011] " pinskia at gcc dot gnu.org
2022-09-22 23:04 ` hiraditya at msn dot com

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).