public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-25 11:22 ` manu at gcc dot gnu.org
  2010-11-25 11:31 ` manu at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu.org @ 2010-11-25 11:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schuh.robert at gmail dot
                   |                            |com

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-11-25 11:16:44 UTC ---
*** Bug 46657 has been marked as a duplicate of this bug. ***


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
  2010-11-25 11:22 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3 manu at gcc dot gnu.org
@ 2010-11-25 11:31 ` manu at gcc dot gnu.org
  2010-11-25 11:53 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu.org @ 2010-11-25 11:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-11-25 11:22:59 UTC ---
*** Bug 46657 has been marked as a duplicate of this bug. ***


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
  2010-11-25 11:22 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3 manu at gcc dot gnu.org
  2010-11-25 11:31 ` manu at gcc dot gnu.org
@ 2010-11-25 11:53 ` redi at gcc dot gnu.org
  2015-07-24 21:53 ` [Bug middle-end/35587] " manu at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2010-11-25 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-25 11:42:54 UTC ---
*** Bug 46657 has been marked as a duplicate of this bug. ***


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

* [Bug middle-end/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-11-25 11:53 ` redi at gcc dot gnu.org
@ 2015-07-24 21:53 ` manu at gcc dot gnu.org
  2020-03-23 19:09 ` msebor at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu.org @ 2015-07-24 21:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xinliangli at gmail dot com

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 52954 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-493284-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 24 21:53:46 2015
Return-Path: <gcc-bugs-return-493284-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 77703 invoked by alias); 24 Jul 2015 21:53:46 -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 77589 invoked by uid 48); 24 Jul 2015 21:53:42 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/52954] Missing bounds check warning without optimization
Date: Fri, 24 Jul 2015 21:53: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.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: DUPLICATE
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-52954-4-6puibzwKls@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52954-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52954-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg02174.txt.bz2
Content-length: 240

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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Ops, wrong PR. Try again: Duplicate.

*** This bug has been marked as a duplicate of bug 35587 ***
>From gcc-bugs-return-493286-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jul 24 22:14:49 2015
Return-Path: <gcc-bugs-return-493286-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 120177 invoked by alias); 24 Jul 2015 22:14:49 -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 120139 invoked by uid 48); 24 Jul 2015 22:14:43 -0000
From: "daniel.f.starke at freenet dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65995] LTO: ICE in add_symbol_to_partition_1 for debug build
Date: Fri, 24 Jul 2015 22:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords: lto
X-Bugzilla-Severity: normal
X-Bugzilla-Who: daniel.f.starke at freenet dot de
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_known_to_fail
Message-ID: <bug-65995-4-B0Io8WnFpo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65995-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65995-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-07/txt/msg02176.txt.bz2
Content-length: 414

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

Daniel Starke <daniel.f.starke at freenet dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |5.2.0

--- Comment #5 from Daniel Starke <daniel.f.starke at freenet dot de> ---
The bug is still present in GCC 5.2.0.


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

* [Bug middle-end/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-07-24 21:53 ` [Bug middle-end/35587] " manu at gcc dot gnu.org
@ 2020-03-23 19:09 ` msebor at gcc dot gnu.org
  2020-06-01 17:14 ` msebor at gcc dot gnu.org
  2021-09-15 20:16 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 12+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-03-23 19:09 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2008-03-17 14:05:57         |2020-3-23
      Known to fail|                            |10.0, 4.3.5, 4.4.7, 4.8.5,
                   |                            |4.9.4, 5.4.0, 6.4.0, 7.3.0,
                   |                            |8.3.0, 9.1.0

--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
Reconfirmed with GCC 10.

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

* [Bug middle-end/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-03-23 19:09 ` msebor at gcc dot gnu.org
@ 2020-06-01 17:14 ` msebor at gcc dot gnu.org
  2021-09-15 20:16 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 12+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-06-01 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |haoxintu at gmail dot com

--- Comment #13 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 95461 has been marked as a duplicate of this bug. ***

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

* [Bug middle-end/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
       [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-06-01 17:14 ` msebor at gcc dot gnu.org
@ 2021-09-15 20:16 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 12+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-09-15 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fredrik.hederstierna@securi
                   |                            |tas-direct.com

--- Comment #14 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 102346 has been marked as a duplicate of this bug. ***

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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
  2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
                   ` (3 preceding siblings ...)
  2008-03-17 14:06 ` rguenth at gcc dot gnu dot org
@ 2008-05-03  9:44 ` nikos42 at gmail dot com
  4 siblings, 0 replies; 12+ messages in thread
From: nikos42 at gmail dot com @ 2008-05-03  9:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from nikos42 at gmail dot com  2008-05-03 09:43 -------
Confirmed with gcc 4.3.1. Complete version info:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.1 20080401 (prerelease) (Debian 4.3.0-3) 

Regards,
Nicolas


-- 

nikos42 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nikos42 at gmail dot com


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


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
  2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
                   ` (2 preceding siblings ...)
  2008-03-17 13:16 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works " karsten_burger at gmx dot de
@ 2008-03-17 14:06 ` rguenth at gcc dot gnu dot org
  2008-05-03  9:44 ` nikos42 at gmail dot com
  4 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-17 14:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-03-17 14:05 -------
Hm, with gcc 4.2 I get

gcc-4.2 -c t.c -O2 -Wall
t.c: In function 'main':
t.c:5: warning: array subscript is below array bounds
t.c:7: warning: array subscript is above array bounds
t.c:8: warning: array subscript is above array bounds
t.c:9: warning: array subscript is above array bounds

(the warning in line 11 is missing as the constant is
propagated and the load from a[15] CSEd - this is a very hard
to fix implementation limit.  You'd fix the case in line 9
and then the issue in line 11 would pop up.)

with 4.3 I indeed see

gcc-4.3 -c t.c -O2 -Wall

(nothing)

because all invalid stores are deleted from the code and the only
used value (a[15]) is propagated from the store a[15] = 0 and thus
replaced by the constant 0.  Again a hard to fix implementation
issue - after all these invalid stores/loads invoke undefined
behavior which is why we just "optimized" them.

IMHO for these very simple cases the frontend should already warn
(even at -O0 and -O1) and not rely on the code surviving until VRP.
(The issue is that we in this way would also warn in dead code regions,
which may be a problem on its own).

Note this is not accepts-invalid as it is only undefined at runtime.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mueller at gcc dot gnu dot
                   |                            |org, rguenth at gcc dot gnu
                   |                            |dot org
           Severity|major                       |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|accepts-invalid             |
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-17 14:05:57
               date|                            |


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


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3
  2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
  2008-03-14 17:08 ` [Bug c/35587] " karsten_burger at gmx dot de
  2008-03-14 17:09 ` karsten_burger at gmx dot de
@ 2008-03-17 13:16 ` karsten_burger at gmx dot de
  2008-03-17 14:06 ` rguenth at gcc dot gnu dot org
  2008-05-03  9:44 ` nikos42 at gmail dot com
  4 siblings, 0 replies; 12+ messages in thread
From: karsten_burger at gmx dot de @ 2008-03-17 13:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

karsten_burger at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major


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


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and works only with -O2 or -O3
  2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
  2008-03-14 17:08 ` [Bug c/35587] " karsten_burger at gmx dot de
@ 2008-03-14 17:09 ` karsten_burger at gmx dot de
  2008-03-17 13:16 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works " karsten_burger at gmx dot de
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: karsten_burger at gmx dot de @ 2008-03-14 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from karsten_burger at gmx dot de  2008-03-14 17:08 -------
Created an attachment (id=15322)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15322&action=view)
assembler output using gcc option -save-temps


-- 


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


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

* [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and works only with -O2 or -O3
  2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
@ 2008-03-14 17:08 ` karsten_burger at gmx dot de
  2008-03-14 17:09 ` karsten_burger at gmx dot de
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: karsten_burger at gmx dot de @ 2008-03-14 17:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from karsten_burger at gmx dot de  2008-03-14 17:07 -------
Created an attachment (id=15321)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15321&action=view)
version which does not create any warning


-- 


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


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

end of thread, other threads:[~2021-09-15 20:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-35587-4@http.gcc.gnu.org/bugzilla/>
2010-11-25 11:22 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works only with -O2 or -O3 manu at gcc dot gnu.org
2010-11-25 11:31 ` manu at gcc dot gnu.org
2010-11-25 11:53 ` redi at gcc dot gnu.org
2015-07-24 21:53 ` [Bug middle-end/35587] " manu at gcc dot gnu.org
2020-03-23 19:09 ` msebor at gcc dot gnu.org
2020-06-01 17:14 ` msebor at gcc dot gnu.org
2021-09-15 20:16 ` msebor at gcc dot gnu.org
2008-03-14 17:05 [Bug c/35587] New: -Warray-bounds does not work at all or does not find all trivial cases, and works " karsten_burger at gmx dot de
2008-03-14 17:08 ` [Bug c/35587] " karsten_burger at gmx dot de
2008-03-14 17:09 ` karsten_burger at gmx dot de
2008-03-17 13:16 ` [Bug c/35587] -Warray-bounds does not work at all or does not find all trivial cases, and :works " karsten_burger at gmx dot de
2008-03-17 14:06 ` rguenth at gcc dot gnu dot org
2008-05-03  9:44 ` nikos42 at gmail dot com

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