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

            Bug ID: 64669
           Summary: [5 Regression] aarch64-linux profiledbootstrap failure
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

r219833 (but also older revisions, e.g. r219767)
../configure --enable-languages=c,c++,fortran,go --enable-checking=release
--disable-werror
make -j16 profiledbootstrap
fails on aarch64:
/tmp/jakub/gcc/obj/./prev-gcc/cc1plus -quiet -nostdinc++ -I
/tmp/jakub/gcc/obj/prev-aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu
-I /tmp/jakub/gcc/obj/prev-aarch64-unknown-linux-gnu/libstdc++-v3/include -I
/tmp/jakub/gcc/libstdc++-v3/libsupc++ -I . -I go -I ../../gcc -I ../../gcc/go
-I ../../gcc/../include -I ../../gcc/../libcpp/include -I
../../gcc/../libdecnumber -I ../../gcc/../libdecnumber/dpd -I ../libdecnumber
-I ../../gcc/../libbacktrace -I ../../gcc/go -I ../../gcc/go/gofrontend
-iprefix
/tmp/jakub/gcc/obj/prev-gcc/../lib/gcc/aarch64-unknown-linux-gnu/5.0.0/
-isystem /tmp/jakub/gcc/obj/./prev-gcc/include -isystem
/tmp/jakub/gcc/obj/./prev-gcc/include-fixed -MMD go/lex.d -MF go/.deps/lex.TPo
-MP -MT go/lex.o -D_GNU_SOURCE -D IN_GCC_FRONTEND -D IN_GCC -D HAVE_CONFIG_H
../../gcc/go/gofrontend/lex.cc -quiet -dumpbase lex.cc -mlittle-endian
-mabi=lp64 -auxbase-strip go/lex.o -g -O2 -Wextra -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wsuggest-attribute=format -Woverloaded-virtual
-Wpedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fprofile-use -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -o
/tmp/cclDZwuT.s
../../gcc/go/gofrontend/lex.cc: In member function ‘const char*
Lex::advance_one_char(const char*, bool, unsigned int*, bool*)’:
../../gcc/go/gofrontend/lex.cc:1158:1: internal compiler error: in
convert_move, at expr.c:688
 Lex::advance_one_char(const char* p, bool is_single_quote, unsigned int*
value,
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Fails the same with stage1-gcc/cc1plus instead of prev-gcc/cc1plus, doesn't ICE
without -fprofile-use.

#0  fancy_abort (file=0x14b3cd8 "../../gcc/expr.c", line=688, 
    function=0x14b4700 <convert_move(rtx_def*, rtx_def*, int)::__FUNCTION__>
"convert_move") at ../../gcc/diagnostic.c:1288
#1  0x00000000009f2d90 in convert_move (to=0x3ffacdec060, from=0x3ffacdebf58,
unsignedp=1) at ../../gcc/expr.c:688
#2  0x00000000009f3264 in convert_modes (mode=SImode, oldmode=CC_DEQmode,
x=0x3ffacdebf58, unsignedp=1) at ../../gcc/expr.c:769
#3  0x0000000000c97120 in prepare_operand (icode=CODE_FOR_cbranchsi4,
x=0x3ffacdebf58, opnum=1, mode=QImode, wider_mode=SImode, unsignedp=1)
    at ../../gcc/optabs.c:4293
#4  0x0000000000c96e04 in prepare_cmp_insn (x=0x3ffacdebf58, y=0x3ffaf3e0480,
comparison=LEU, size=0x0, unsignedp=1, methods=OPTAB_LIB_WIDEN, 
    ptest=0x3ffffffe248, pmode=0x3ffffffe228) at ../../gcc/optabs.c:4203
#5  0x0000000000c974a8 in emit_cmp_and_jump_insns (x=0x3ffacdebf58,
y=0x3ffaf3e0480, comparison=LEU, size=0x0, mode=QImode, unsignedp=1, 
    label=0x3fface05e00, prob=0) at ../../gcc/optabs.c:4381
#6  0x000000000095ca80 in do_compare_rtx_and_jump (op0=0x3ffacdebf58,
op1=0x3ffaf3e0480, code=LEU, unsignedp=1, mode=QImode, size=0x0, 
    if_false_label=0x0, if_true_label=0x3fface05e00, prob=0) at
../../gcc/dojump.c:1159
#7  0x000000000095cca4 in do_compare_and_jump (treeop0=0x3ffac41a200,
treeop1=0x3ffaf371038, signed_code=LE, unsigned_code=LEU, 
    if_false_label=0x0, if_true_label=0x3fface05e00, prob=0) at
../../gcc/dojump.c:1241
#8  0x000000000095abb4 in do_jump_1 (code=LE_EXPR, op0=0x3ffac41a200,
op1=0x3ffaf371038, if_false_label=0x0, if_true_label=0x3fface05e00, prob=0)
    at ../../gcc/dojump.c:296
#9  0x000000000095a448 in jumpif_1 (code=LE_EXPR, op0=0x3ffac41a200,
op1=0x3ffaf371038, label=0x3fface05e00, prob=0) at ../../gcc/dojump.c:176
#10 0x00000000008df938 in expand_gimple_cond (bb=0x3ffac329240,
stmt=0x3ffac30a230) at ../../gcc/cfgexpand.c:2231
#11 0x00000000008e7f1c in expand_gimple_basic_block (bb=0x3ffac329240,
disable_tail_calls=false) at ../../gcc/cfgexpand.c:5262
#12 0x00000000008e9af4 in (anonymous namespace)::pass_expand::execute
(this=0x1a0fe20, fun=0x3ffb10feaf0) at ../../gcc/cfgexpand.c:6003
#13 0x0000000000cc092c in execute_one_pass (pass=0x1a0fe20) at
../../gcc/passes.c:2326
#14 0x0000000000cc0bd8 in execute_pass_list_1 (pass=0x1a0fe20) at
../../gcc/passes.c:2378
#15 0x0000000000cc0c54 in execute_pass_list (fn=0x3ffb10feaf0, pass=0x1a0cca0)
at ../../gcc/passes.c:2389
#16 0x0000000000928030 in cgraph_node::expand (this=0x3ffb108e118) at
../../gcc/cgraphunit.c:1804

in prepare_operand x is (reg:CC_DEQ 66 cc [ D.47994 ]) and trying to convert it
to SImode is of course deemed to fail.
In do_compare_and_jump treeop0 is a bool var and looks reasonable, treeop1 is
boolean_false_node.
And the do_compare_rtx_and_jump is already called with that (reg:CC_DEQ 66 cc [
D.47994 ]) and (const_int 0) arguments and QImode.
I'd say expand_normal for a bool SSA_NAME returning reg:CC_DEQ , i.e. not the
desired QImode, looks wrong.

Reply via email to