From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 553643858D34; Thu, 18 Jun 2020 20:10:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 553643858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592511003; bh=4d4YFtCnqSTMN6xwNnnws5W67lZr19PWUgqhLJ7ZXyM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ddA8vpKzhBp+BJNtghnq2QWPyQa6MowJOhPKoWZmkuzJ/2ZjUfqR9lVbBi9dSgWVa IjzQRX8tud/dOUqF4UqbKVEihhKFSKHacda6l1vzowILhAxGuEgZqWeyvyFdhhkt71 2mivQF83SzIxRCRr5/YwoXgsIfmWVzpkAOgfkjHY= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95726] ICE with aarch64 __Float32x4_t as template argument Date: Thu, 18 Jun 2020 20:10:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rsandifo 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: Thu, 18 Jun 2020 20:10:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95726 --- Comment #6 from Jason Merrill --- (In reply to rsandifo@gcc.gnu.org from comment #4) > (In reply to Jakub Jelinek from comment #3) > > But if they mangle differently, then structural_comptypes shouldn't tre= at > > them as same types. Definitely. > That certainly avoids the ICE, and makes GCC's behaviour consistent > with Clang for things like: >=20 > typedef float vecf __attribute__((vector_size(16))); > vecf x; > float32x4_t &y =3D x; >=20 > Previously we accepted this, with the struct_comptypes change > we reject it (like Clang does). But that might break existing > code, so I'm not sure it would be backportable. If necessary we could add a conversion between the pointer-to-vector types. > I guess the question then is: what does TYPE_STRUCTURAL_EQUALITY_P > mean for VECTOR_TYPEs in the context of structural_comptypes? The same thing it means for any other type: setting TYPE_CANONICAL properly= is too hard, so use structural_comptypes. > And (if this is a different question) what case is that function's > VECTOR_TYPE handling for? I.e. when do we want to return true for > a pair of VECTOR_TYPEs whose TYPE_MAIN_VARIANTs are different? We want to return true if they should be considered the same type. Generally, TYPE_MAIN_VARIANT isn't sufficient for checking type identity, a= s it only looks through variants of the outermost type: If I have typedef int myint; typedef myint* myintptr; taking TYPE_MAIN_VARIANT of myintptr gives myint*, not int*. That's why TYPE_CANONICAL was introduced, so we didn't need to do structural comparison whenever we wanted to compare types.=