binutils-gdb/libctf/testsuite/libctf-lookup
Bruce McCulloch 2af278f123 libctf: remove CTF_F_ARRNELEMS flag
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).
2026-02-27 15:06:41 +00:00
..
add-to-opened-ctf.c libctf: support addition of types to dicts read via ctf_open() 2024-04-19 16:14:46 +01:00
add-to-opened.c libctf: archive, open: when opening, always set errp to something 2025-05-23 12:34:35 +01:00
add-to-opened.lk libctf: support addition of types to dicts read via ctf_open() 2024-04-19 16:14:46 +01:00
ambiguous-struct-A.c
ambiguous-struct-B.c
ambiguous-struct.c
ambiguous-struct.lk
big-struct-corruption.c libctf: fix querying of large structures 2025-09-25 05:42:27 +01:00
big-struct-corruption.lk libctf: fix querying of large structures 2025-09-25 05:42:27 +01:00
big-struct-ctf.c libctf: fix querying of large structures 2025-09-25 05:42:27 +01:00
conflicting-type-syms-a.c libctf, include: find types of symbols by name 2021-02-20 16:37:08 +00:00
conflicting-type-syms-b.c libctf, include: find types of symbols by name 2021-02-20 16:37:08 +00:00
conflicting-type-syms.c libctf: fix leak in test 2024-04-19 16:14:47 +01:00
conflicting-type-syms.lk libctf, include: find types of symbols by name 2021-02-20 16:37:08 +00:00
enum-ctf-2.c libctf, include: new functions for looking up enumerators 2024-06-18 13:20:32 +01:00
enum-ctf.c
enum-many-ctf.c libctf: eliminate dtd_u, part 4: enums 2021-03-18 12:40:40 +00:00
enum-many.lk libctf: eliminate dtd_u, part 4: enums 2021-03-18 12:40:40 +00:00
enum-symbol-ctf.c
enum-symbol-obj.lk libctf, include: find types of symbols by name 2021-02-20 16:37:08 +00:00
enum-symbol.c libctf, testsuite: fix various warnings in tests 2021-09-27 20:31:26 +01:00
enum-symbol.lk
enum.c
enum.lk
enumerator-iteration.c libctf, include: add ctf_dict_set_flag: less enum dup checking by default 2024-07-31 21:02:05 +01:00
enumerator-iteration.lk libctf, include: new functions for looking up enumerators 2024-06-18 13:20:32 +01:00
lookup.exp Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
multidim-array-ctf.c libctf: fix libctf/testsuite/libctf-lookup/multidim-array on older arches 2025-10-20 11:22:46 +01:00
multidim-array.c libctf: remove CTF_F_ARRNELEMS flag 2026-02-27 15:06:41 +00:00
multidim-array.lk libctf: fix libctf/testsuite/libctf-lookup/multidim-array on older arches 2025-10-20 11:22:46 +01:00
struct-iteration-ctf.c libctf: fix cv-qualified unnamed struct/union field lookup 2025-02-28 14:16:42 +00:00
struct-iteration.c libctf: fix cv-qualified unnamed struct/union field lookup 2025-02-28 14:16:42 +00:00
struct-iteration.lk libctf: fix cv-qualified unnamed struct/union field lookup 2025-02-28 14:16:42 +00:00
struct-lookup.c libctf, include: support unnamed structure members better 2021-01-05 14:53:40 +00:00
struct-lookup.lk libctf, include: support unnamed structure members better 2021-01-05 14:53:40 +00:00
unnamed-field-info-ctf.c libctf: get the offsets of fields of unnamed structs/unions right 2023-03-24 13:37:32 +00:00
unnamed-field-info.c PR 31882 libctf: test suite incorrect format specifiers 2024-06-12 13:16:27 +09:30
unnamed-field-info.lk libctf, tests: do not assume host and target have identical field offsets 2023-04-08 16:07:17 +01:00