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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org,
                   |                            |rsandifo at gcc dot gnu.org
   Last reconfirmed|                            |2020-07-27
            Summary|Incorrect loop optimization |[10/11 Regression]
                   |at -O3                      |Incorrect loop optimization
                   |                            |at -O3 since
                   |                            |r10-4803-g8489e1f45b50600c
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-4803-g8489e1f45b50600c. I see:

$ gcc pr96326.c -fsanitize=undefined && ./a.out 
pr96326.c:11:23: runtime error: store to misaligned address 0x7fffffffe263 for
type 'long unsigned int', which requires 8 byte alignment
0x7fffffffe263: note: pointer points here
 00  61 62 63 00 00 00 00 00  e0 69 61 f7 ff 7f 00 00  29 00 00 00 00 00 00 00 
88 ff ff ff ff ff ff
              ^ 
pr96326.c:16:23: runtime error: store to misaligned address 0x7fffffffe26c for
type 'long unsigned int', which requires 8 byte alignment
0x7fffffffe26c: note: pointer points here
  63 61 62 63 00 00 00 00  29 00 00 00 00 00 00 00  88 ff ff ff ff ff ff ff  40
6a 61 f7 ff 7f 00 00
              ^ 
68


and ASAN returns a different value:

$ gcc pr96326.c -fsanitize=address && ./a.out 
70

Same for clang:

$ clang pr96326.c -fsanitize=address && ./a.out 
70

So I bet the test-case must be invalid?

Reply via email to