From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A05673858D28; Thu, 28 Apr 2022 19:37:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A05673858D28 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105428] New: compilation never (?) finishes with __builtin_casinl() and __builtin_csqrtl() with -O -mlong-double-128 Date: Thu, 28 Apr 2022 19:37:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog 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: Thu, 28 Apr 2022 19:37:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105428 Bug ID: 105428 Summary: compilation never (?) finishes with __builtin_casinl() and __builtin_csqrtl() with -O -mlong-double-128 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: compile-time-hog, memory-hog 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: x86_64-pc-linux-gnu Created attachment 52900 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52900&action=3Dedit reduced testcase Compiler output: $ /repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc -O -mlong-double-128 testcase.c -wrapper gdb,--args ... ^C Program received signal SIGINT, Interrupt. 0x00007ffff7d91d00 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff7d91d00 in __memset_avx2_unaligned_erms () from /lib64/libc.= so.6 #1 0x0000000000d5f1d0 in memset (__len=3D, __ch=3D0, __dest=3D0x7fe9e27b8018) at /usr/include/bits/string_fortified.h:59 #2 mpfr_add1 (a=3Da@entry=3D0x7fffffffc780, b=3D0x7fffffffc7c0, c=3D, rnd_mode=3DMPFR_RNDA) at /repo/gcc-trunk/mpfr/src/add1.c:151 #3 0x0000000000d5e70d in mpfr_add (a=3Da@entry=3D0x7fffffffc780, b=3Db@entry=3D0x7fffffffc7c0, c=3Dc@entry=3D0x7fffffffc9b0, rnd_mode=3Drnd_mode@entry=3DMPFR_RNDA) at /repo/gcc-trunk/mpfr/src/add.c:120 #4 0x0000000002764e5c in mpc_sqr (rop=3Drop@entry=3D0x7fffffffc880, op=3Dop@entry=3D0x7fffffffc990, rnd=3Drnd@entry=3D0) at /repo/gcc-trunk/mpc/src/sqr.c:269 #5 0x000000000275b1eb in mpc_asin (rop=3Drop@entry=3D0x7fffffffc990, op=3Dop@entry=3D0x7fffffffc990, rnd=3Drnd@entry=3D0) at /repo/gcc-trunk/mpc/src/asin.c:420 #6 0x000000000107147e in do_mpc_arg1 (format=3D0x28c2260 , arg_imag=3D0x7ffff7b6ae20, arg_real=3D0x7ffff7b6ae40, func=3D0x275b0b0 , result_imag=3D0x7fffffffcb20,=20 result_real=3D0x7fffffffcad0) at /repo/gcc-trunk/gcc/fold-const-call.cc= :346 #7 do_mpc_arg1 (result_real=3D0x7fffffffcad0, result_imag=3D0x7fffffffcb20, func=3D0x275b0b0 , arg_real=3D0x7ffff7b6ae40, arg_imag=3D0x7ffff7= b6ae20, format=3D0x28c2260 ) at /repo/gcc-trunk/gcc/fold-const-call.cc:326 #8 0x0000000001073246 in fold_const_call_cc (format=3D, arg_imag=3D, arg_real=3D, fn=3DCFN_BUILT_IN_C= ASINL, result_imag=3D0x7fffffffcb20,=20 result_real=3D0x7fffffffcad0) at /repo/gcc-trunk/gcc/fold-const-call.cc= :1151 #9 fold_const_call_1 (fn=3D, type=3D0x7ffff7a3ff18, arg=3D<= optimized out>) at /repo/gcc-trunk/gcc/fold-const-call.cc:1252 #10 0x00000000018facc6 in gimple_resimplify1 (seq=3D0x0, res_op=3D0x7ffffff= fcd00, valueize=3D0x1516d10 ) at /repo/gcc-trunk/gcc/gimple-match-head.cc:215 #11 0x0000000001934571 in gimple_simplify (stmt=3Dstmt@entry=3D0x7ffff7b853= f0, res_op=3Dres_op@entry=3D0x7fffffffcd00, seq=3Dseq@entry=3D0x0, valueize=3Dvalueize@entry=3D0x1516d10 ,=20 top_valueize=3Dtop_valueize@entry=3D0x1516e00 ) at /repo/gcc-trunk/gcc/gimple-match-head.cc:1113 #12 0x00000000010ad95a in gimple_fold_stmt_to_constant_1 (stmt=3Dstmt@entry=3D0x7ffff7b853f0, valueize=3Dvalueize@entry=3D0x1516e00 ,=20 gvalueize=3Dgvalueize@entry=3D0x1516d10 ) at /repo/gcc-trunk/gcc/gimple-fold.cc:7391 #13 0x0000000001522450 in ccp_fold (stmt=3D0x7ffff7b853f0) at /repo/gcc-trunk/gcc/tree-ssa-ccp.cc:1289 #14 evaluate_stmt (stmt=3D0x7ffff7b853f0) at /repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2208 #15 0x000000000152479e in visit_assignment (stmt=3D0x7ffff7b853f0, output_p=3D0x7fffffffd308) at /repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2841 #16 0x00000000015c4f64 in ssa_propagation_engine::simulate_stmt (this=3D0x7fffffffd3e0, stmt=3D0x7ffff7b853f0) at /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:230 #17 0x00000000015c523b in ssa_propagation_engine::simulate_block (this=3D0x7fffffffd3e0, block=3D0x7ffff7a27270) at /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:337 #18 0x00000000015c5654 in ssa_propagation_engine::ssa_propagate (this=3Dthis@entry=3D0x7fffffffd3e0) at /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:504 #19 0x0000000001516ae1 in do_ssa_ccp (nonzero_p=3Dtrue) at /repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2960 #20 (anonymous namespace)::pass_ccp::execute (this=3D) at /repo/gcc-trunk/gcc/tree-ssa-ccp.cc:3004 #21 0x00000000012f994a in execute_one_pass (pass=3D0x35d7df0) at /repo/gcc-trunk/gcc/passes.cc:2638 #22 0x00000000012fa210 in execute_pass_list_1 (pass=3D0x35d7df0) at /repo/gcc-trunk/gcc/passes.cc:2738 #23 0x00000000012fa222 in execute_pass_list_1 (pass=3D0x35d7cc0) at /repo/gcc-trunk/gcc/passes.cc:2739 #24 0x00000000012fa249 in execute_pass_list (fn=3D0x7ffff7b7f0b8, pass=3D) at /repo/gcc-trunk/gcc/passes.cc:2749 #25 0x0000000000f1efa6 in cgraph_node::expand (this=3D0x7ffff7b80110) at /repo/gcc-trunk/gcc/context.h:48 #26 cgraph_node::expand (this=3D0x7ffff7b80110) at /repo/gcc-trunk/gcc/cgraphunit.cc:1788 #27 0x0000000000f20540 in expand_all_functions () at /repo/gcc-trunk/gcc/cgraphunit.cc:1999 #28 symbol_table::compile (this=3D0x7ffff7a1f000) at /repo/gcc-trunk/gcc/cgraphunit.cc:2349 #29 0x0000000000f23178 in symbol_table::compile (this=3D0x7ffff7a1f000) at /repo/gcc-trunk/gcc/cgraphunit.cc:2262 #30 symbol_table::finalize_compilation_unit (this=3D0x7ffff7a1f000) at /repo/gcc-trunk/gcc/cgraphunit.cc:2530 #31 0x0000000001405890 in compile_file () at /repo/gcc-trunk/gcc/toplev.cc:= 479 #32 0x0000000000d5b7ae in do_compile (no_backend=3Dfalse) at /repo/gcc-trunk/gcc/toplev.cc:2168 #33 toplev::main (this=3Dthis@entry=3D0x7fffffffd65e, argc=3D, argc@entry=3D18, argv=3D, argv@entry=3D0x7fffffffd7a8) at /repo/gcc-trunk/gcc/toplev.cc:2320 #34 0x0000000000d5d6ef in main (argc=3D18, argv=3D0x7fffffffd7a8) at /repo/gcc-trunk/gcc/main.cc:39 (gdb) fini Run till exit from #0 0x00007ffff7d91d00 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6 mpfr_add1 (a=3Da@entry=3D0x7fffffffc780, b=3D0x7fffffffc7c0, c=3D, rnd_mode=3DMPFR_RNDA) at /repo/gcc-trunk/mpfr/src/add1.c:152 152 difn =3D cn; (gdb) fini Run till exit from #0 mpfr_add1 (a=3Da@entry=3D0x7fffffffc780, b=3D0x7ffff= fffc7c0, c=3D, rnd_mode=3DMPFR_RNDA) at /repo/gcc-trunk/mpfr/src/add1= .c:152 0x0000000002764e5c in mpc_sqr (rop=3Drop@entry=3D0x7fffffffc880, op=3Dop@entry=3D0x7fffffffc990, rnd=3Drnd@entry=3D0) at /repo/gcc-trunk/mpc/src/sqr.c:270 270 | mpfr_sub (v, x, mpc_imagref (op), MPFR_RNDA); Value returned is $1 =3D 0 (gdb)=20 Run till exit from #0 0x0000000002764e5c in mpc_sqr (rop=3Drop@entry=3D0x7fffffffc880, op=3Dop@entry=3D0x7fffffffc990, rnd=3Drn= d@entry=3D0) at /repo/gcc-trunk/mpc/src/sqr.c:270 Program terminated with signal SIGKILL, Killed. The program no longer exists. (consumed memory is ~80GiB) $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g= cc COLLECT_LTO_WRAPPER=3D/repo/gcc-trunk/binary-trunk-r13-7-20220428134959-g00= c4405cd7f-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x8= 6_64-pc-linux-gnu/13.0.0/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-r13-7-20220428134959-g00c4405cd7f-= checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220428 (experimental) (GCC)=