This is the mail archive of the gcc-patches@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]

[PATCH] Function Multiversioning Bug, checking for function versions


Hi,

   Currently, function multiversioning determines that two functions
are different by comparing the arch type and isa flags that are set
after the target string is processed. This leads to cases where  the
versions become identical when the command-line target options are
altered.

For example, these two versions:

__attribute__ target (("sse4.2")))
int foo ()
{
}

__attribute__ target (("popcnt")))
int foo ()
{
}

become identical when -mpopcnt and -msse4.2 are used while building,
leading to build errors.

To avoid this, I have modified the function version determination to
just compare the target string.
Patch attached. Is this alright to submit?

Thanks,
-Sri.

Attachment: patch.txt
Description: Text document


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