From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2B787385800B; Tue, 1 Nov 2022 03:23:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B787385800B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667273010; bh=XaNqJ3dfltEznWJ/lrwzRYKHL3v8JdmoAzDLS3tQm1E=; h=From:To:Subject:Date:From; b=IDBWSve1TtSQPE5cgUuEtGT7SaNKdphUY+KcPHXQ3Dd2s/8OifLRqnm49Ce1WN0lf 1dHF7W60G7r0ahjAYto26ADg46e9T1odoxUx5/ZUI2Q6GluetKqjqmjsf1lz1oAb5O OEkIBiG36xJQrjNUlGdhTKjojWgn/i/ycIrlvC9Q= From: "spop at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107485] New: gcc-10 ICE with -fnon-call-exception Date: Tue, 01 Nov 2022 03:23:29 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: spop at gcc dot gnu.org 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107485 Bug ID: 107485 Summary: gcc-10 ICE with -fnon-call-exception Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: spop at gcc dot gnu.org Target Milestone: --- On arm64-linux I see the following crash only on gcc-10. I do not see the ICE on gcc-11, 12, and trunk.=20 $ ~/gcc-10/bld/gcc/cc1plus -fnon-call-exceptions f.ii [...] f.ii:29:23: internal compiler error: Segmentation fault 29 | template void x(double *, b, unsigned long *) { f(); } | ^ 0x134e58b crash_signal ../../gcc/toplev.c:328 0x1639464 tree_vec_extract(gimple_stmt_iterator*, tree_node*, tree_node*, tree_node*, tree_node*) ../../gcc/tree-vect-generic.c:140 0x163ca0f expand_vector_condition ../../gcc/tree-vect-generic.c:1044 0x164081f expand_vector_operations_1 ../../gcc/tree-vect-generic.c:1988 0x16419f7 expand_vector_operations ../../gcc/tree-vect-generic.c:2240 0x1641b3f execute ../../gcc/tree-vect-generic.c:2284 [...] $ cat f.ii typedef long a; typedef double b; typedef struct { a c __attribute__((__vector_size__(32))); b d __attribute__((__vector_size__(32))); } e; __attribute__((__always_inline__)) b f() { e g, h, i; g.c =3D h.d < i.d; } class j { bool k(); }; template void ab(aa, l, n) { int o; typename n::p q; unsigned long r; q(0, o, &r); } namespace s { template void t(j *, long, long, unsigned long *, int u) { n ac; void v(); ab(v, u, ac); } } // namespace s struct w { template void x(double *, b, unsigned long *) { f(); } double ad; void operator()(double, double, unsigned long *) { unsigned long m; x<0>(&ad, 0, &m); } }; using s::t; struct y { using p =3D w; }; long ag, ah; unsigned long ai; double aj; bool j::k() { using n =3D y; t(this, ag, ah, &ai, aj); } git bisect stops on this patch: commit 1e676cfbe1e13fba2c636b560362ed4f0a56893d Author: Richard Biener Date: Mon May 18 08:51:23 2020 +0200 middle-end/95171 - inlining of trapping compare into non-call EH fn This fixes always-inlining across -fnon-call-exception boundaries for conditions which we do not allow to throw. 2020-05-18 Richard Biener PR middle-end/95171 * tree-inline.c (remap_gimple_stmt): Split out trapping compares when inlining into a non-call EH function. * gcc.dg/pr95171.c: New testcase. (cherry picked from commit fe168751c5c1c517c7c89c9a1e4e561d66b24663)=