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



--- Comment #5 from Sriraman Tallam <tmsriram at google dot com> 2012-12-20 
19:36:53 UTC ---

(In reply to comment #4)

> On Thu, Dec 20, 2012 at 1:21 PM, tmsriram at google dot com

> <gcc-bugzi...@gcc.gnu.org> wrote:

> 

> > However, with function multiversioning, this will become a problem as

> > multiversioning does not treat two decls with different target attributes

> > as

> > identical. Since we are enabling multiversioning by default, atleast in

> > C++

> > front-end for now, IMO, it is better to insist that the definition and

> > declaration contain identical target attributes.

> 

> Unfortunately, we cannot do that.  A lot of existing code relies on

> this attribute merging.  The cleanest approach here is probably to add

> an additional 'mv' attribute to explicitly enable multiversioning.

> Breaking the existing semantics is going to break a lot of code.



Ok, just to be clear, there are two problems here:



1) Target attribute merging. If the assumption that the target attributes of

the decls must be merged is valid, there is a bug. Also, this means that using

target attributes to do multiversioning is wrong.



2) Function multiversioning is exposing the bug, via build failures, the

problem of declarations and definitions not having identical target attributes.





First, we need to decide if target attribute merging is a valid assumption. If

so, we fix the bug and make function multiversioning use a new attribute.



If the assumption is not valid, changing the source is the only solution. The

source is invalid now since the intended behaviour is not happening.





> 

> 

> Diego.

Reply via email to