From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A021D3858434; Sat, 1 Jul 2023 11:37:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A021D3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688211420; bh=g6d8ih4z7TStDRPubI5OPC7//ZtEmka0s054Zduplb0=; h=From:To:Subject:Date:From; b=fvreqyF6NfJ+mVtsX1v7sMW6z9FerGqnEgKQkZyT23/FrH2Ypi6KjCEkThg9caUCu d30OlFipjKQPW1w5xZyMAStyx+5bDkWJoIoePiiLfdtwLt07t0oIX5zLXACgRljY3E lG4SK5NTid9Qa93jtdi2cloECG2T2+FjcyMCrLek= From: "franckbehaghel_gcc at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110510] New: ggc infinite recursion Date: Sat, 01 Jul 2023 11:36:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: franckbehaghel_gcc at protonmail dot com 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 bug_severity priority component assigned_to reporter target_milestone 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110510 Bug ID: 110510 Summary: ggc infinite recursion Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: franckbehaghel_gcc at protonmail dot com Target Milestone: --- Created attachment 55444 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55444&action=3Dedit source Hello, The attached ada source file fails to build. I got the following result: $ gcc -c failed_ggc.adb failed_ggc.adb:3:11: warning: file name does not match unit name, should be "main.adb" [enabled by default] raised STORAGE_ERROR : stack overflow or erroneous memory access Looking into this with gdb, it gaves me more detailed information : $ gcc -c -wrapper gdb,--args failed_ggc.adb [...] Program received signal SIGSEGV, Segmentation fault. 0x00000000010592c3 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0410) at gtype-desc.cc:3582 3582 gt_ggc_m_7rtx_def ((*x).landing_pad); [...] backtrace output looks like a infinite recursion : (gdb) bt #0 0x00000000010592c3 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0410)= at gtype-desc.cc:3582 #1 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0438) at gtype-desc.cc:3579 #2 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0438)= at gtype-desc.cc:3582 #3 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0460) at gtype-desc.cc:3579 #4 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0460)= at gtype-desc.cc:3582 #5 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0488) at gtype-desc.cc:3579 #6 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0488)= at gtype-desc.cc:3582 #7 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e04b0) at gtype-desc.cc:3579 #8 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e04b0)= at gtype-desc.cc:3582 #9 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e04d8) at gtype-desc.cc:3579 #10 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e04d8)= at gtype-desc.cc:3582 #11 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0500) at gtype-desc.cc:3579 #12 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0500)= at gtype-desc.cc:3582 #13 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0528) at gtype-desc.cc:3579 #14 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0528)= at gtype-desc.cc:3582 #15 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0550) at gtype-desc.cc:3579 #16 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0550)= at gtype-desc.cc:3582 #17 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0578) at gtype-desc.cc:3579 #18 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e0578)= at gtype-desc.cc:3582 #19 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e05a0) at gtype-desc.cc:3579 #20 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e05a0)= at gtype-desc.cc:3582 #21 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffd26e05c8) at gtype-desc.cc:3579 (gdb) bt -50 #4193802 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca63= 8c80) at gtype-desc.cc:3582 #4193803 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca638ca8) at gtype-desc.cc= :3579 #4193804 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca63= 8ca8) at gtype-desc.cc:3582 #4193805 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca638cd0) at gtype-desc.cc= :3579 #4193806 0x00000000010592d4 in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca63= 8cd0) at gtype-desc.cc:3582 #4193807 gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca638cf8) at gtype-desc.cc= :3579 #4193808 0x000000000105939c in gt_ggc_mx_eh_landing_pad_d (x_p=3D0x7fffca63= 8cf8) at gtype-desc.cc:3577 #4193809 gt_ggc_mx_eh_region_d (x_p=3D0x7fffd9141738) at gtype-desc.cc:3567 #4193810 0x00000000010593f0 in gt_ggc_mx_eh_region_d (x_p=3D0x7fffd9141738)= at gtype-desc.cc:3562 #4193811 gt_ggc_mx_eh_region_d (x_p=3D0x7fffd91416e0) at gtype-desc.cc:3549 #4193812 0x000000000105a0d0 in gt_ggc_mx_eh_region_d (x_p=3D0x7fffd91416e0)= at gtype-desc.cc:3614 #4193813 gt_ggc_mx_eh_status (x_p=3D0x7fffea7522d0) at gtype-desc.cc:2259 #4193814 0x000000000105cefe in gt_ggc_mx_function (x_p=3D0x7fffe94610b8) at gtype-desc.cc:1720 #4193815 gt_ggc_mx_function (x_p=3D0x7fffe94610b8) at gtype-desc.cc:1715 #4193816 0x0000000000a1fc2a in gt_ggc_mx_lang_tree_node (x_p=3D) at ./gtype-ada.h:288 #4193817 0x0000000000a1fb87 in gt_ggc_mx_lang_tree_node (x_p=3D) at ./gtype-ada.h:277 #4193818 0x0000000000a1f158 in gt_ggc_mx_lang_tree_node (x_p=3D) at ./gtype-ada.h:191 #4193819 0x0000000000a1f5be in gt_ggc_mx_lang_tree_node (x_p=3D) at ./gtype-ada.h:420 #4193820 0x0000000001059cdf in gt_ggc_mx_gimple (x_p=3D) at gtype-desc.cc:1254 #4193821 0x000000000105afba in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1422 #4193822 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193823 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193824 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193825 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193826 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193827 0x000000000105af9e in gt_ggc_mx_cgraph_edge (x_p=3D= ) at gtype-desc.cc:1420 #4193828 0x000000000105ade7 in gt_ggc_mx_symtab_node (x_p=3D= ) at gtype-desc.cc:1368 #4193829 0x0000000000a1f1dd in gt_ggc_mx_lang_tree_node (x_p=3D) at ./gtype-ada.h:200 #4193830 0x0000000001057d1a in gt_ggc_mx_rtx_def (x_p=3D) at gtype-desc.cc:732 #4193831 0x0000000001059724 in gt_ggc_mx (x=3D@0x7fffd57c66b8: 0x7fffdaab88= 10) at gtype-desc.cc:1701 #4193832 gt_ggc_mx (v=3D) at /DATA/git/gcc/gcc/gcc/vec.h:1370 #4193833 gt_ggc_mx_vec_rtx_va_gc_ (x_p=3D0x7fffd57c6000) at gtype-desc.cc:1= 693 #4193834 gt_ggc_mx_vec_rtx_va_gc_ (x_p=3D0x7fffd57c6000) at gtype-desc.cc:1= 688 #4193835 0x0000000000fca426 in ggc_mark_root_tab (rt=3D) at /DATA/git/gcc/gcc/gcc/ggc-common.cc:75 #4193836 0x0000000000fca75d in ggc_mark_roots () at /DATA/git/gcc/gcc/gcc/ggc-common.cc:92 #4193837 0x0000000000decd62 in ggc_collect (mode=3DGGC_COLLECT_HEURISTIC) at /DATA/git/gcc/gcc/gcc/ggc-page.cc:2227 #4193838 0x000000000121d947 in execute_one_pass (pass=3D0x367f170) at /DATA/git/gcc/gcc/gcc/passes.cc:2743 #4193839 0x000000000121da70 in execute_pass_list_1 (pass=3D0x367f170) at /DATA/git/gcc/gcc/gcc/passes.cc:2760 #4193840 0x000000000121da82 in execute_pass_list_1 (pass=3D0x367de90) at /DATA/git/gcc/gcc/gcc/passes.cc:2761 #4193841 0x000000000121daa9 in execute_pass_list (fn=3D0x7fffe94610b8, pass=3D) at /DATA/git/gcc/gcc/gcc/passes.cc:2771 #4193842 0x0000000000e78d86 in cgraph_node::expand (this=3D0x7fffdf8b3990) = at /DATA/git/gcc/gcc/gcc/context.h:48 #4193843 cgraph_node::expand (this=3D0x7fffdf8b3990) at /DATA/git/gcc/gcc/gcc/cgraphunit.cc:1794 #4193844 0x0000000000e79f0a in output_in_order () at /DATA/git/gcc/gcc/gcc/cgraphunit.cc:2191 #4193845 symbol_table::compile (this=3D0x7fffea68d000) at /DATA/git/gcc/gcc/gcc/cgraphunit.cc:2395 #4193846 0x0000000000e7cb58 in symbol_table::compile (this=3D) at /DATA/git/gcc/gcc/gcc/cgraphunit.cc:2583 #4193847 symbol_table::finalize_compilation_unit (this=3D0x7fffea68d000) at /DATA/git/gcc/gcc/gcc/cgraphunit.cc:2583 #4193848 0x0000000001323ce2 in compile_file () at /DATA/git/gcc/gcc/gcc/toplev.cc:471 #4193849 0x00000000009d20ca in do_compile (no_backend=3Dfalse) at /DATA/git/gcc/gcc/gcc/toplev.cc:2126 Version 13.1 is fine. Version 14 until b106f11dc6adb8df15cc5c268896d314c76ca35f "c++: Accept elaborated-enum-base with pedwarn" is fine. Version 14 starting from 154c69039571c66b3a6d16ecfa9e6ff22942f59f "RA: Igno= re conflicts for some pseudos from insns throwing a final exception" are affec= ted by this crash. Compiler Explorer on trunk is affected too. (https://godbolt.org/)=20 gcc -c -I/app/ -g -fdiagnostics-color=3Dalways -S -fverbose-asm -masm=3Dint= el -o /app/example.s -I- gnatmake: "" compilation error example.adb:3:11: warning: file name does not match unit name, should be "main.adb" [enabled by default] raised STORAGE_ERROR : stack overflow or erroneous memory access Compiler returned: 4 Latent bug or side effect excluded, I would say that gcc-14-1891-g154c69039= 57 is the change to blame. I cannot understand just one word of this change. But some skilled gcc maintainers may. Best regards, Franck=