diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-01-09 15:37:04 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-01-09 15:37:04 +0100 |
commit | c9fc7f398e8b330ff12ec8a29bfa058b6daf6624 (patch) | |
tree | 77c9765393f5e14f3b9339005ac984afdecdf65c /gcc/tree-vect-loop.cc | |
parent | 80bb94e88faaadd4d6f008fececb46214dc89e9f (diff) | |
download | gcc-c9fc7f398e8b330ff12ec8a29bfa058b6daf6624.zip gcc-c9fc7f398e8b330ff12ec8a29bfa058b6daf6624.tar.gz gcc-c9fc7f398e8b330ff12ec8a29bfa058b6daf6624.tar.bz2 |
c-family: copy attribute diagnostic fixes [PR113262]
The copy attributes is allowed on decls as well as types and even has
checks whether decl (set to *node) is DECL_P or TYPE_P, but for diagnostics
unconditionally uses DECL_SOURCE_LOCATION (decl), which obviously only works
if it applies to a decl.
2024-01-09 Jakub Jelinek <jakub@redhat.com>
PR c/113262
* c-attribs.cc (handle_copy_attribute): Don't use
DECL_SOURCE_LOCATION (decl) if decl is not DECL_P, use input_location
instead. Formatting fixes.
* gcc.dg/pr113262.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions