From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC8FA3858D1E; Wed, 9 Feb 2022 18:34:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC8FA3858D1E From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104472] New: ICE: SIGSEGV in cxx_eval_internal_function with __builtin_convertvector() Date: Wed, 09 Feb 2022 18:34:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 18:34:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104472 Bug ID: 104472 Summary: ICE: SIGSEGV in cxx_eval_internal_function with __builtin_convertvector() Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 52397 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52397&action=3Dedit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-g++ -frounding-math testcase.C -wrapper valgrind,-q =3D=3D29185=3D=3D Invalid read of size 2 =3D=3D29185=3D=3D at 0xE39E1F: cxx_eval_internal_function(constexpr_ctx = const*, tree_node*, bool, bool*, bool*) (constexpr.cc:1842) =3D=3D29185=3D=3D by 0xE2D5D6: cxx_eval_call_expression(constexpr_ctx co= nst*, tree_node*, bool, bool*, bool*) (constexpr.cc:2395) =3D=3D29185=3D=3D by 0xE3090C: cxx_eval_constant_expression(constexpr_ct= x const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.cc:6637) =3D=3D29185=3D=3D by 0xE3D247: cxx_eval_binary_expression(constexpr_ctx = const*, tree_node*, bool, bool*, bool*) (constexpr.cc:3337) =3D=3D29185=3D=3D by 0xE302FB: cxx_eval_constant_expression(constexpr_ct= x const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.cc:7014) =3D=3D29185=3D=3D by 0xE34956: cxx_eval_outermost_constant_expr(tree_nod= e*, bool, bool, bool, bool, tree_node*) (constexpr.cc:7709) =3D=3D29185=3D=3D by 0xE3739D: potential_constant_expression_1(tree_node= *, bool, bool, bool, int, tree_node**) (constexpr.cc:9285) =3D=3D29185=3D=3D by 0xE38148: potential_constant_expression_1 (constexp= r.cc:9438) =3D=3D29185=3D=3D by 0xE38148: is_rvalue_constant_expression(tree_node*) (constexpr.cc:9503) =3D=3D29185=3D=3D by 0xF635FC: cp_parser_constant_expression(cp_parser*,= int, bool*, bool) (parser.cc:10663) =3D=3D29185=3D=3D by 0xF636D1: cp_parser_initializer_clause(cp_parser*, = bool*) (parser.cc:25216) =3D=3D29185=3D=3D by 0xF66E5C: cp_parser_initializer(cp_parser*, bool*, = bool*, bool) (parser.cc:25156) =3D=3D29185=3D=3D by 0xF967B3: cp_parser_init_declarator(cp_parser*, int, cp_decl_specifier_seq*, vec*, bool, bool, int, bool*, tree_node**, unsigned int*, tree_node**) (parser.cc:22766) =3D=3D29185=3D=3D Address 0x0 is not stack'd, malloc'd or (recently) free'd =3D=3D29185=3D=3D=20 testcase.C:4:77: internal compiler error: Segmentation fault 4 | V v =3D __builtin_convertvector (__builtin_convertvector ((V){5534}= , F), V) < 8; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^ 0x167637f crash_signal /repo/gcc-trunk/gcc/toplev.cc:322 0xe39e1f cxx_eval_internal_function /repo/gcc-trunk/gcc/cp/constexpr.cc:1842 0xe2d5d6 cxx_eval_call_expression /repo/gcc-trunk/gcc/cp/constexpr.cc:2395 0xe3090c cxx_eval_constant_expression /repo/gcc-trunk/gcc/cp/constexpr.cc:6637 0xe3d247 cxx_eval_binary_expression /repo/gcc-trunk/gcc/cp/constexpr.cc:3337 0xe302fb cxx_eval_constant_expression /repo/gcc-trunk/gcc/cp/constexpr.cc:7014 0xe34956 cxx_eval_outermost_constant_expr /repo/gcc-trunk/gcc/cp/constexpr.cc:7709 0xe3739d potential_constant_expression_1 /repo/gcc-trunk/gcc/cp/constexpr.cc:9285 0xe38148 potential_constant_expression_1(tree_node*, bool, bool, bool, int) /repo/gcc-trunk/gcc/cp/constexpr.cc:9438 0xe38148 is_rvalue_constant_expression(tree_node*) /repo/gcc-trunk/gcc/cp/constexpr.cc:9503 0xf635fc cp_parser_constant_expression /repo/gcc-trunk/gcc/cp/parser.cc:10663 0xf636d1 cp_parser_initializer_clause /repo/gcc-trunk/gcc/cp/parser.cc:25216 0xf66e5c cp_parser_initializer /repo/gcc-trunk/gcc/cp/parser.cc:25156 0xf967b3 cp_parser_init_declarator /repo/gcc-trunk/gcc/cp/parser.cc:22766 0xf710b3 cp_parser_simple_declaration /repo/gcc-trunk/gcc/cp/parser.cc:15286 0xfa16a5 cp_parser_declaration /repo/gcc-trunk/gcc/cp/parser.cc:14972 0xfa211a cp_parser_toplevel_declaration /repo/gcc-trunk/gcc/cp/parser.cc:14993 0xfa211a cp_parser_translation_unit /repo/gcc-trunk/gcc/cp/parser.cc:5012 0xfa211a c_parse_file() /repo/gcc-trunk/gcc/cp/parser.cc:48042 0x10d8b0d c_common_parse_file() /repo/gcc-trunk/gcc/c-family/c-opts.cc:1238 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ x86_64-pc-linux-gnu-g++ -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= ++ COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r12-7128-20220209090954-= gc6bb1db76b3-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc= /x86_64-pc-linux-gnu/12.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=3Dx86_64-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-pc-linux-gnu --with-ld=3D/usr/bin/x86_64-pc-linux-gnu-ld --with-as=3D/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-trunk//binary-trunk-r12-7128-20220209090954-gc6bb1db76= b3-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220209 (experimental) (GCC)=