public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65193] [4.9 Regression] ICE: Segmentation fault with -g -flto
Date: Thu, 26 Feb 2015 15:18:00 -0000	[thread overview]
Message-ID: <bug-65193-4-mbFKUYZydA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65193-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I already get

> ./xg++ -B. -nostdlib -fPIC -flto -shared t.ii -O2 -g
t.ii: In function ‘float_next_imp’:
t.ii:33:7: error: address taken, but ADDRESSABLE bit not set
       float_next_imp (T p1, Policy p2)
       ^
d
t.ii:38:4: note: in statement
    frexp (p1, &d);
    ^
# .MEM_13 = VDEF <.MEM_11>
frexp (p1_5(D), &d);
t.ii:33:7: internal compiler error: verify_gimple failed
       float_next_imp (T p1, Policy p2)
       ^
0xaf39de verify_gimple_in_cfg(function*)


Ok.  It is the execute_update_addresses_taken () call in the TODO of the
IPA inline transform pass that re-sets TREE_ADDRESSABLE here.  Somehow
we have merged 'd' from two different places it seems (the optimization
is in _GLOBAL__sub_I_t.ii).

The duplicate appears in _GLOBAL__sub_I_t.ii after inlining:



        { Scope block #21 t.ii:13 Originating from :  static long doubleD.2801
get_min_shift_valueD.2829 (void);

          { Scope block #23 Originating from :#0
            voidD.2802 <<< Unknown tree: imported_decl >>> = ldexpD.2839;
            intD.2788 dD.2905; (nonlocalized)
...
_GLOBAL__sub_I_t.ii ()
{
...
}

...

float_next_imp (intD.2788 p1D.2902, struct AD.2830 p2D.2903)
{
  struct AD.2830 D.2919;
  intD.2788 D.2918;
  const intD.2833 ISRA.9D.2915;
  intD.2788 dD.2905;
  const intD.2833 D.2904;


something is messed up.  The decl is streamed via streaming struct function
local-decls from float_next_imp (as expected).  No idea how it ends up in
the vars for _GLOBAL__sub_I_t.ii.

Ah.  We inline

(gdb) p debug_gimple_stmt (stmt)
# .MEM = VDEF <.MEM>
get_min_shift_value ();
$91 = void

but somehow we end up with

(gdb) p debug_tree (old_var)
 <var_decl 0x7ffff683c8e8 d
    type <integer_type 0x7ffff66b2690 int asm_written public SI
        size <integer_cst 0x7ffff66b53a0 constant 32>
        unit size <integer_cst 0x7ffff66b53c0 constant 4>
        align 32 symtab -159219552 alias set -1 canonical type 0x7ffff66b2690
precision 32 min <integer_cst 0x7ffff66b5340 -2147483648> max <integer_cst
0x7ffff66b5360 2147483647>
        pointer_to_this <pointer_type 0x7ffff66bd738>>
    addressable SI file t.ii line 36 col 8 size <integer_cst 0x7ffff66b53a0 32>
unit size <integer_cst 0x7ffff66b53c0 4>
    align 32 context <function_decl 0x7ffff6821b00 float_next_imp>>

in its BLOCK tree.  Which gets populated by

Old value = <tree 0x0>
New value = <block 0x7ffff6828fa0>
0x0000000000cd9194 in lto_input_ts_block_tree_pointers (ib=0x7fffffffd610, 
    data_in=0x1bee6a0, expr=<block 0x7ffff6828fa0>)
    at /space/rguenther/src/svn/gcc-4_9-branch/gcc/tree-streamer-in.c:928
928           BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr)) = expr;

but finally the valid block tree

(gdb) p debug_tree (expr)
 <block 0x7ffff6828fa0
    vars <imported_decl 0x7ffff681e8a0 D.2856
        type <void_type 0x7ffff66bd000 void asm_written VOID
            align 8 symtab 0 alias set -1 canonical type 0x7ffff66bd000
            pointer_to_this <pointer_type 0x7ffff66bd0a8>>
        VOID file t.ii line 39 col 2
        align 1 initial <function_decl 0x7ffff682a100 ldexp>
        chain <var_decl 0x7ffff66abd10 c type <real_type 0x7ffff66bd498 long
double>
            public static weak XF file t.ii line 28 col 13
            size <integer_cst 0x7ffff66b50a0 constant 128>
            unit size <integer_cst 0x7ffff66b50c0 constant 16>
            align 128 context <function_decl 0x7ffff6821a00
get_min_shift_value>

gets invalid by

Hardware watchpoint 16: *$111

Old value = <var_decl 0x7ffff66abd10 c>
New value = <var_decl 0x7ffff683c8e8 d>
0x0000000000cd579b in streamer_read_chain (ib=0x7fffffffd990, 
    data_in=0x1bee740)
    at /space/rguenther/src/svn/gcc-4_9-branch/gcc/tree-streamer-in.c:85
85              TREE_CHAIN (prev) = curr;

where 'prev' is that IMPORTED_DECL which is streamed globally it seems (ups).

And we miss r212992 on the branch.
>From gcc-bugs-return-478600-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 26 14:39:20 2015
Return-Path: <gcc-bugs-return-478600-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57278 invoked by alias); 26 Feb 2015 14:39:19 -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 57236 invoked by uid 48); 26 Feb 2015 14:39:16 -0000
From: "ktietz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgcc/65038] [regression 5] Unable to find ftw.h for libgcov-util.c
Date: Thu, 26 Feb 2015 15:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgcc
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: blocker
X-Bugzilla-Who: ktietz at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on target_milestone everconfirmed
Message-ID: <bug-65038-4-x4xQYfrmOZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65038-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65038-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-02/txt/msg02932.txt.bz2
Content-length: 547

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-26
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Confirmed.  I have a patch for it


  parent reply	other threads:[~2015-02-26 14:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 14:59 [Bug lto/65193] New: " trippels at gcc dot gnu.org
2015-02-25 12:27 ` [Bug lto/65193] " rguenth at gcc dot gnu.org
2015-02-26 15:18 ` rguenth at gcc dot gnu.org [this message]
2015-02-27  9:51 ` [Bug tree-optimization/65193] " rguenth at gcc dot gnu.org
2015-02-27  9:57 ` rguenth at gcc dot gnu.org
2015-02-27 10:55 ` rguenth at gcc dot gnu.org
2015-02-27 11:17 ` rguenth at gcc dot gnu.org
2015-02-27 12:25 ` 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-65193-4-mbFKUYZydA@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).