public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3
Date: Tue, 15 Oct 2013 13:38:00 -0000 [thread overview]
Message-ID: <bug-58143-4-5R6CqPm4zk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58143-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58143
--- Comment #27 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to rguenther@suse.de from comment #25)
> >
> > Why should a undefined value that is not used for anything
> > create such a problem?
>
> Because undefined behavior includes random effects (like
> formatting your hard drive). In this case the undefined
> behavior is simply assuming we never reach loop iteration #4
> and thus the loop exit test is never true.
>
> Richard.
I would have understood that in this example:
int x[5];
for (b = 4; b > -30; b--)
{
e = x[b];
for (; c;)
for (;;)
{
if (d)
break;
}
}
return 0;
bacause x[-1] may trap.
But e = 2147483647 - b;
is just guaranteed to write an undefined
value in e. We have -fno-trapv, or am I wrong?
next prev parent reply other threads:[~2013-10-15 13:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 0:05 [Bug middle-end/58143] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2013-08-13 0:08 ` [Bug middle-end/58143] " pinskia at gcc dot gnu.org
2013-08-13 0:24 ` su at cs dot ucdavis.edu
2013-08-14 21:11 ` mikpe at it dot uu.se
2013-08-20 0:21 ` bernd.edlinger at hotmail dot de
2013-08-20 0:59 ` bernd.edlinger at hotmail dot de
2013-08-20 22:25 ` bernd.edlinger at hotmail dot de
2013-08-21 8:53 ` bernd.edlinger at hotmail dot de
2013-08-21 17:41 ` [Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3 ebotcazou at gcc dot gnu.org
2013-08-21 18:02 ` jakub at gcc dot gnu.org
2013-08-21 21:50 ` bernd.edlinger at hotmail dot de
2013-08-23 9:15 ` bernd.edlinger at hotmail dot de
2013-08-23 9:16 ` jakub at gcc dot gnu.org
2013-08-23 12:08 ` bernd.edlinger at hotmail dot de
2013-08-23 12:59 ` jakub at gcc dot gnu.org
2013-08-25 22:08 ` bernd.edlinger at hotmail dot de
2013-08-28 21:30 ` bernd.edlinger at hotmail dot de
2013-10-15 8:15 ` rguenth at gcc dot gnu.org
2013-10-15 8:17 ` rguenth at gcc dot gnu.org
2013-10-15 8:39 ` bernd.edlinger at hotmail dot de
2013-10-15 9:05 ` rguenth at gcc dot gnu.org
2013-10-15 9:41 ` rguenth at gcc dot gnu.org
2013-10-15 11:03 ` rguenth at gcc dot gnu.org
2013-10-15 11:45 ` bernd.edlinger at hotmail dot de
2013-10-15 11:54 ` rguenther at suse dot de
2013-10-15 11:54 ` rguenth at gcc dot gnu.org
2013-10-15 13:21 ` bernd.edlinger at hotmail dot de
2013-10-15 13:27 ` rguenther at suse dot de
2013-10-15 13:36 ` mikpelinux at gmail dot com
2013-10-15 13:38 ` bernd.edlinger at hotmail dot de [this message]
2013-10-15 13:40 ` rguenther at suse dot de
2013-10-16 9:51 ` jakub at gcc dot gnu.org
2013-10-17 9:59 ` rguenth at gcc dot gnu.org
2013-10-17 10:08 ` [Bug tree-optimization/58143] [4.8 " rguenth at gcc dot gnu.org
2013-11-18 15:14 ` rguenth at gcc dot gnu.org
2013-11-18 15:15 ` rguenth at gcc dot gnu.org
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-58143-4-5R6CqPm4zk@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).