[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2014-03-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #18 from Jason Merrill --- Author: jason Date: Sat Mar 1 18:44:25 2014 New Revision: 208246 URL: http://gcc.gnu.org/viewcvs?rev=208246&root=gcc&view=rev Log: PR c++/58845 * typeck.c (cp_build_binary_op): Sorry on vector&&vect

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2014-03-01 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #17 from Marc Glisse --- (In reply to Jason Merrill from comment #15) > (In reply to Richard Biener from comment #5) > > (v1 != { 0, 0, ... }) & (v2 != { 0, 0, ... }) > > FWIW this seems to be what clang does, without any kind of seq

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2014-03-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #16 from Jason Merrill --- Author: jason Date: Sat Mar 1 14:14:25 2014 New Revision: 208243 URL: http://gcc.gnu.org/viewcvs?rev=208243&root=gcc&view=rev Log: PR c++/58845 * typeck.c (cp_build_binary_op): Sorry on vector&&vect

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2014-03-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #15

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-12-01 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #14 from Marc Glisse --- Created attachment 31343 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31343&action=edit WIP Let me attach this here. save_expr+build_vector_from_val is unnecessary, the BIT_*_EXPR case would handle it.

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-24 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-24 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #12 from Marc Glisse --- (In reply to rguent...@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 importan

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Richard Biener changed: What|Removed |Added Priority|P3 |P2 Status|UNCONFIRMED

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Richard Biener changed: What|Removed |Added Target Milestone|--- |4.8.3

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #10 from Marc Glisse --- (In reply to rguent...@suse.de from comment #9) > Thus no short-circuiting for vector && or ||. Indeed. Though we already deviated from OpenCL for ?: and as mentioned in my patch we could do short-circuit for

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #9 from rguenther at suse dot de --- On Mon, 4 Nov 2013, glisse at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 > > --- Comment #8 from Marc Glisse --- > (In reply to Richard Biener from comment #5) > >

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #8 from Marc Glisse --- (In reply to Richard Biener from comment #5) > Well, what does OpenCL specify here? "The logical operators and (&&), or (||) operate on all scalar and vector built-in types. For scalar built-in types only, and

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #7 from rguenther at suse dot de --- On Mon, 4 Nov 2013, jakub at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 > > Jakub Jelinek changed: > >What|Removed |Added > --

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #6 f

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #5 from Richard Biener --- Well, what does OpenCL specify here? IIRC we've decided on -1 (all bits set) as true for vectors and 0 as false. I'd prefer to allow trivial lowering to | and & which IIRC are already supported. That means

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-01 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 --- Comment #4 from Volker Reichelt --- Btw, clang 3.2 accepts the first code snippet and rejects the second one. I.e. it accepts && and || for vectors and returns a vector of the same size. IMHO GCC should also go for this route. Not because of

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Paolo Carlini changed: What|Removed |Added CC||rguenther at suse dot de --- Comment #3 f

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-11-01 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Marc Glisse changed: What|Removed |Added Keywords|ice-on-valid-code, | |rejects-valid

[Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors

2013-10-22 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845 Volker Reichelt changed: What|Removed |Added Keywords||ice-on-invalid-code,