public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "qinzhao at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/97357] New: Unable to coalesce ssa_names which are marked as MUST COALESCE. Date: Fri, 09 Oct 2020 16:33:54 +0000 [thread overview] Message-ID: <bug-97357-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97357 Bug ID: 97357 Summary: Unable to coalesce ssa_names which are marked as MUST COALESCE. Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: qinzhao at gcc dot gnu.org Target Milestone: --- the latest gcc10.2.1 failed with SSA corruption on multiple c modules of our important application on O3. disabling -fsplit-loops cures the failure. I was able to reduce the huge routine to the following simple one to reproduce the failure: #include <setjmp.h> #include <stdlib.h> static void * my_malloc (size_t size); typedef struct glk { struct glk *nxt; } glk; typedef struct Lock { glk ByteLock; } Lock; static Lock *l, *lk; void bytelocks(glk *rethead, jmp_buf jb) { glk *cur, *cur_lk; if (( _setjmp (jb)) == 0) for (cur = &l->ByteLock; cur != ((glk *)0) ; cur = (cur)->nxt) for (cur_lk = &lk->ByteLock; cur_lk != ((glk *)0); cur_lk = cur_lk->nxt) { glk *retrng; if(!rethead) rethead = (glk *) my_malloc (sizeof(glk)); retrng = (glk *) my_malloc (sizeof(glk)); retrng->nxt = rethead; } return; } /home/qinzhao/Install/latest/bin/gcc -O3 t.c t.c:4:15: warning: ‘my_malloc’ used but never defined 4 | static void * my_malloc (size_t size); | ^~~~~~~~~ Unable to coalesce ssa_names 5 and 6 which are marked as MUST COALESCE. rethead_5(ab) and rethead_6(ab) during RTL pass: expand t.c: In function ‘bytelocks’: t.c:17:6: internal compiler error: SSA corruption 17 | void bytelocks(glk *rethead, jmp_buf jb) | ^~~~~~~~~ 0xbcca65 fail_abnormal_edge_coalesce ../../latest_gcc/gcc/tree-ssa-coalesce.c:1003 0xbcca65 coalesce_partitions ../../latest_gcc/gcc/tree-ssa-coalesce.c:1425 0xbcca65 coalesce_ssa_name(_var_map*) ../../latest_gcc/gcc/tree-ssa-coalesce.c:1755 0xb7d597 remove_ssa_form ../../latest_gcc/gcc/tree-outof-ssa.c:1065 0xb7d597 rewrite_out_of_ssa(ssaexpand*) ../../latest_gcc/gcc/tree-outof-ssa.c:1323 0x6fb5d5 execute ../../latest_gcc/gcc/cfgexpand.c:6352 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.
next reply other threads:[~2020-10-09 16:33 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-09 16:33 qinzhao at gcc dot gnu.org [this message] 2020-10-09 16:35 ` [Bug middle-end/97357] " qinzhao at gcc dot gnu.org 2020-10-12 6:23 ` [Bug middle-end/97357] [10 Regression] " rguenth at gcc dot gnu.org 2020-10-12 7:11 ` marxin at gcc dot gnu.org 2020-10-12 8:27 ` cvs-commit at gcc dot gnu.org 2020-10-12 8:28 ` cvs-commit at gcc dot gnu.org 2020-10-12 8:28 ` rguenth at gcc dot gnu.org 2020-10-12 14:09 ` cvs-commit at gcc dot gnu.org 2020-10-12 14:12 ` cvs-commit at gcc dot gnu.org 2020-10-12 16:56 ` qinzhao at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97357-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).