From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C62B2384F028; Wed, 2 Jun 2021 11:03:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C62B2384F028 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100872] [OpenMP] internal compiler error: tree check: expected integer_cst, have mult_expr in simd_clone_clauses_extract, at omp-simd-clone.c:253 Date: Wed, 02 Jun 2021 11:03:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: 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: Wed, 02 Jun 2021 11:03:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100872 --- Comment #1 from Tobias Burnus --- The problem is that aligned(a : X * 2) In pt.c's apply_late_template_attributes, we have: > value > value > chain > value op-1: >>>> The comment in apply_late_template_attributes states: /* save_template_attributes puts the dependent attributes at the beginnin= g of the list; find the non-dependent ones. */ for (t =3D attributes; t; t =3D TREE_CHAIN (t)) if (!ATTR_IS_DEPENDENT (t)) break; But as the first item is !ATTR_IS_DEPEND, attributes =3D=3D nondep and the following loop is skipped - also for 'tree_0', which contains our 'omp decl= are simd': for (t =3D attributes; t !=3D nondep; t =3D TREE_CHAIN (t)) { *q =3D tsubst_attribute (t, decl_p, args, complain, in_decl); The latter, i.e. 'tree_0' has a proper 43480 ATTR_IS_DEPENDENT (c) =3D 1; set in cp_parser_late_parsing_omp_declare_simd. However, the problem seems to be that save_template_attributes is never run= for the fndel. * It is run for 'class TVV' itself. * And then there is the call: tsubst_decl -> tsubst_function_decl -> apply_late_template_attributes which has the tree as shown above.=