From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A70F385E02B; Sun, 18 Feb 2024 02:06:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A70F385E02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708221990; bh=TY31dWvpo0QMhDTeFpQXKDUhlYCObcXNiTxoCdKHrHc=; h=From:To:Subject:Date:From; b=aYylE6dClEgsAg+Hx8eH+PuCo49nE+fKfknAEK94XZA3arMh4qH3kv1C4qgU2iThV U0GnOdPrOpFdODS0/RTSIY45ZO3f/hxPJ6ZtuJiADkurRv9s1TJGvfSujAHSxiJiMK UenSiiV9uMS8tXwyAWsFMwSx2xeec+YhqFLSIbco= From: "tsqurt at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/113977] New: debug info for alignment of structure is unspecified Date: Sun, 18 Feb 2024 02:06:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tsqurt at outlook dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D113977 Bug ID: 113977 Summary: debug info for alignment of structure is unspecified Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: tsqurt at outlook dot com Target Milestone: --- Created attachment 57454 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57454&action=3Dedit src.c GCC does not generate complete debug information for my C code when generat= ing debug information. The alignment requirement for my structures is 1, but the debugger believes their alignment requirement is 8 (which is likely inherit= ed from the default structure alignment requirement on the platform).=20 I'm using the AMD64 instruction set, and the operating system is Ubuntu 20.= 04.6 LTS on Windows Subsystem for Linux. To reproduce this issue, follow these steps with the attached code: 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 Breakpoint 1, main () at src.c:13 13 return 0; (gdb) expr z[0]._[0] =3D 1 (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. (gdb)=20 GDB reports that the alignment requirement for these structures is 8, but i= t is 1.=