This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/47364] [x32] internal compiler error: in emit_move_insn, at expr.c:3355


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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-19 21:02:01 UTC ---
Another one. On x32 branch, revision 169029 gave me:

[hjl@gnu-6 ilp32-7]$ cat x.c
extern __SIZE_TYPE__ strlen (const char *);
void foo (char *, const char *);
int bar (const char *prefix)
{
    char buff[256];
    foo (buff, prefix);
    return strlen(buff);
}
[hjl@gnu-6 ilp32-7]$ make
/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -S -o x.s -mx32 -O2   x.c
x.c: In function âbarâ:
x.c:7:18: internal compiler error: in emit_move_insn, at expr.c:3355
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[hjl@gnu-6 ilp32-7]$ 

(gdb) r
Starting program: /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/cc1
-fpreprocessed foo.i -quiet -dumpbase foo.i -mx32 -mtune=generic -march=x86-64
-auxbase-strip foo.s -O2 -version -o foo.s
GNU C (GCC) version 4.6.0 20110119 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20110119 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 2521805caa85b3824657bbc223b7b9f6

Breakpoint 1, fancy_abort (
    file=0x11f1128 "/export/gnu/import/git/gcc-x32/gcc/expr.c", line=3355, 
    function=0x11f25e6 "emit_move_insn")
    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=0x11f1128 "/export/gnu/import/git/gcc-x32/gcc/expr.c", 
    line=3355, function=0x11f25e6 "emit_move_insn")
    at /export/gnu/import/git/gcc-x32/gcc/diagnostic.c:893
#1  0x00000000006f074b in emit_move_insn (x=0x7ffff1c92fc0, y=0x7ffff1c92d60)
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:3354
#2  0x0000000000cef39f in ix86_expand_strlen (out=0x7ffff1c92fc0, 
    src=0x7ffff1af01b0, eoschar=0x7ffff1ba3470, align=0x7ffff1ba34f0)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/i386.c:21664
#3  0x0000000000ecf575 in gen_strlensi (operand0=0x7ffff1c92fc0, 
    operand1=0x7ffff1af01b0, operand2=0x7ffff1ba3470, operand3=0x7ffff1ba34f0)
    at /export/gnu/import/git/gcc-x32/gcc/config/i386/i386.md:16173
#4  0x00000000005ae5bd in expand_builtin_strlen (exp=0x7ffff1a985e8, 
    target=0x7ffff1c92fc0, target_mode=SImode)
    at /export/gnu/import/git/gcc-x32/gcc/builtins.c:3429
#5  0x00000000005bb501 in expand_builtin (exp=0x7ffff1a985e8, 
    target=0x7ffff1c92fc0, subtarget=0x0, mode=SImode, ignore=0)
    at /export/gnu/import/git/gcc-x32/gcc/builtins.c:6120
#6  0x00000000007102aa in expand_expr_real_1 (exp=0x7ffff1a985e8, 
    target=0x7ffff1c92fc0, tmode=SImode, modifier=EXPAND_NORMAL, 
    alt_rtl=0x7fffffffce00) at /export/gnu/import/git/gcc-x32/gcc/expr.c:9300
#7  0x0000000000704b9e in expand_expr_real (exp=0x7ffff1a985e8, 
    target=0x7ffff1c92fc0, tmode=SImode, modifier=EXPAND_NORMAL, 
    alt_rtl=0x7fffffffce00) at /export/gnu/import/git/gcc-x32/gcc/expr.c:7206
---Type <return> to continue, or q <return> to quit---
#8  0x00000000006f5eb7 in store_expr (exp=0x7ffff1a985e8, 
    target=0x7ffff1c92fc0, call_param_p=0, nontemporal=0 '\000')
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:4674
#9  0x00000000006f437b in expand_assignment (to=0x7ffff1aa8160, 
    from=0x7ffff1a985e8, nontemporal=0 '\000')
    at /export/gnu/import/git/gcc-x32/gcc/expr.c:4447
#10 0x000000000060a896 in expand_call_stmt (stmt=0x7ffff1ba8380)
    at /export/gnu/import/git/gcc-x32/gcc/cfgexpand.c:1914
#11 0x000000000060a997 in expand_gimple_stmt_1 (stmt=0x7ffff1ba8380)
    at /export/gnu/import/git/gcc-x32/gcc/cfgexpand.c:1949
#12 0x000000000060b046 in expand_gimple_stmt (stmt=0x7ffff1ba8380)
    at /export/gnu/import/git/gcc-x32/gcc/cfgexpand.c:2108
#13 0x0000000000611b18 in expand_gimple_basic_block (bb=0x7ffff1a941a0)
    at /export/gnu/import/git/gcc-x32/gcc/cfgexpand.c:3570
#14 0x00000000006138e1 in gimple_expand_cfg ()
    at /export/gnu/import/git/gcc-x32/gcc/cfgexpand.c:4053
#15 0x00000000008f985f in execute_one_pass (pass=0x17aeda0)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1561
#16 0x00000000008f9a4e in execute_pass_list (pass=0x17aeda0)
    at /export/gnu/import/git/gcc-x32/gcc/passes.c:1616
#17 0x0000000000a82714 in tree_rest_of_compilation (fndecl=0x7ffff1aa6100)
    at /export/gnu/import/git/gcc-x32/gcc/tree-optimize.c:422
#18 0x0000000000d228c9 in cgraph_expand_function (node=0x7ffff1aaa000)
---Type <return> to continue, or q <return> to quit---
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1522
#19 0x0000000000d22a88 in cgraph_expand_all_functions ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1581
#20 0x0000000000d230bd in cgraph_optimize ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1841
#21 0x0000000000d20bf0 in cgraph_finalize_compilation_unit ()
    at /export/gnu/import/git/gcc-x32/gcc/cgraphunit.c:1042
#22 0x00000000004aeb60 in c_write_global_declarations ()
    at /export/gnu/import/git/gcc-x32/gcc/c-decl.c:9843
#23 0x00000000009efd3e in compile_file ()
    at /export/gnu/import/git/gcc-x32/gcc/toplev.c:591
#24 0x00000000009f1e39 in do_compile ()
    at /export/gnu/import/git/gcc-x32/gcc/toplev.c:1874
#25 0x00000000009f1f86 in toplev_main (argc=15, argv=0x7fffffffdf08)
    at /export/gnu/import/git/gcc-x32/gcc/toplev.c:1937
#26 0x0000000000587bf0 in main (argc=15, argv=0x7fffffffdf08)
    at /export/gnu/import/git/gcc-x32/gcc/main.c:36
(gdb)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]