From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 063A53865479; Tue, 8 Dec 2020 09:59:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 063A53865479 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98192] Double free in SLP Date: Tue, 08 Dec 2020 09:59:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Tue, 08 Dec 2020 09:59:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98192 --- Comment #2 from Martin Li=C5=A1ka --- One more reduced test-case for x86_64-linux-gnu: $ cat skcms.ii template struct VecHelper { typedef T __attribute__((vector_size(N * sizeof(int)))) V; }; template using Vec =3D typename VecHelper::V; template using V =3D Vec<4, T>; using Color =3D float; using F =3D V; using U32 =3D V; template void store(P, T); template D cast(S v) { D d; for (int i =3D 0; i < 4; i++) d[i] =3D v[i]; return d; } F to_fixed_f; U32 exec_ops_dst___trans_tmp_3; void exec_ops_dst() { exec_ops_dst___trans_tmp_3 =3D U32(to_fixed_f); __attribute__((__vector_size__(4 * sizeof(int)))) unsigned __trans_tmp_1 = =3D cast(exec_ops_dst___trans_tmp_3); store(exec_ops_dst, __trans_tmp_1); } $ g++ skcms.ii -c -O3 free(): double free detected in tcache 2 during GIMPLE pass: slp skcms.ii: In function =E2=80=98void exec_ops_dst()=E2=80=99: skcms.ii:18:6: internal compiler error: Aborted 18 | void exec_ops_dst() { | ^~~~~~~~~~~~ 0x10539ef crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:327 0x12e26cb void va_heap::release<_stmt_vec_info*>(vec<_stmt_vec_info*, va_he= ap, vl_embed>*&) /home/marxin/Programming/gcc/gcc/vec.h:316 0x12e26cb vec<_stmt_vec_info*, va_heap, vl_ptr>::release() /home/marxin/Programming/gcc/gcc/vec.h:1832 0x12e26cb _bb_vec_info::~_bb_vec_info() /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:3401 0x12f13c0 vect_slp_region /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4575 0x12f13c0 vect_slp_bbs /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4645 0x12f3a64 vect_slp_function(function*) /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4731 0x12f5732 execute /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1436 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=