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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> I wonder if it could be reproduced by compiling ComputeLibrary and its
> examples with LTO.

Yes just building upstream version of ComputeLibrary (with some include fixes)
causes the same ICE:
scons extra_cxx_flags="-O3 -g -flto" Werror=1 -j8 debug=0 asserts=1 neon=1 
os=linux arch=armv8.2-a-sve
...
src/cpu/kernels/elementwise_binary/generic/sve/impl.cpp: In function
‘elementwise_arithmetic_op’:
src/cpu/kernels/elementwise_binary/generic/sve/impl.cpp:38: internal compiler
error: tree check: expected function_type or method_type, have integer_type in
function_args_iter_init, at tree.h:5458
   38 | void elementwise_arithmetic_op(
0x20ce39e internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:492
0x8644b2 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.cc:9003
0x8651f2 tree_check2(tree_node const*, char const*, int, char const*,
tree_code, tree_code)
        ../../gcc/tree.h:3940
0x8651f2 function_args_iter_init(function_args_iterator*, tree_node const*)
        ../../gcc/tree.h:5458
0x8651f2 type_argument_type(tree_node const*, unsigned int)
        ../../gcc/tree.cc:6369
0x144ca7a aarch64_sve::gimple_folder::redirect_pred_x()
        ../../gcc/config/aarch64/aarch64-sve-builtins.cc:3545
0x144cbbc aarch64_sve::gimple_folder::redirect_pred_x()
        ../../gcc/config/aarch64/aarch64-sve-builtins.cc:3541
0x144cbbc aarch64_sve::gimple_folder::fold()
        ../../gcc/config/aarch64/aarch64-sve-builtins.cc:3656
0x144cc87 aarch64_sve::gimple_fold_builtin(unsigned int, gimple_stmt_iterator*,
gcall*)
        ../../gcc/config/aarch64/aarch64-sve-builtins.cc:4723
0x1356aaa aarch64_gimple_fold_builtin
        ../../gcc/config/aarch64/aarch64.cc:15645
0xbd7c98 gimple_fold_call
        ../../gcc/gimple-fold.cc:5747
0xbda464 fold_stmt_1
        ../../gcc/gimple-fold.cc:6538
0xfd6917 fold_marked_statements
        ../../gcc/tree-inline.cc:5439
0xfe0e2e optimize_inline_calls(tree_node*)
        ../../gcc/tree-inline.cc:5587
0xcaf26b inline_transform(cgraph_node*)
        ../../gcc/ipa-inline-transform.cc:792
0xe2c5e6 execute_one_ipa_transform_pass
        ../../gcc/passes.cc:2346
0xe2c5e6 execute_all_ipa_transforms(bool)
        ../../gcc/passes.cc:2409
0xa435fd cgraph_node::expand()
        ../../gcc/cgraphunit.cc:1838
0xa435fd cgraph_node::expand()
        ../../gcc/cgraphunit.cc:1798
0xa44a21 expand_all_functions
        ../../gcc/cgraphunit.cc:2028
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: aarch64-linux-gnu-g++ returned 1 exit status
compilation terminated.

Reply via email to