diff options
| author | Bruce McCulloch <bruce.mcculloch@oracle.com> | 2026-02-05 12:50:28 -0800 |
|---|---|---|
| committer | Nick Alcock <nick.alcock@oracle.com> | 2026-02-27 15:06:41 +0000 |
| commit | 2af278f1235c13065cab88b135878bc144d41e6e (patch) | |
| tree | 44c7ba4036db5dc82fc89d9438e968bb4939f70f /libiberty | |
| parent | 54098e34724fef2ce77f142f81b3015f4a1774b1 (diff) | |
| download | binutils-master.zip binutils-master.tar.gz binutils-master.tar.bz2 | |
This patch removes the constraint that a CTF_F_ARRNELEMS flag has to be
present in order to reverse the elements of an array when dumping. The
flag was never added to GCC, and having this requirement causes more
problems than it solves. A quick recap of the issue:
Given an array int foo[1][2][3], the expected graph is:
int foo[1][2][3] -> int foo[2][3] -> int foo[3] -> int foo
Prior to GCC PR114186, the emitted graph would be:
int foo[1][2][3] -> int foo[1][2] -> int foo[1] -> int foo
Following GCC PR114186, before the libctf fix, the output was:
int foo[3][2][1] -> int foo[3][2] -> int foo[3] -> int foo
So the underlying type graph was correct, but the ordering of elements
was incorrect.
With this fix, we emit correct ordering of the type graph, with no
requirements for the compiler to signal that it has GCC PR114186.
include/
* ctf.h (CTF_F_ARRNELEMS): Delete.
(CTF_F_MAX): Adjust.
libctf/
* ctf-decl.c (ctf_decl_push): Act as if CTF_F_ARRNELEMS is
always set.
* ctf-dump.c (ctf_dump_header): No longer dump its value.
* testsuite/libctf-lookup/multidim-array.c: No longer detect
compilers not emitting this flag (none do).
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions
