This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60906] target attribute causes other attributes to be ignored


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60906

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |tmsriram at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I guess this is not fully specified part of the function multiversioning.
If the attributes other than target attribute are the same on all the decls of
a multiversioned function, then presumably we should just use those attributes
on the compiler-created *.ifunc* too.  The harder question is what to do if
there is any attribute mismatch between the decls, and what kind of comparison
we do perform to check for the attribute equivalence.  We could e.g. error out
on attribute mismatch, but the question is when we do that, it can be done when
parsing the decls, but that has the problem that for multiple decls that are
merged together the attributes are merged too, so we might error out even when
the attributes are added in several consecutive prototypes (the target
attribute for multiversioning would need to be duplicated of course).
Other possibility is to error out when creating the ifunc decl, and compare
e.g. using attribute_list_equal if we temporarily remove the target attribute
first, or add a variant of the attribute_list_equal function that would ignore
the target attribute and look just at all the other attributes.
Or we could merge all the other attributes from all the multiversioned
functions together (not my preference), or somehow choose subset of the
attributes that are the same in between all of the prototypes (again, not my
preference).

Thoughts?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]