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

--- Comment #2 from Soumya AR <soumyaa at gcc dot gnu.org> ---
Related: Using the C division operator with svfloat ICEs with g++ but not gcc.

Testcase:

#include <arm_sve.h>

svfloat16_t foo(svfloat16_t x) { return x / 4; }

Backtrace:

test2.cpp: In function ‘svfloat16_t foo(svfloat16_t)’:
test2.cpp:12:14: sorry, unimplemented: unexpected AST of kind
vec_duplicate_expr
   12 |   return x / 4;
      |              ^
test2.cpp:12:14: internal compiler error: in potential_constant_expression_1,
at cp/constexpr.cc:10763
0x2687e7b internal_error(char const*, ...)
        ../../gcc_src/gcc/diagnostic-global-context.cc:517
0x84b19f fancy_abort(char const*, int, char const*)
        ../../gcc_src/gcc/diagnostic.cc:1722
0x8db7bf potential_constant_expression_1
        ../../gcc_src/gcc/cp/constexpr.cc:10763
0x8dc10b potential_constant_expression_1(tree_node*, bool, bool, bool, bool,
int)
        ../../gcc_src/gcc/cp/constexpr.cc:10786
0x8dc10b is_constant_expression(tree_node*)
        ../../gcc_src/gcc/cp/constexpr.cc:10860
0x8dc10b is_nondependent_constant_expression(tree_node*)
        ../../gcc_src/gcc/cp/constexpr.cc:10904
0x8dd933 maybe_constant_value(tree_node*, tree_node*, mce_value)
        ../../gcc_src/gcc/cp/constexpr.cc:9243
0x9b59ab fold_for_warn(tree_node*)
        ../../gcc_src/gcc/cp/expr.cc:419
0xbf8f77 cp_build_binary_op(op_location_t const&, tree_code, tree_node*,
tree_node*, int)
        ../../gcc_src/gcc/cp/typeck.cc:5601
0x888deb build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
        ../../gcc_src/gcc/cp/call.cc:7568
0xbe3d13 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
        ../../gcc_src/gcc/cp/typeck.cc:4794
0xa86cff cp_parser_binary_expression
        ../../gcc_src/gcc/cp/parser.cc:10818
0xa87e53 cp_parser_assignment_expression
        ../../gcc_src/gcc/cp/parser.cc:10979
0xa883e3 cp_parser_expression
        ../../gcc_src/gcc/cp/parser.cc:11162
0xa9ad8f cp_parser_jump_statement
        ../../gcc_src/gcc/cp/parser.cc:15179
0xa9ad8f cp_parser_statement
        ../../gcc_src/gcc/cp/parser.cc:13000
0xa9df03 cp_parser_statement_seq_opt
        ../../gcc_src/gcc/cp/parser.cc:13697
0xa9e1c7 cp_parser_compound_statement
        ../../gcc_src/gcc/cp/parser.cc:13544
0xac96f3 cp_parser_function_body
        ../../gcc_src/gcc/cp/parser.cc:26495
0xac96f3 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc_src/gcc/cp/parser.cc:26546

Reply via email to