public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66555] New: Fails to warn for if (j == 0 && i == i)
@ 2015-06-16 13:25 rguenth at gcc dot gnu.org
  2015-06-16 14:00 ` [Bug c++/66555] " manu at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-16 13:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66555

            Bug ID: 66555
           Summary: Fails to warn for if (j == 0 && i == i)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Just fixed a bug in the vectorizer with

@@ -5359,7 +5373,7 @@ vectorizable_store (gimple stmt, gimple_
              vect_finish_stmt_generation (stmt, incr, gsi);

              running_off = newoff;
-             if (j == 0 && i == i)
+             if (j == 0 && i == 0)
                STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = assign;
              else
                STMT_VINFO_RELATED_STMT (prev_stmt_info) = assign;

and I wonder why we don't warn about this (well, I know, we only warn
if the whole if expr folds to a constant).

Applies to the C frontend as well.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/66555] Fails to warn for if (j == 0 && i == i)
  2015-06-16 13:25 [Bug c++/66555] New: Fails to warn for if (j == 0 && i == i) rguenth at gcc dot gnu.org
@ 2015-06-16 14:00 ` manu at gcc dot gnu.org
  2015-07-27 12:55 ` mpolacek at gcc dot gnu.org
  2023-05-20  4:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-16 14:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66555

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-16
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Clang says:

warning: self-comparison always evaluates to true [-Wtautological-compare]
>From gcc-bugs-return-489091-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 16 14:26:32 2015
Return-Path: <gcc-bugs-return-489091-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 113242 invoked by alias); 16 Jun 2015 14:26:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 113174 invoked by uid 55); 16 Jun 2015 14:26:27 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/66251] [6 Regression] ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1484
Date: Tue, 16 Jun 2015 14:26:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: matz at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66251-4-qxxYIm55Qe@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66251-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66251-4@http.gcc.gnu.org/bugzilla/>
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: 2015-06/txt/msg01423.txt.bz2
Content-length: 923

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf251

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Jun 16 14:25:55 2015
New Revision: 224520

URL: https://gcc.gnu.org/viewcvs?rev"4520&root=gcc&view=rev
Log:
2015-06-16  Richard Biener  <rguenther@suse.de>

        Revert
        2015-06-01  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2015-05-26  Michael Matz  <matz@suse.de>

        PR middle-end/66251
        * tree-vect-stmts.c (vect_create_vectorized_demotion_stmts): Always set
        STMT_VINFO_VEC_STMT, also with SLP.

        2015-05-22  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66251
        * tree-vect-stmts.c (vectorizable_conversion): Properly
        set STMT_VINFO_VEC_STMT even for the SLP case.

Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/tree-vect-stmts.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/66555] Fails to warn for if (j == 0 && i == i)
  2015-06-16 13:25 [Bug c++/66555] New: Fails to warn for if (j == 0 && i == i) rguenth at gcc dot gnu.org
  2015-06-16 14:00 ` [Bug c++/66555] " manu at gcc dot gnu.org
@ 2015-07-27 12:55 ` mpolacek at gcc dot gnu.org
  2023-05-20  4:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-07-27 12:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66555

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Done for GCC 6.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/66555] Fails to warn for if (j == 0 && i == i)
  2015-06-16 13:25 [Bug c++/66555] New: Fails to warn for if (j == 0 && i == i) rguenth at gcc dot gnu.org
  2015-06-16 14:00 ` [Bug c++/66555] " manu at gcc dot gnu.org
  2015-07-27 12:55 ` mpolacek at gcc dot gnu.org
@ 2023-05-20  4:14 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-20  4:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66555

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trt at alumni dot duke.edu

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 17534 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-20  4:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 13:25 [Bug c++/66555] New: Fails to warn for if (j == 0 && i == i) rguenth at gcc dot gnu.org
2015-06-16 14:00 ` [Bug c++/66555] " manu at gcc dot gnu.org
2015-07-27 12:55 ` mpolacek at gcc dot gnu.org
2023-05-20  4:14 ` pinskia at gcc dot gnu.org

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).