public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101254] New: gcc head does not comply fully to -fwrapv
@ 2021-06-29  9:19 bugzilla.gnu at coelho dot net
  2021-06-29  9:34 ` [Bug tree-optimization/101254] [12 Regression] gcc head does not comply fully to -fwrapv since r12-1723 jakub at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: bugzilla.gnu at coelho dot net @ 2021-06-29  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101254
           Summary: gcc head does not comply fully to -fwrapv
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugzilla.gnu at coelho dot net
  Target Milestone: ---

Created attachment 51079
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51079&action=edit
source file for above test

-fwrapv does not work as expected on gcc head:

Previous expected behavior :

  sh> gcc --version
  gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

  sh> gcc -O2 -fwrapv gcc_overflow.c 
  sh> ./a.out 
  1: 1
  0: 0
  0: 0

Behavior with head:

  sh> gcc --version
  gcc (GCC) 12.0.0 20210627 (461f937b)

  sh> gcc -O2 -fwrapv gcc_overflow.c 
  sh> ./a.out
  1: 1
  0: 0
  0: 1

But with the same :

  sh> gcc -O1 -fwrapv gcc_overflow.c 
  sh> ./a.out
  1: 1
  0: 0
  0: 0

Not that it seems that it was working fine with bc046a60 on 2021-06-18, so the
regression may have been introduced after this date.

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

end of thread, other threads:[~2021-06-29 19:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29  9:19 [Bug c/101254] New: gcc head does not comply fully to -fwrapv bugzilla.gnu at coelho dot net
2021-06-29  9:34 ` [Bug tree-optimization/101254] [12 Regression] gcc head does not comply fully to -fwrapv since r12-1723 jakub at gcc dot gnu.org
2021-06-29 12:07 ` rguenth at gcc dot gnu.org
2021-06-29 15:09 ` amacleod at redhat dot com
2021-06-29 15:21 ` jakub at gcc dot gnu.org
2021-06-29 15:25 ` jakub at gcc dot gnu.org
2021-06-29 15:42 ` amacleod at redhat dot com
2021-06-29 15:47 ` jakub at gcc dot gnu.org
2021-06-29 15:48 ` jakub at gcc dot gnu.org
2021-06-29 15:55 ` amacleod at redhat dot com
2021-06-29 17:11 ` amacleod at redhat dot com
2021-06-29 17:38 ` jakub at gcc dot gnu.org
2021-06-29 18:27 ` amacleod at redhat dot com
2021-06-29 19:09 ` cvs-commit at gcc dot gnu.org
2021-06-29 19:10 ` amacleod at redhat 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).