public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/66488] New: -fipa-pta -flto segfault
@ 2015-06-10 13:44 sthalik at misaki dot pl
  2015-06-10 13:49 ` [Bug lto/66488] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sthalik at misaki dot pl @ 2015-06-10 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66488
           Summary: -fipa-pta -flto segfault
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sthalik at misaki dot pl
  Target Milestone: ---

GCC from today's 5-branch segfaults on -fipa-pta -flto with the following
backtrace:

(gdb) bt full
#0  0x0000000000432e87 in ggc_free (p=<optimized out>) at
../../gcc/ggc-page.c:1645
        bit_offset = 4160749604
        word = 4290772993
        bit = 4
        order = 5
        size = 32
#1  0x000000000079b1c1 in release<basic_block_def*, va_gc> (v=@0x20a89418:
0x10afa498) at ../../gcc/vec.h:361
No locals.
#2  vec_free<basic_block_def*, va_gc> (v=@0x20a89418: 0x10afa498) at
../../gcc/vec.h:608
No locals.
#3  delete_tree_cfg_annotations () at ../../gcc/tree-cfg.c:2577
No locals.
#4  0x000000000046ad5b in (anonymous namespace)::pass_expand::execute
(this=<optimized out>, fun=<optimized out>)
    at ../../gcc/cfgexpand.c:6141
        bb = <optimized out>
        init_block = 0x0
        blocks = <optimized out>
        ei = <optimized out>
        e = 0x0
        var_ret_seq = 0x0
        i = <optimized out>
        __FUNCTION__ = "execute"
#5  0x00000000006cc8a4 in execute_one_pass (pass=pass@entry=0xc3b4160) at
../../gcc/passes.c:2330
        todo_after = 0
        gate_status = <optimized out>
        __FUNCTION__ = "execute_one_pass"
#6  0x00000000006cccde in execute_pass_list_1 (pass=0xc3b4160,
pass@entry=0xc3b0720) at ../../gcc/passes.c:2382
No locals.
#7  0x00000000006ccd39 in execute_pass_list (fn=0x1052de70, pass=0xc3b0720) at
../../gcc/passes.c:2393
No locals.
#8  0x000000000048cf47 in cgraph_node::expand (this=this@entry=0xf041000) at
../../gcc/cgraphunit.c:1895
        saved_loc = 0
        __FUNCTION__ = "expand"
#9  0x000000000048e212 in expand_all_functions () at
../../gcc/cgraphunit.c:2031
        node = 0xf041000
        order_pos = <optimized out>
        i = <optimized out>
        order = 0x20ffa100
        expanded_func_count = 526
        profiled_func_count = 2
        new_order_pos = <optimized out>
#10 symbol_table::compile (this=0xc38c000) at ../../gcc/cgraphunit.c:2384
No locals.
#11 0x000000000048e41e in symbol_table::compile (this=<optimized out>) at
../../gcc/cgraphunit.c:2417
No locals.
#12 0x000000000042b329 in lto_main () at ../../gcc/lto/lto.c:3496
No locals.
#13 0x0000000000773680 in compile_file () at ../../gcc/toplev.c:594
No locals.
#14 0x0000000000ffc87c in do_compile () at ../../gcc/toplev.c:2076
        i = 1
#15 toplev::main (this=this@entry=0xad6fe30, argc=147, argc@entry=40,
argv=0xaf49740, argv@entry=0xaf46e50)
    at ../../gcc/toplev.c:2174
No locals.
#16 0x000000000102c4b6 in main (argc=40, argv=0xaf46e50) at ../../gcc/main.c:39
        toplev = {m_use_TV_TOTAL = true, m_init_signals = true}

All CFLAGS passed are:

-flto -fuse-linker-plugin -flto-partition=none -fno-fat-lto-objects
-ftree-vectorize -ffast-math -mfpmath=both -fipa-pta -march=i686
-mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx


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

* [Bug lto/66488] -fipa-pta -flto segfault
  2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
@ 2015-06-10 13:49 ` rguenth at gcc dot gnu.org
  2015-06-10 13:51 ` sthalik at misaki dot pl
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-10 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You mean you bootstrapped gcc 5 with -fipa-pta -flto?


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

* [Bug lto/66488] -fipa-pta -flto segfault
  2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
  2015-06-10 13:49 ` [Bug lto/66488] " rguenth at gcc dot gnu.org
@ 2015-06-10 13:51 ` sthalik at misaki dot pl
  2015-06-10 16:39 ` sthalik at misaki dot pl
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sthalik at misaki dot pl @ 2015-06-10 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Stanisław Halik <sthalik at misaki dot pl> ---
No, it's invocation of today's 5-branch on my own code.
>From gcc-bugs-return-488613-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 10 14:03:42 2015
Return-Path: <gcc-bugs-return-488613-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 41147 invoked by alias); 10 Jun 2015 14:03:41 -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 40982 invoked by uid 48); 10 Jun 2015 14:03:37 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66488] -fipa-pta -flto segfault
Date: Wed, 10 Jun 2015 14:03: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.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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:
Message-ID: <bug-66488-4-9RFOgUSnIN@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66488-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66488-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/msg00945.txt.bz2
Content-length: 201

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, then please attach preprocessed source of the file where the crash happens.


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

* [Bug lto/66488] -fipa-pta -flto segfault
  2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
  2015-06-10 13:49 ` [Bug lto/66488] " rguenth at gcc dot gnu.org
  2015-06-10 13:51 ` sthalik at misaki dot pl
@ 2015-06-10 16:39 ` sthalik at misaki dot pl
  2015-06-11  8:19 ` rguenth at gcc dot gnu.org
  2015-06-12  3:14 ` sthalik at misaki dot pl
  4 siblings, 0 replies; 6+ messages in thread
From: sthalik at misaki dot pl @ 2015-06-10 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Stanisław Halik <sthalik at misaki dot pl> ---
Line information:

../modules/imgproc/src/filter.cpp: In member function 'operator()':
../modules/imgproc/src/filter.cpp:3084:10: internal compiler error:
Segmentation fault

This is: template<typename ST, typename DT, class VecOp> struct RowFilter :
public BaseRowFilter

Attaching the file.
>From gcc-bugs-return-488643-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 10 16:41:17 2015
Return-Path: <gcc-bugs-return-488643-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 40444 invoked by alias); 10 Jun 2015 16:41:17 -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 40400 invoked by uid 48); 10 Jun 2015 16:41:09 -0000
From: "sthalik at misaki dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66488] -fipa-pta -flto segfault
Date: Wed, 10 Jun 2015 16:41: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.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: sthalik at misaki dot pl
X-Bugzilla-Status: UNCONFIRMED
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: attachments.created
Message-ID: <bug-66488-4-BiLMXZjekq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66488-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66488-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-06/txt/msg00975.txt.bz2
Content-length: 250

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

--- Comment #5 from Stanisław Halik <sthalik at misaki dot pl> ---
Created attachment 35746
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35746&action=edit
preprocessed filter.cpp
>From gcc-bugs-return-488644-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 10 16:47:41 2015
Return-Path: <gcc-bugs-return-488644-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 58491 invoked by alias); 10 Jun 2015 16:47:41 -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 58422 invoked by uid 48); 10 Jun 2015 16:47:36 -0000
From: "bugzilla@poradnik-webmastera.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/31893] Please provide an "inout" attribute for function parameters.
Date: Wed, 10 Jun 2015 16:47: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: bugzilla@poradnik-webmastera.com
X-Bugzilla-Status: NEW
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:
Message-ID: <bug-31893-4-F97tZK2MKq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-31893-4@http.gcc.gnu.org/bugzilla/>
References: <bug-31893-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/msg00976.txt.bz2
Content-length: 525

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

--- Comment #9 from Daniel Fruzynski <bugzilla@poradnik-webmastera.com> ---
My bad, now I see my error.

What do you think about adding this new attribute to mark function arguments as
out only? I think it would allow to eliminate more dead or unnecessary code
(e.g. when value is assigned to variable, and then address of this variable is
passed as out argument), plus print warnings like 'not all paths assigns value
to out argument' or 'value of out argument is read'.


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

* [Bug lto/66488] -fipa-pta -flto segfault
  2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
                   ` (2 preceding siblings ...)
  2015-06-10 16:39 ` sthalik at misaki dot pl
@ 2015-06-11  8:19 ` rguenth at gcc dot gnu.org
  2015-06-12  3:14 ` sthalik at misaki dot pl
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-11  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-06-11
     Ever confirmed|0                           |1

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
You compile without optimization?  (no -O2 for example?)

Note that I forgot that with -flto a single preprocessed file doesn't really
help to reproduce.  We'd need a minimal set of preprocessed sources where

g++ <flags> -flto -r -nostdlib <preprocessed sources>

reproduces the issue (so compile & link on the same command-line preferably).
With -r -nostdlib you avoid linker errors later.

Reducing is easier with -flto-partition=1to1 (if the issue reproduces with
that...).


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

* [Bug lto/66488] -fipa-pta -flto segfault
  2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
                   ` (3 preceding siblings ...)
  2015-06-11  8:19 ` rguenth at gcc dot gnu.org
@ 2015-06-12  3:14 ` sthalik at misaki dot pl
  4 siblings, 0 replies; 6+ messages in thread
From: sthalik at misaki dot pl @ 2015-06-12  3:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Stanisław Halik <sthalik at misaki dot pl> ---
In ggc-page.c there's an assumption that sizeof long == sizeof void* in absence
of other information. That was the reason the build was passing clearly with
valgrind on amd64 Linux.

I propose a fix to gcc/config/i386/xm-mingw32.h. Not completely sure this is
the right place.
>From gcc-bugs-return-488837-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 12 03:16:11 2015
Return-Path: <gcc-bugs-return-488837-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 67958 invoked by alias); 12 Jun 2015 03:16:11 -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 67941 invoked by uid 48); 12 Jun 2015 03:16:06 -0000
From: "sthalik at misaki dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66488] -fipa-pta -flto segfault
Date: Fri, 12 Jun 2015 03:16: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.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: sthalik at misaki dot pl
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: attachments.created
Message-ID: <bug-66488-4-PdymUc3QOw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66488-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66488-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-06/txt/msg01169.txt.bz2
Content-length: 373

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

--- Comment #8 from Stanisław Halik <sthalik at misaki dot pl> ---
Created attachment 35766
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35766&action=edit
proposed fix

Fixes --host=x86_64-w64-mingw32 --target=i686-w64-mingw32 when compiler's using
more than few gigabytes of RAM per invocation.
>From gcc-bugs-return-488838-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 12 05:40:55 2015
Return-Path: <gcc-bugs-return-488838-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 70164 invoked by alias); 12 Jun 2015 05:40:54 -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 70109 invoked by uid 55); 12 Jun 2015 05:40:49 -0000
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66422] [5 Regression] -Warray-bounds false positive with -O3
Date: Fri, 12 Jun 2015 05:40:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenther at suse dot de
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66422-4-Fqwl7UFFpr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66422-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66422-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/msg01170.txt.bz2
Content-length: 1391

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

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On June 12, 2015 12:01:36 AM GMT+02:00, hubicka at ucw dot cz
<gcc-bugzilla@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?idf422
>
>--- Comment #8 from Jan Hubicka <hubicka at ucw dot cz> ---
>>
>> run_foo ()
>> {
>> ...
>>   <bb 10>:
>>   _33 = myfoo_28->buf[3];
>>   if (_33 != 1)
>>     goto <bb 13>;
>>   else
>>     goto <bb 11>;
>>
>>   <bb 11>:
>>   _34 = (int) _27;
>>   if (_34 > 4)
>>     goto <bb 12>;
>>   else
>>     goto <bb 13>;
>>
>>   <bb 12>:
>>   __builtin_unreachable ();
>>   _35 = myfoo_28->buf[4];
>>
>>   <bb 13>:
>>   # _36 = PHI <0(2), 1(3), 0(4), 1(5), 0(6), 1(7), 0(8), 1(9), 0(10),
>1(11),
>> 0(12)>
>>   if (_36 != 0)
>>     goto <bb 15>;
>>   else
>>     goto <bb 14>;
>>
>>   <bb 14>:
>>   i_37 = 1;
>>
>>   <bb 15>:
>>   # _2 = PHI <0(13), -1(14)>
>>   return _2;
>>
>> and the unreachable () remains in the CFG.
>>
>> Honza - it seems that remove_exits_and_undefined_stmts inserts these
>> unreachable calls but fails to split the BBs.
>>
>> I have a patch.
>
>Hmm, Indeed. I have expected cleanup_cfg to get rid of _35 >myfoo_28->buf[4];.
>I suppose this changed with your compile time work for GCC 5?

Yes. It no longer scans the whole basic block but just tge last statements.

Richard.

>Honza


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

end of thread, other threads:[~2015-06-12  3:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 13:44 [Bug lto/66488] New: -fipa-pta -flto segfault sthalik at misaki dot pl
2015-06-10 13:49 ` [Bug lto/66488] " rguenth at gcc dot gnu.org
2015-06-10 13:51 ` sthalik at misaki dot pl
2015-06-10 16:39 ` sthalik at misaki dot pl
2015-06-11  8:19 ` rguenth at gcc dot gnu.org
2015-06-12  3:14 ` sthalik at misaki dot pl

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