From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0E88E384842D; Fri, 9 Jul 2021 14:00:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E88E384842D From: "cnsun at uwaterloo dot ca" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE. Date: Fri, 09 Jul 2021 14:00:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cnsun at uwaterloo dot ca 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 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: Fri, 09 Jul 2021 14:00:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101394 Bug ID: 101394 Summary: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE. Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-lin= ux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/configure --enable-languages=3Dc,c++,lto --enable-checking-yes --enable-multiarch --prefix=3D/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210709 (experimental) [master revision :aa0aefd8a:fdc4d2a516d042bc9a6936fad3f887aff353a296] (GCC) $ cat mutant.c a, b, c, d; e() __attribute__((returns_twice)); f() { int *g =3D c; if (b) { h(); g--; if (a) if (d) h(); } if (g++) e(); c =3D g; } $ gcc-trunk -w -O2 mutant.c Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE. g_10(ab) and g_19(ab) during RTL pass: expand mutant.c: In function =E2=80=98f=E2=80=99: mutant.c:3:1: internal compiler error: SSA corruption 3 | f() { | ^ 0x104b21c fail_abnormal_edge_coalesce /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1003 0x104b21c coalesce_partitions /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1425 0x104b21c coalesce_ssa_name(_var_map*) /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1755 0xfe32a9 remove_ssa_form /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-outof-ssa.c:1065 0xfe32a9 rewrite_out_of_ssa(ssaexpand*) /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-outof-ssa.c:1323 0xa6299a execute /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/cfgexpand.c:6588 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=