public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/47727] [x32] Many passes can't handle const symbol when Pmode != ptr_mode
Date: Mon, 14 Feb 2011 06:38:00 -0000	[thread overview]
Message-ID: <bug-47727-4-SeYgqTSN6J@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47727-4@http.gcc.gnu.org/bugzilla/>

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end
            Summary|[x32] internal compiler     |[x32] Many passes can't
                   |error: Segmentation fault   |handle const symbol when
                   |                            |Pmode != ptr_mode

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-14 06:16:04 UTC ---
Various passes can't handle

(insn 36 62 37 3 (set (reg/f:SI 95)
        (const:SI (plus:SI (symbol_ref:SI ("__CTOR_END__") [flags 0x2] 
<var_dec
l 0x7ffff0cf0000 __CTOR_END__>)
                (const_int -4 [0xfffffffffffffffc])))) c.i:7 64
{*movsi_internal
}
     (nil))

(insn 37 36 38 3 (set (reg/v/f:DI 93 [ p ])
        (zero_extend:DI (reg/f:SI 95))) c.i:7 115 {*zero_extendsidi2_rex64}
     (expr_list:REG_EQUAL (const:DI (reg:DI 98))
        (nil)))

properly when Pmode != ptr_mode. cse, cprop and combine do things
like

#0  emit_insn (x=0x7ffff0d46900)
    at /export/gnu/import/git/gcc-x32/gcc/emit-rtl.c:4791
#1  0x00000000006f0e87 in emit_move_insn_1 (x=0x7ffff0d42dc0, y=0x7ffff0d42b40)
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:3305
#2  0x00000000006f125a in emit_move_insn (x=0x7ffff0d42dc0, y=0x7ffff0d42b40)
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:3395
#3  0x00000000006d503e in copy_to_mode_reg (mode=SImode, x=0x7ffff0d42b40)
    at /export/gnu/import/git/gcc-x32/gcc/explow.c:637
#4  0x00000000008d9656 in expand_binop_directly (mode=SImode, 
    binoptab=0x1809e20, op0=0x7ffff0d42b40, op1=0x7ffff0dea430, 
    target=0x7ffff0d42da0, unsignedp=1, methods=OPTAB_LIB_WIDEN, 
    last=0x7ffff0cf1980) at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1461
#5  0x00000000008d99c2 in expand_binop (mode=SImode, binoptab=0x1809e20, 
    op0=0x7ffff0d42b40, op1=0x7ffff0dea430, target=0x7ffff0d42da0, 
    unsignedp=1, methods=OPTAB_LIB_WIDEN)
    at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1551
#6  0x00000000008d9185 in expand_simple_binop (mode=SImode, code=PLUS, 
    op0=0x7ffff0d42b40, op1=0x7ffff0dea430, target=0x7ffff0d42da0, 
    unsignedp=1, methods=OPTAB_LIB_WIDEN)
    at /export/gnu/import/git/gcc-x32/gcc/optabs.c:1295
#7  0x0000000000701383 in force_operand (value=0x7ffff0d473a8, 
    target=0x7ffff0d42da0) at /export/gnu/import/git/gcc-x32/gcc/expr.c:6452
#8  0x00000000006d4fed in copy_to_mode_reg (mode=SImode, x=0x7ffff0d473a8)
---Type <return> to continue, or q <return> to quit---
    at /export/gnu/import/git/gcc-x32/gcc/explow.c:633
#9  0x00000000008df8d7 in maybe_emit_unop_insn (icode=2221, 
    target=0x7ffff0d42d80, op0=0x7ffff0d473a8, code=ZERO_EXTEND)
    at /export/gnu/import/git/gcc-x32/gcc/optabs.c:3746
#10 0x00000000008dfa49 in emit_unop_insn (icode=2221, target=0x7ffff0d42d80, 
    op0=0x7ffff0d473a8, code=ZERO_EXTEND)
    at /export/gnu/import/git/gcc-x32/gcc/optabs.c:3776
#11 0x00000000006e9df4 in convert_move (to=0x7ffff0d42d80, 
    from=0x7ffff0d473a8, unsignedp=1)
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:612
#12 0x00000000006ea5de in convert_modes (mode=DImode, oldmode=SImode, 
    x=0x7ffff0d473a8, unsignedp=1)
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:791
#13 0x00000000006d4971 in convert_memory_address_addr_space (to_mode=DImode, 
    x=0x7ffff0d473a8, as=0 '\000')
    at /export/gnu/import/git/gcc-x32/gcc/explow.c:408
#14 0x00000000006d488d in convert_memory_address_addr_space (to_mode=DImode, 
    x=0x7ffff0d43d10, as=0 '\000')
    at /export/gnu/import/git/gcc-x32/gcc/explow.c:379
#15 0x00000000009bceb1 in simplify_unary_operation_1 (code=ZERO_EXTEND, 
    mode=DImode, op=0x7ffff0d43d10)
    at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:1111
#16 0x00000000009bafa8 in simplify_unary_operation (code=ZERO_EXTEND, 
---Type <return> to continue, or q <return> to quit---
    mode=DImode, op=0x7ffff0d43d10, op_mode=SImode)
    at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:526

But they are not prepared to deal with the new instruction
sequence nor new pseudo registers. Those passes should skip
them.


  parent reply	other threads:[~2011-02-14  6:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  3:37 [Bug target/47727] New: [x32] internal compiler error: Segmentation fault hjl.tools at gmail dot com
2011-02-14  3:54 ` [Bug target/47727] " hjl.tools at gmail dot com
2011-02-14  4:19 ` hjl.tools at gmail dot com
2011-02-14  6:16 ` hjl.tools at gmail dot com
2011-02-14  6:38 ` hjl.tools at gmail dot com [this message]
2011-02-14 13:58 ` [Bug middle-end/47727] [x32] Many passes can't handle const symbol when Pmode != ptr_mode hjl.tools at gmail dot com
2011-02-14 14:28 ` rguenther at suse dot de
2011-02-14 14:52 ` hjl.tools at gmail dot com
2011-02-14 17:31 ` hjl.tools at gmail dot com
2011-02-14 19:02 ` hjl at gcc dot gnu.org
2011-07-14 22:51 ` hjl at gcc dot gnu.org
2011-07-28  9:23 ` ubizjak at gmail dot com
2011-08-06 14:52 ` hjl at gcc dot gnu.org
2011-08-08 15:57 ` hjl.tools at gmail dot com

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-47727-4-SeYgqTSN6J@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).