public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47381] New: [x32] internal compiler error: in gen_lowpart_general, at rtlhooks.c:59
@ 2011-01-20 17:32 hjl.tools at gmail dot com
  2011-01-20 18:00 ` [Bug target/47381] " hjl at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-20 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [x32] internal compiler error: in gen_lowpart_general,
                    at rtlhooks.c:59
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


[hjl@gnu-6 ilp32-12]$ cat y.i
typedef unsigned long ulg;
long block_start;
typedef unsigned char uch;
extern uch window[];
 unsigned strstart;
ulg flush_block (char *buf, ulg stored_len, int eof);
ulg deflate()
{
    return flush_block(block_start >= 0L ?
(char*)&window[(unsigned)block_start] : (char*)((void *)0), (long)strstart -
block_start, (1));
}
[hjl@gnu-6 ilp32-12]$ make y.s
/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -S -o y.s -mx32 -O2 -dp 
y.i
y.i: In function ‘deflate’:
y.i:10:1: internal compiler error: in gen_lowpart_general, at rtlhooks.c:59
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [y.s] Error 1
[hjl@gnu-6 ilp32-12]$ 


Breakpoint 1, fancy_abort (
    file=0x1245008 "/export/gnu/import/git/gcc-x32/gcc/rtlhooks.c", line=59, 
    function=0x1245040 "gen_lowpart_general")
    at /export/gnu/import/git/gcc-x32/gcc/diagnostic.c:893
893      internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) bt
#0  fancy_abort (
    file=0x1245008 "/export/gnu/import/git/gcc-x32/gcc/rtlhooks.c", line=59, 
    function=0x1245040 "gen_lowpart_general")
    at /export/gnu/import/git/gcc-x32/gcc/diagnostic.c:893
#1  0x000000000097dacb in gen_lowpart_general (mode=DImode, x=0x7ffff1c92e60)
    at /export/gnu/import/git/gcc-x32/gcc/rtlhooks.c:59
#2  0x0000000000eb47b4 in gen_split_2389 (curr_insn=0x7ffff1a98a68, 
    operands=0x18af5a0)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/i386.md:6092
#3  0x0000000000fdc878 in split_2 (x0=0x7ffff1af6060, insn=0x7ffff1a98a68)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/i386.md:6089
#4  0x0000000000fee8ec in split_7 (x0=0x7ffff1af6060, insn=0x7ffff1a98a68)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/i386.md:11194
#5  0x0000000000ff9ef7 in split_insns (x0=0x7ffff1af6060, insn=0x7ffff1a98a68)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/sse.md:4647
#6  0x00000000006c3db1 in try_split (pat=0x7ffff1af6060, trial=0x7ffff1a98a68, 
    last=1) at /export/gnu/import/git/gcc-x32/gcc/emit-rtl.c:3415
#7  0x000000000092bf18 in split_insn (insn=0x7ffff1a98a68)
    at /export/gnu/import/git/gcc-x32/gcc/recog.c:2781
#8  0x000000000092c2d0 in split_all_insns ()
    at /export/gnu/import/git/gcc-x32/gcc/recog.c:2870
#9  0x000000000092df31 in rest_of_handle_split_after_reload ()
    at /export/gnu/import/git/gcc-x32/gcc/recog.c:3730
---Type <return> to continue, or q <return> to quit---
#10 0x00000000008f98ab in execute_one_pass (pass=0x17b0c00)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1561
#11 0x00000000008f9a9a in execute_pass_list (pass=0x17b0c00)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1616
#12 0x00000000008f9abb in execute_pass_list (pass=0x17b07a0)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1617
#13 0x00000000008f9abb in execute_pass_list (pass=0x17b0740)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1617
#14 0x0000000000a82760 in tree_rest_of_compilation (fndecl=0x7ffff1aa7000)
    at /export/gnu/import/git/gcc-x32/gcc/tree-optimize.c:422
#15 0x0000000000d22a89 in cgraph_expand_function (node=0x7ffff1aab000)
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1522
#16 0x0000000000d22c48 in cgraph_expand_all_functions ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1581
#17 0x0000000000d2327d in cgraph_optimize ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1841
#18 0x0000000000d20db0 in cgraph_finalize_compilation_unit ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1042
#19 0x00000000004aeb60 in c_write_global_declarations ()
    at /export/gnu/import/git/gcc-x32/gcc/c-decl.c:9843

The problem is

;; Convert lea to the lea pattern to avoid flags dependency.
(define_split
  [(set (match_operand 0 "register_operand" "")
        (plus (match_operand 1 "register_operand" "")
              (match_operand 2 "nonmemory_operand" ""))) 
   (clobber (reg:CC FLAGS_REG))]
  "reload_completed && ix86_lea_for_add_ok (insn, operands)" 
  [(const_int 0)]
{
  rtx pat;
  enum machine_mode mode = GET_MODE (operands[0]);

  /* In -fPIC mode the constructs like (const (unspec [symbol_ref]))
     may confuse gen_lowpart.  */
  if (mode != Pmode)
    {
      operands[1] = gen_lowpart (Pmode, operands[1]);
      operands[2] = gen_lowpart (Pmode, operands[2]);
    }

doesn't support

(gdb) call debug_rtx (curr_insn)
(insn 34 9 35 2 (parallel [
            (set (reg:DI 1 dx [70])
                (zero_extend:DI (plus:SI (reg:SI 0 ax [orig:62 block_start.2 ]
[62])
                        (symbol_ref:SI ("window") [flags 0x40] <var_decl
0x7ffff1aa60a0 window>))))
            (clobber (reg:CC 17 flags))
        ]) y.i:9 255 {*addsi_1_zext}
     (nil))
(gdb)


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

end of thread, other threads:[~2011-08-06 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20 17:32 [Bug target/47381] New: [x32] internal compiler error: in gen_lowpart_general, at rtlhooks.c:59 hjl.tools at gmail dot com
2011-01-20 18:00 ` [Bug target/47381] " hjl at gcc dot gnu.org
2011-01-20 19:40 ` hjl.tools at gmail dot com
2011-01-20 19:57 ` hjl at gcc dot gnu.org
2011-07-26 12:02 ` uros at gcc dot gnu.org
2011-07-26 12:07 ` ubizjak at gmail dot com
2011-07-29 16:02 ` hjl at gcc dot gnu.org
2011-08-06 14:58 ` hjl at gcc dot gnu.org

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