https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78362
Bug ID: 78362 Summary: [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: aarch64-unknown-linux-gnu Build: x86_64-pc-linux-gnu Created attachment 40046 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40046&action=edit reduced testcase Compiler output: $ /repo/build-trunk-242408-checking-yes-rtl-df-extra-nographite-aarch64/./gcc/cc1 -quiet -O testcase.c testcase.c: In function 'foo': testcase.c:4:1: internal compiler error: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 foo (void) ^~~ 0xb3e687 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.c:811 0x1057c4d rhs_regno /repo/gcc-trunk/gcc/rtl.h:1804 0x10b368a rhs_regno /repo/gcc-trunk/gcc/config/aarch64/aarch64.md:1632 0x10b368a gen_addsi3(rtx_def*, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/aarch64/aarch64.md:1613 0xa9c2ea expand_binop_directly /repo/gcc-trunk/gcc/optabs.c:1071 0xa9a0d7 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) /repo/gcc-trunk/gcc/optabs.c:1151 0x844238 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.c:9515 0x82dc99 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.c:11050 0x83bdee expand_expr /repo/gcc-trunk/gcc/expr.h:276 0x83bdee expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_def**, expand_modifier) /repo/gcc-trunk/gcc/expr.c:7684 0x844379 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.c:8526 0x82dc99 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.c:11050 0x846f22 expand_expr /repo/gcc-trunk/gcc/expr.h:276 0x846f22 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.c:8303 0x82dc99 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.c:11050 0xd208a2 expand_expr /repo/gcc-trunk/gcc/expr.h:276 0xd208a2 computation_cost /repo/gcc-trunk/gcc/tree-ssa-loop-ivopts.c:3639 0xd2ed72 get_computation_cost_at /repo/gcc-trunk/gcc/tree-ssa-loop-ivopts.c:5064 0xd33ff7 get_computation_cost /repo/gcc-trunk/gcc/tree-ssa-loop-ivopts.c:5084 0xd33ff7 determine_group_iv_cost_cond /repo/gcc-trunk/gcc/tree-ssa-loop-ivopts.c:5631 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. $ /repo/build-trunk-242408-checking-yes-rtl-df-extra-nographite-aarch64/./gcc/xgcc -v Using built-in specs. COLLECT_GCC=/repo/build-trunk-242408-checking-yes-rtl-df-extra-nographite-aarch64/./gcc/xgcc Target: aarch64-unknown-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --without-cloog --without-ppl --without-isl --with-sysroot=/usr/aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu --with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld --with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-242408-checking-yes-rtl-df-extra-nographite-aarch64 Thread model: posix gcc version 7.0.0 20161115 (experimental) (GCC) I am failing to build the aarch64 crosscompiler with RTL checking enabled due to this.