diff options
author | Steve Baird <baird@adacore.com> | 2025-01-13 14:18:26 -0800 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2025-06-05 15:30:20 +0200 |
commit | 5738c9b74bd77821b6c7438ea4e5fa1853d3f07a (patch) | |
tree | 042e6139c0758bfdee0e2f70eaa542715b0fb554 /gcc/tree-vectorizer.h | |
parent | 29447fb66f7cf4a515cbbcc812008092d519bc9c (diff) | |
download | gcc-5738c9b74bd77821b6c7438ea4e5fa1853d3f07a.zip gcc-5738c9b74bd77821b6c7438ea4e5fa1853d3f07a.tar.gz gcc-5738c9b74bd77821b6c7438ea4e5fa1853d3f07a.tar.bz2 |
ada: Fix compile-time failure due to duplicated attribute subprograms.
For a given type, and for certain attributes (the 4 streaming attributes
and, for Ada2022, the Put_Image attribute), the compiler needs to keep track
of whether a subprogram has already been generated for the given
type/attribute pair. In some cases this was being done incorrectly;
the compiler ended up generating duplicate subprograms (with the same
name), resulting in compilation failures. This could occur if the prefix
of an attribute reference denoted a subtype (more precisely, a non-first
subtype). This includes the case of a subtype declaration that is implicitly
introduced by the compiler to capture the binding between a formal type
in a generic and the corresponding actual type in an instantiation.
gcc/ada/ChangeLog:
* exp_attr.adb (Expand_N_Attribute_Reference): When accessing the
maps declared in package Cached_Attribute_Ops, the key value
passed to Get or to Set should never be the entity node for a
subtype. Use the entity of the corresponding type declaration
instead.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions