[Bug debug/121964] aarch64: SVE predicate variables are printed incorrectly
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 19 11:51:42 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121964
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Yury Khrustalev
<ykhrustalev@gcc.gnu.org>:
https://gcc.gnu.org/g:abb54c2cbb1daeb4261e9023d929cc559eb4b901
commit r14-12209-gabb54c2cbb1daeb4261e9023d929cc559eb4b901
Author: Yury Khrustalev <yury.khrustalev@arm.com>
Date: Wed Sep 3 12:46:33 2025 +0100
dwarf: Save bit stride information for array type entry [PR121964]
Lack of DW_AT_bit_stride in a DW_TAG_array_type entry causes GDB to infer
incorrect element size for vector types. The causes incorrect display of
SVE predicate variables as well as out of bounds memory access when reading
contents of SVE predicates from memory in GDB.
We also locate DIE referenced by DW_AT_type and set DW_AT_bit_size 1 in it.
Minor tweak in target flags in tests compared to GCC-15 version.
PR debug/121964
gcc/
* dwarf2out.cc (gen_array_type_die): Add DW_AT_bit_stride attribute
for array types based on element type bit precision for integer and
boolean element types.
gcc/testsuite/
* g++.target/aarch64/dwarf-bit-stride-func.C: New test.
* g++.target/aarch64/dwarf-bit-stride-pragma.C: New test.
* g++.target/aarch64/dwarf-bit-stride-pragma-sme.C: New test.
* g++.target/aarch64/sve/dwarf-bit-stride.C: New test.
* gcc.target/aarch64/dwarf-bit-stride-func.c: New test.
* gcc.target/aarch64/dwarf-bit-stride-pragma.c: New test.
* gcc.target/aarch64/dwarf-bit-stride-pragma-sme.c: New test.
* gcc.target/aarch64/sve/dwarf-bit-stride.c: New test.
(cherry picked from commit ba39d22f0b3f01195d8164649fc025653827f6b6)
More information about the Gcc-bugs
mailing list