public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc at breakpoint dot cc" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64294] invalid code, zero check gets optimized away
Date: Fri, 12 Dec 2014 22:54:00 -0000 [thread overview]
Message-ID: <bug-64294-4-CLbf7vmP28@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64294-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #2 from Sebastian Andrzej Siewior <gcc at breakpoint dot cc> ---
It seems exit(0) is dropped with -O1 -ftree-vrp.
(In reply to Andreas Schwab from comment #1)
> This condition is true if backsize == 0:
Ehm, yes. The Code is:
--
printf("bufsz: %u backsize: %d\n", bufsz, backsize);
if(!CLI_ISCONTAINED(buf, bufsz, ddst, backsize) || !CLI_ISCONTAINED(buf, bufsz,
ddst+backbytes, back size)) {
free(usects);
return 1;
}
asm volatile("labele:");
--
So I would expect that it leaves the function but I see a segfault in the while
loop later on and according the printf, backsize was 0.
next prev parent reply other threads:[~2014-12-12 22:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 22:25 [Bug rtl-optimization/64294] New: " gcc at breakpoint dot cc
2014-12-12 22:43 ` [Bug rtl-optimization/64294] " schwab@linux-m68k.org
2014-12-12 22:54 ` gcc at breakpoint dot cc [this message]
2014-12-13 20:58 ` gcc at breakpoint dot cc
2014-12-13 20:59 ` gcc at breakpoint dot cc
2014-12-13 21:12 ` gcc at breakpoint dot cc
2014-12-20 11:53 ` mikpelinux at gmail dot com
2014-12-20 14:30 ` gcc at breakpoint dot cc
2014-12-20 14:35 ` gcc at breakpoint dot cc
2014-12-20 15:24 ` mikpelinux at gmail dot com
2014-12-20 21:21 ` gcc at breakpoint dot cc
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-64294-4-CLbf7vmP28@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: link
Be 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).