From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57C4E3860776; Sun, 18 Feb 2024 02:57:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57C4E3860776 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708225031; bh=UfVqtKUCIdGt4g0cbzCqUzLZxBj2vLilJ4DkLHoMQfk=; h=From:To:Subject:Date:From; b=FJ/EoHYsWztQzl/GkmrLfOnJW9AJHjnMAa/rqEIQfHr5L5DzJ31jH8Gv1Ja5z3Tmy DnBXz+vziwzGRU5buOhOJaRFRZjO+aU8ZhyEgX0AJMuqQCo/tMHXqW0vMWZPFm/cDJ CpmPS1+5qTu7gxK89S+5ixoG614N+brzzRpPNCdc= From: "pinskia at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug compile/31397] New: arrays with structs with arrays gets the wrong alignment Date: Sun, 18 Feb 2024 02:57:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: compile X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31397 Bug ID: 31397 Summary: arrays with structs with arrays gets the wrong alignment Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: compile Assignee: unassigned at sourceware dot org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- ``` gcc src.c -gdwarf-5 -o a.out && gdb a.out (gdb) b 13 Breakpoint 1 at 0x1170: file src.c, line 13. (gdb) run Starting program: a.out=20 (gdb) expr z[0]._[0] =3D 1 gdb command line:1:1: error: size of array element is not a multiple of its alignment Compilation failed. (gdb) expr y[0]._[0] =3D 1 (gdb) expr x[0]._[0] =3D 1 gdb command line:1:1: error: alignment of array elements is greater than element size Compilation failed. ``` Running with the trunk gcc and the trunk gdb here and this fails. --=20 You are receiving this mail because: You are on the CC list for the bug.=