From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A1E183858C53; Tue, 13 Sep 2022 10:40:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1E183858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663065634; bh=yZ+O3VHjW+tghDnA3/0X/WgfrbQlk1YOmR2yv18DfEI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wMygJ8sT6HGHVDRk+j9uZ6vZkHYS0jHEC1NRSAQW7V2DxGHngX3YVtdA3Za83Uhnf x+4pO+k0eP4okAR2rCpe9yGBCyJw4TlHiMdIDFdal2VKT8w3MvzyiXF2uHyCB+NdYm 5gYlBDuvkaemxGV7o1XMG/PT71MiYGa5/b+IGTq4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104482] ICE: Segmentation fault (in rs6000_builtin_type_compatible), or ICE: tree check: expected class 'type', have 'reference' (attr_addr_expr) in cp_type_quals, at cp/typeck.cc:10955 Date: Tue, 13 Sep 2022 10:40:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104482 --- Comment #5 from CVS Commits --- The master branch has been updated by Kewen Lin : https://gcc.gnu.org/g:38db48346cc045ed5656233c42d01d6d06bffc35 commit r13-2643-g38db48346cc045ed5656233c42d01d6d06bffc35 Author: Kewen Lin Date: Tue Sep 13 04:14:23 2022 -0500 rs6000: Fix the check of bif argument number [PR104482] As PR104482 shown, it's one regression about the handlings when the argument number is more than the one of built-in function prototype. The new bif support only catches the case that the argument number is less than the one of function prototype, but it misses the case that the argument number is more than the one of function prototype. Because it uses "n !=3D expected_args", n is updated in for (n =3D 0; !VOID_TYPE_P (TREE_VALUE (fnargs)) && n < nargs; fnargs =3D TREE_CHAIN (fnargs), n++) , it's restricted to be less than or equal to expected_args with the guard !VOID_TYPE_P (TREE_VALUE (fnargs)), so it's wrong. The fix is to use nargs instead, also move the checking hunk's location ahead to avoid useless further scanning when the counts mismatch. PR target/104482 gcc/ChangeLog: * config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin= ): Fix the equality check for argument number, and move this hunk ahea= d. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr104482.c: New test.=