public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug compile/31397] New: arrays with structs with arrays gets the wrong alignment
@ 2024-02-18  2:57 pinskia at gcc dot gnu.org
  2024-02-18  2:57 ` [Bug compile/31397] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-18  2:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31397

            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 

(gdb) expr z[0]._[0] = 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] = 1
(gdb) expr x[0]._[0] = 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-14 15:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-18  2:57 [Bug compile/31397] New: arrays with structs with arrays gets the wrong alignment pinskia at gcc dot gnu.org
2024-02-18  2:57 ` [Bug compile/31397] " pinskia at gcc dot gnu.org
2024-02-18  3:01 ` pinskia at gcc dot gnu.org
2024-02-18  6:59 ` sam at gentoo dot org
2024-02-18 10:23 ` ssbssa at sourceware dot org
2024-02-20 18:25 ` tromey at sourceware dot org
2024-02-22  1:46 ` tromey at sourceware dot org
2024-02-29 22:38 ` cvs-commit at gcc dot gnu.org
2024-03-14 15:56 ` cvs-commit at gcc dot gnu.org
2024-03-14 15:56 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).