[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-14 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #30 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:eb1d8df792f990574cbb695b55c92ee2684fc96b commit r13-6621-geb1d8df792f990574cbb695b55c92ee2684fc96b Author: Roger Sayle Date: Sun

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #29 from Jakub Jelinek --- (In reply to Roger Sayle from comment #28) > The integer_all_onesp test is only equivalent to -1 when the TREE_TYPE (x) > is the same width or wider than type ... or the narrower type is signed.

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Roger Sayle changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #27 from Martin Liška --- Polished a bit more into: unsigned char f = 0; int main() { unsigned g = 0; unsigned *p1 = &g; unsigned char *p2 = &f; do { (*p1)++; (*p2)--; } while (f); __builtin_printf ("g=%u\n",

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #26 from Martin Liška --- Simplified to: unsigned char zero; int main() { unsigned g = 0; unsigned *p1 = &g; unsigned char *p2 = &zero; do { (*p1)++; (*p2)--; } while (zero); __builtin_printf ("g=%u\n", g);

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Martin Liška changed: What|Removed |Added Target Milestone|--- |13.0 Priority|P3

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Martin Liška changed: What|Removed |Added Keywords|needs-reduction | --- Comment #25 from Martin Liška ---

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #24 from David Binderman --- I tried experimenting with the flags that change -O1 into -O2 and got this: $ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w -ftrivial-auto-var-init=zero -O1 -fno-strict-aliasing bug892.c && (

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Martin Liška changed: What|Removed |Added CC||sayle at gcc dot gnu.org Sta

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-09 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 David Binderman changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALI

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #21 from Martin Liška --- (In reply to Jakub Jelinek from comment #20) > Well, cvise reduction of runtime testcases is always problematic, and trying > to ensure > the reduction doesn't introduce uninitialized var uses which weren't

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #18 from David Binderman --- Part way through reduction, the C code seems to be int crc32_tab_0; int crc32_context = 0xUL; void main(int , char []) { { int crc; int i; i = 0; for (; i < 256; i++) crc3

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #17 from David Binderman --- (In reply to Martin Liška from comment #16) > bash -x qwe.sh bug892.c That's a really useful tip. Thanks. I've debugged the script some more and now have: rm -f 1 2 one.exe two.exe /usr/bin/gcc -w -Werr

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #16 from Martin Liška --- (In reply to David Binderman from comment #15) > (In reply to Martin Liška from comment #14) > > > cvise is written in perl, isn't it ? You've got my cvise script. > > > > No, it's written in Python. > > O

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #15 from David Binderman --- (In reply to Martin Liška from comment #14) > > cvise is written in perl, isn't it ? You've got my cvise script. > > No, it's written in Python. Of course. How stupid of me. > So show me how you run cv

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #14 from Martin Liška --- (In reply to David Binderman from comment #13) > (In reply to Martin Liška from comment #12) > > > perl program converted to 0 is proving to be a challenge. > > > > perl? Please provide a complete script re

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #13 from David Binderman --- (In reply to Martin Liška from comment #12) > > perl program converted to 0 is proving to be a challenge. > > perl? Please provide a complete script reproducer. cvise is written in perl, isn't it ? You'

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #12 from Martin Liška --- > perl program converted to 0 is proving to be a challenge. perl? Please provide a complete script reproducer.

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #11 from David Binderman --- (In reply to Martin Liška from comment #10) > What about: > > /usr/bin/gcc -w -Werror=implicit bug892.c -o one.exe > && (./one.exe 1 | fgrep "checksum after hashing g_50 :" > 1) > && /home/d

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #10 from Martin Liška --- (In reply to David Binderman from comment #9) > (In reply to Martin Liška from comment #8) > > > but then if diff returns 1, the script should return 0 and > > > if diff returns 0, then the script should ret

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #9 from David Binderman --- (In reply to Martin Liška from comment #8) > > but then if diff returns 1, the script should return 0 and > > if diff returns 0, then the script should return 1. > > You can take an inspiration here: > ht

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #8 from Martin Liška --- (In reply to David Binderman from comment #7) > (In reply to David Binderman from comment #4) > > Created attachment 54596 [details] > > C source code > > > > After 3 hours further reduction. > > I am strug

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-08 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #7 from David Binderman --- (In reply to David Binderman from comment #4) > Created attachment 54596 [details] > C source code > > After 3 hours further reduction. I am struggling with further reduction. My bash knowledge is short.

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Both testcases I tested all exited with a non-zero value even at -O0 ... Ok, I missed you need to pass an argument to the program. Anyways I think this might be

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #5 from Andrew Pinski --- Both testcases I tested all exited with a non-zero value even at -O0 ...

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #4 from David Binderman --- Created attachment 54596 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54596&action=edit C source code After 3 hours further reduction.

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #3 from David Binderman --- 20220508 is good, so the range is 20220508 to 20220515. In git hash terms, that's g:a1947c92f7cda5f6cf7b8d8a9a44f6dd45352c03 to g:18547874ee205d830acb31f1e3c1c89fc7725c14. I will try to reduce the code

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #2 from David Binderman --- (In reply to David Binderman from comment #1) > I will try to bisect this one with snapshots. Trying 20220515 first. This one bad. Trying 20220508.

[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing

2023-03-06 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #1 from David Binderman --- I will try to bisect this one with snapshots. Trying 20220515 first.