public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing Date: Wed, 08 Mar 2023 13:43:03 +0000 [thread overview] Message-ID: <bug-109031-4-ABupbQh9gy@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109031-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031 --- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> --- (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 return 1. > > > > You can take an inspiration here: > > https://github.com/marxin/gcc-util/blob/master/bisect/reduce.sh > > Thanks for that. I am a bit further forward and I have this cvise > script: > > /usr/bin/gcc -w -Werror=implicit bug892.c -o one.exe > && (./one.exe 1 | fgrep "checksum after hashing g_50 :" > 1) > && /home/dcb36/gcc/results/bin/gcc -w -O2 -fno-strict-aliasing bug892.c > -o two.exe If the compilation fails for any reason, then the compound && expression is false (non-zero) and thus you end up with 'exit 0'. That's not what you want I guess. What about: /usr/bin/gcc -w -Werror=implicit bug892.c -o one.exe && (./one.exe 1 | fgrep "checksum after hashing g_50 :" > 1) && /home/dcb36/gcc/results/bin/gcc -w -O2 -fno-strict-aliasing bug892.c -o two.exe && (./two.exe 1 | fgrep "checksum after hashing g_50 :" > 2) if test $? != 0; then exit 1 diff 1 2; if test $? = 0; then exit 1 fi exit 0 ? > && (./two.exe 1 | fgrep "checksum after hashing g_50 :" > 2) > && diff 1 2; > if test $? = 0; then > exit 1 > fi > exit 0 > > It still doesn't work right and I can't fathom what's wrong. > It all works nicely when I do it line by line.
next prev parent reply other threads:[~2023-03-08 13:43 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-05 21:26 [Bug c/109031] New: " dcb314 at hotmail dot com 2023-03-06 15:05 ` [Bug middle-end/109031] " dcb314 at hotmail dot com 2023-03-06 16:03 ` dcb314 at hotmail dot com 2023-03-06 17:43 ` dcb314 at hotmail dot com 2023-03-06 20:33 ` dcb314 at hotmail dot com 2023-03-06 20:41 ` pinskia at gcc dot gnu.org 2023-03-07 0:10 ` pinskia at gcc dot gnu.org 2023-03-08 11:10 ` dcb314 at hotmail dot com 2023-03-08 12:06 ` marxin at gcc dot gnu.org 2023-03-08 13:39 ` dcb314 at hotmail dot com 2023-03-08 13:43 ` marxin at gcc dot gnu.org [this message] 2023-03-08 13:56 ` dcb314 at hotmail dot com 2023-03-08 14:01 ` marxin at gcc dot gnu.org 2023-03-08 14:08 ` dcb314 at hotmail dot com 2023-03-08 14:10 ` marxin at gcc dot gnu.org 2023-03-08 14:16 ` dcb314 at hotmail dot com 2023-03-08 14:24 ` marxin at gcc dot gnu.org 2023-03-08 16:45 ` dcb314 at hotmail dot com 2023-03-08 17:12 ` dcb314 at hotmail dot com 2023-03-09 8:44 ` marxin at gcc dot gnu.org 2023-03-09 8:48 ` jakub at gcc dot gnu.org 2023-03-09 8:59 ` marxin at gcc dot gnu.org 2023-03-09 9:25 ` dcb314 at hotmail dot com 2023-03-09 9:41 ` [Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9 marxin at gcc dot gnu.org 2023-03-09 9:45 ` dcb314 at hotmail dot com 2023-03-09 10:18 ` marxin at gcc dot gnu.org 2023-03-09 10:20 ` marxin at gcc dot gnu.org 2023-03-09 10:29 ` marxin at gcc dot gnu.org 2023-03-09 10:35 ` marxin at gcc dot gnu.org 2023-03-09 13:41 ` roger at nextmovesoftware dot com 2023-03-09 14:25 ` jakub at gcc dot gnu.org 2023-03-12 22:55 ` cvs-commit at gcc dot gnu.org 2023-03-14 7:33 ` roger at nextmovesoftware dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109031-4-ABupbQh9gy@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).