https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84942
Bug ID: 84942 Summary: internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vegard.nossum at gmail dot com CC: webrown.cpp at gmail dot com Target Milestone: --- Input: a(__attribute__((b((int)__builtin_inf() * 1ULL / auto)))) Output: $ cc1plus <stdin>:1:41: internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011 0x1f571ab fold_convert_const_int_from_real /home/vegard/git/gcc/gcc/fold-const.c:2011 0x1f571ab fold_convert_const /home/vegard/git/gcc/gcc/fold-const.c:2257 0x1fc4255 const_unop(tree_code, tree_node*, tree_node*) /home/vegard/git/gcc/gcc/fold-const.c:1729 0x1f9aff4 fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*) /home/vegard/git/gcc/gcc/fold-const.c:7737 0x1fa2321 fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*) /home/vegard/git/gcc/gcc/fold-const.c:12282 0xa34f93 cxx_eval_constant_expression /home/vegard/git/gcc/gcc/cp/constexpr.c:4638 0xa4996a cxx_eval_outermost_constant_expr /home/vegard/git/gcc/gcc/cp/constexpr.c:4832 0xa57256 maybe_constant_value(tree_node*, tree_node*) /home/vegard/git/gcc/gcc/cp/constexpr.c:5049 0xab6bea cp_fully_fold(tree_node*) /home/vegard/git/gcc/gcc/cp/cp-gimplify.c:2041 0x13cf877 cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int) /home/vegard/git/gcc/gcc/cp/typeck.c:5391 0x940727 build_new_op_1 /home/vegard/git/gcc/gcc/cp/call.c:6017 0x944116 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) /home/vegard/git/gcc/gcc/cp/call.c:6062 0x1392a6b build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) /home/vegard/git/gcc/gcc/cp/typeck.c:4032 0x10f0d9c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/vegard/git/gcc/gcc/cp/pt.c:17546 0xa5796a fold_non_dependent_expr(tree_node*) /home/vegard/git/gcc/gcc/cp/constexpr.c:5102 0x105112f build_non_dependent_expr(tree_node*) /home/vegard/git/gcc/gcc/cp/pt.c:25305 0x13933bf build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) /home/vegard/git/gcc/gcc/cp/typeck.c:4024 0xec484b cp_parser_binary_expression /home/vegard/git/gcc/gcc/cp/parser.c:9356 0xec62ca cp_parser_assignment_expression /home/vegard/git/gcc/gcc/cp/parser.c:9486 0xed4304 cp_parser_parenthesized_expression_list /home/vegard/git/gcc/gcc/cp/parser.c:7764 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Version: GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)