From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 359EB3842433; Tue, 22 Sep 2020 14:35:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 359EB3842433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600785313; bh=HfqtAMa7+xVSiEOdPERwjx3gcn2KO1tbeZ7HK27B6lA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tK9ZLiO5jLkdTBRigjVtAiAaQ1buGEAxyWUbbtGk0THADYdD8YeqSdDMmW235Xga6 yaiQT3e5EV5pntOA+RqYQGqehCji2mcFLzyB88A8xj9W+aAmSbyIi5DBAplYH9a0S5 gsGp0V2CPCwIgcdrGWuFsdtwJlAqlLKThCJ0B9Qg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97164] [8/9/10/11 Regression] incorrect offset on structure member where type of that member has aligned attribute Date: Tue, 22 Sep 2020 14:35:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 8.5 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: Tue, 22 Sep 2020 14:35:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97164 --- Comment #5 from Jakub Jelinek --- Indeed, if in the above testcase one uses b[40] instead of b[64], then it is rejected with that error message. Note, this isn't a FE diagnostics, but stor-layout.c one. We won't be able to diagnose this if the element is variable length, but at least diagnosing it for for the constant sizes might be sufficient, variable length structures are except for maybe Ada very rarely used.=