public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63445] [5 Regression] request: make -Wstrict-overflow avoid a class of false positives
Date: Tue, 07 Oct 2014 14:01:00 -0000	[thread overview]
Message-ID: <bug-63445-4-AIjyRyv9lD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63445-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 7 Oct 2014, manu at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63445
> 
> --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
> > i_15 could be negative and thus j_9 - i_15 could well overflow the input
> > range at the +INF side.  (i_15 is [-INF, j_5(D) + -1])
> 
> Actually, this is a very good point. There is indeed a potential integer
> overflow in the original code. Thus, the warning seems valid.
> 
> Perhaps the warning message could say that the problem is that "j - i" can
> overflow if i is negative.

Sure - but we warn about the comparison against zero which doesn't
behave differently if overflow wraps or is undefined.
>From gcc-bugs-return-463448-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 07 14:09:47 2014
Return-Path: <gcc-bugs-return-463448-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24881 invoked by alias); 7 Oct 2014 14:09:47 -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 24841 invoked by uid 48); 7 Oct 2014 14:09:43 -0000
From: "mliska at suse dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/63470] New: [5 Regression] lto1: internal compiler error: in estimate_edge_growth, at ipa-inline.h:308
Date: Tue, 07 Oct 2014 14:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mliska at suse dot cz
X-Bugzilla-Status: UNCONFIRMED
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc
Message-ID: <bug-63470-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: 2014-10/txt/msg00469.txt.bz2
Content-length: 3075

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

            Bug ID: 63470
           Summary: [5 Regression] lto1: internal compiler error: in
                    estimate_edge_growth, at ipa-inline.h:308
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mliska at suse dot cz
                CC: hubicka at ucw dot cz

Starting from r215794 Firefox produces following error in WPA with -flto and
--enable-checking=all:

lto1: internal compiler error: in estimate_edge_growth, at ipa-inline.h:308
0x7d7fc1 estimate_edge_growth
    ../../gcc/ipa-inline.h:307
0x7d7fc1 estimate_size_after_inlining(cgraph_node*, cgraph_edge*)
    ../../gcc/ipa-inline-analysis.c:3817
0xf388d1 caller_growth_limits
    ../../gcc/ipa-inline.c:186
0xf388d1 can_inline_edge_p
    ../../gcc/ipa-inline.c:363
0xf3acdd update_callee_keys
    ../../gcc/ipa-inline.c:1236
0xf3c9a6 inline_small_functions
    ../../gcc/ipa-inline.c:1818
0xf3c9a6 ipa_inline
    ../../gcc/ipa-inline.c:2182
0xf3c9a6 execute
    ../../gcc/ipa-inline.c:2542

Edge:
caller:
_ZNK12SkRefCntBase16internal_disposeEv/14636955 (internal_dispose)
@0x7f9c1a33d178
  Type: function definition analyzed
  Visibility: virtual
  next sharing asm name: 14636951
  References:
  Referring:
  Read from file:
/home/marxin/Programming/gecko-dev/obj-x86_64-unknown-linux-gnu/toolkit/library/build/../../../gfx/2d/Unified_cpp_gfx_2d0.o
  Function internal_dispose/14636955 is inline copy in __base_dtor /13594851
  Clone of _ZNK12SkRefCntBase16internal_disposeEv/14636951
  Availability: local
  First run: 0
  Function flags: local
  Called by: _ZNK12SkRefCntBase5unrefEv.part.40/14636954 (inlined)
(indirect_inlining) (0.02 per call)
  Calls: _ZN13SkGPipeCanvasD0Ev/13594853 (indirect_inlining) (0.01 per call)
callee:
_ZN13SkGPipeCanvasD0Ev/13594853 (__deleting_dtor ) @0x7f9c1575d8d0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly virtual
  Address is taken.
  References:
  Referring: _ZTV13SkGPipeCanvas/13595722
(addr)_ZNK12SkRefCntBase16internal_disposeEv/14605659 (addr)
(speculative)_ZNK12SkRefCntBase16internal_disposeEv/14614102 (addr)
(speculative)_ZNK12SkRefCntBase16internal_disposeEv/14636951 (addr)
(speculative)
  Read from file:
/home/marxin/Programming/gecko-dev/obj-x86_64-unknown-linux-gnu/toolkit/library/build/../../../gfx/skia/Unified_cpp_gfx_skia20.o
  Availability: available
  First run: 0
  Function flags:
  Called by: _ZNK12SkRefCntBase16internal_disposeEv/14636955
(indirect_inlining) (0.01 per call)
_ZNK12SkRefCntBase16internal_disposeEv/14636951 (speculative)
(indirect_inlining) (0.03 per call)
_ZNK12SkRefCntBase16internal_disposeEv/14614102 (speculative)
(indirect_inlining) (0.08 per call)
_ZNK12SkRefCntBase16internal_disposeEv/14605659 (speculative)
(indirect_inlining) (0.08 per call)
  Calls: moz_free/1431 (1.00 per call) _ZN13SkGPipeCanvasD1Ev/13594852 (1.00
per call)

Thanks,
Martin


  parent reply	other threads:[~2014-10-07 14:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 20:08 [Bug c/63445] New: " jim at meyering dot net
2014-10-07 11:24 ` [Bug tree-optimization/63445] [5 Regression] " rguenth at gcc dot gnu.org
2014-10-07 13:06 ` manu at gcc dot gnu.org
2014-10-07 14:01 ` rguenther at suse dot de [this message]
2014-10-07 16:49 ` ebotcazou at gcc dot gnu.org
2014-10-08 10:51 ` ebotcazou at gcc dot gnu.org
2014-10-09  8:21 ` rguenth at gcc dot gnu.org
2014-10-09  8:21 ` rguenth 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-63445-4-AIjyRyv9lD@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).