From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3A883856DF4; Fri, 17 Jun 2022 19:30:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3A883856DF4 From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106016] [PowerPC] crash with attempt to initialize array of MMA accumulators Date: Fri, 17 Jun 2022 19:30: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: bergner at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Fri, 17 Jun 2022 19:30:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106016 --- Comment #4 from Peter Bergner --- (In reply to Segher Boessenkool from comment #3) > Yeah. It should just return 1 like the other scalar types? So the code did look for OPAQUE_TYPE and expected never to see it, so it wa= s on an error path. I agree with your comment above and I'm guessing we want something like: diff --git a/gcc/expr.cc b/gcc/expr.cc index 78c839ab425..1675198a146 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -6423,13 +6423,13 @@ count_type_elements (const_tree type, bool for_ctor= _p) case OFFSET_TYPE: case REFERENCE_TYPE: case NULLPTR_TYPE: + case OPAQUE_TYPE: return 1; case ERROR_MARK: return 0; case VOID_TYPE: - case OPAQUE_TYPE: case METHOD_TYPE: case FUNCTION_TYPE: case LANG_TYPE:=