The code in aarch64_lookup_shared_state_flags all C++11 attributes on the function type
had a namespace associated with them. But with the addition of reproducible/unsequenced,
this is not true.
This fixes the issue by using is_attribute_namespace_p instead of manually figuring out
the namespace is named "arm" and uses get_attribute_name instead of manually grabbing
the attribute name.
Built and tested for aarch64-linux-gnu.
gcc/ChangeLog:
PR target/116598
* config/aarch64/aarch64.cc (aarch64_lookup_shared_state_flags): Use
is_attribute_namespace_p and get_attribute_name instead of manually grabbing
the namespace and name of the attribute.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
{
for (tree attr = attrs; attr; attr = TREE_CHAIN (attr))
{
- if (!cxx11_attribute_p (attr))
+ if (!is_attribute_namespace_p ("arm", attr))
continue;
- auto ns = IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (attr)));
- if (strcmp (ns, "arm") != 0)
- continue;
-
- auto attr_name = IDENTIFIER_POINTER (TREE_VALUE (TREE_PURPOSE (attr)));
+ auto attr_name = IDENTIFIER_POINTER (get_attribute_name (attr));
auto flags = aarch64_attribute_shared_state_flags (attr_name);
if (!flags)
continue;