From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC8853858C2C; Fri, 21 Jan 2022 11:31:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC8853858C2C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/104159] ICE: in finalize, at vector-builder.h:513 with -O -fanalyzer Date: Fri, 21 Jan 2022 11:31:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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: Fri, 21 Jan 2022 11:31:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104159 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-01-21 --- Comment #1 from Richard Biener --- 424 break; 425 } 426 427 /* Constants. */ 428 if (tree cst =3D arg->maybe_get_constant ()) 429 if (tree result =3D fold_unary (op, type, cst)) 430 { 431 if (CONSTANT_CLASS_P (result)) 432 return get_or_create_constant_svalue (result); 433 (gdb) p debug_tree (cst) unit-size align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-ty= pe 0x7ffff655f7e0 precision:64 min max pointer_to_this > unsigned V2DI size unit-size align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff66a5348 nunits:2 context > constant npatterns:1 nelts-per-pattern:1 elt:0: constant 0>> $1 =3D void (gdb) p debug_tree (type) unit-size align:32 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type 0x7ffff655f5e8 precision:32 min max pointer_to_this > V1SI size unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff667bbd0 nunits:1 context pointer_to_this > $2 =3D void and using VIEW_CONVERT_EXPR as op. For truncations you should use VEC_PACK_TRUNC, but eventually giving up for not explicitely handled cases would be better. Note the original stmt is _1 =3D VIEW_CONVERT_EXPR(_4); with both _4 and _1 V1SI (signed/unsigned convert), so not sure how we got to V2DI here.=