public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors
Date: Sun, 24 Nov 2013 15:39:00 -0000	[thread overview]
Message-ID: <bug-58845-4-rAh9LOYrJR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58845-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845

--- Comment #12 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #9)
> Yeah, exactly.  Still if there is a sequence point at && or ||
> (even if both arms are always executed) then the order of evaluating
> side-effects is important.  IIRC only AND/ORIF have an implicit
> sequence point during gimplification.

We have avoided generating TRUTH_*_EXPR for vectors (at your request IIRC), so
I don't think we should produce some in the front-end now, even if temporarily,
as they would leak into fold-const.c. It seems easiest to save_expr the lhs and
build a compound_expr(lhs,*) to enforce the evaluation of the lhs first, I
think that gets us a sequence point as well.


  parent reply	other threads:[~2013-11-24 15:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 12:49 [Bug c++/58845] New: " reichelt at gcc dot gnu.org
2013-10-22 12:58 ` [Bug c++/58845] [4.8/4.9 Regression] " reichelt at gcc dot gnu.org
2013-11-01 16:05 ` glisse at gcc dot gnu.org
2013-11-01 18:31 ` paolo.carlini at oracle dot com
2013-11-01 18:37 ` reichelt at gcc dot gnu.org
2013-11-04  9:38 ` rguenth at gcc dot gnu.org
2013-11-04  9:56 ` jakub at gcc dot gnu.org
2013-11-04 10:13 ` rguenther at suse dot de
2013-11-04 10:56 ` glisse at gcc dot gnu.org
2013-11-04 11:08 ` rguenther at suse dot de
2013-11-04 11:27 ` glisse at gcc dot gnu.org
2013-11-19  9:52 ` rguenth at gcc dot gnu.org
2013-11-19 10:26 ` rguenth at gcc dot gnu.org
2013-11-24 15:39 ` glisse at gcc dot gnu.org [this message]
2013-11-24 15:46 ` mpolacek at gcc dot gnu.org
2013-12-01 16:59 ` glisse at gcc dot gnu.org
2014-03-01 14:00 ` jason at gcc dot gnu.org
2014-03-01 14:15 ` jason at gcc dot gnu.org
2014-03-01 15:33 ` glisse at gcc dot gnu.org
2014-03-01 18:45 ` jason at gcc dot gnu.org
2014-03-01 18:46 ` [Bug c++/58845] " jason at gcc dot gnu.org
2014-03-12  5:14 ` pinskia at gcc dot gnu.org
2014-06-29  8:48 ` glisse at gcc dot gnu.org
2014-06-30 13:34 ` jason at gcc dot gnu.org
2014-10-03 19:57 ` glisse at gcc dot gnu.org
2014-10-03 20:10 ` glisse 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-58845-4-rAh9LOYrJR@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).