From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20027 invoked by alias); 1 Mar 2014 15:33:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19988 invoked by uid 48); 1 Mar 2014 15:33:02 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58845] [4.8/4.9 Regression] Operator || and && broken for vectors Date: Sat, 01 Mar 2014 15:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg00024.txt.bz2 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 sequence point. Yes, and that's what OpenCL says, but since we have already started diverging... > I suppose figuring out what semantics we want is the important part. Well, I am ok with the semantics of my patch (explained in comment #14) ;-) (I would probably be ok with other versions as well though) For the implementation, I have a slight preference for the #if 1 version in the patch, but I am not sure if it is better (3 lines are unnecessary in the #else version, so they both have the same size). Also, some error messages could be surprising (talk about '==' when the program uses '!'), but that's not the only place in the compiler where it happens. > I'm going to go ahead and fix the ICE to get the regression out of the way. Thanks!