[Bug ipa/81128] Function multi-versioning does not work with -O

2017-09-01 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

--- Comment #12 from Billy O'Mahony  ---
Thanks, Martin. That's great. Can you update the ticket with the fixed versions
when you get a chance? 

(In reply to Martin Liška from comment #11)
> (In reply to Billy O'Mahony from comment #10)
> > Hi All,
> > 
> > thanks to Martin, Nathan and Richard for working on and fixing this issue.
> > 
> > Can anyone say if the fix will be back ported to future point releases of
> > the 5.x, 6.x, 7.x versions? 
> > 
> > Regards,
> > Billy
> 
> Well, in general I don't tend to backport multiversioning patches as many
> dependent patches were applied in GCC 8 cycle. But this one is quite
> independent. I'm planning to do backports next week.

[Bug ipa/81128] Function multi-versioning does not work with -O

2017-09-01 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

--- Comment #10 from Billy O'Mahony  ---
Hi All,

thanks to Martin, Nathan and Richard for working on and fixing this issue.

Can anyone say if the fix will be back ported to future point releases of the
5.x, 6.x, 7.x versions? 

Regards,
Billy

[Bug c/81128] Function multi-versioning does not work with -Ofast

2017-06-19 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

--- Comment #3 from Billy O'Mahony  ---
Created attachment 41585
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41585=edit
Preprocessed main file

[Bug c/81128] Function multi-versioning does not work with -Ofast

2017-06-19 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

--- Comment #2 from Billy O'Mahony  ---
COLLECT_GCC=gcc-6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
6.2.0-3ubuntu11~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-6 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04)

[Bug c/81128] Function multi-versioning does not work with -Ofast

2017-06-19 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

Billy O'Mahony  changed:

   What|Removed |Added

 CC||billy.o.mahony at intel dot com

--- Comment #1 from Billy O'Mahony  ---
I see the same behaviour with 5.4.0.

[Bug c/81128] New: Function multi-versioning does not work with -Ofast

2017-06-19 Thread billy.o.mahony at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81128

Bug ID: 81128
   Summary: Function multi-versioning does not work with -Ofast
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: billy.o.mahony at intel dot com
  Target Milestone: ---

Created attachment 41584
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41584=edit
c code

Hi All,

I've been investigating function multi-versioning feature and it works as
expected except when I compile with -Ofast.

When adding -Ofast to the compile what I see is that each time the
multi-versioned function is called is that the *resolver* is called but that
neither of the implementations are called.

Code, build commands and example outputs & .asm attached. 

Regards,
Billy