http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57375
Bug ID: 57375 Summary: gnu multiversioning selects different version depending on link order Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mib.bugzilla at gmail dot com With the attached program, a call to multiversioned foo selects either the default or corei7 version, depending on the link order. (Platform is corei7) Is this expected? % /rdrive/ref/gcc/bin/g++48 mv12-aux.cc mv12-aux1.cc mv12.C % ./a.out foo is 7 % /rdrive/ref/gcc/bin/g++48 mv12.C mv12-aux.cc mv12-aux1.cc % ./a.out foo is 0 (The call to foo from different compilation units has different visibility to which versions are available) /rdrive/ref/gcc/bin/g++48 -v Using built-in specs. COLLECT_GCC=/rdrive/ref/gcc/4.8.0/rhel60/efi2/bin/g++ COLLECT_LTO_WRAPPER=/site/spt/rdrive/ref/gcc/4.8.0/rhel60/efi2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /rusers/sys_cron/grab_gcc/downloads_rel/4.8.0/gcc-4.8.0/configure --prefix=/rdrive/ref/gcc/4.8.0/rhel60/efi2 --enable-languages=c,c++,objc,fortran --disable-multilib --enable-bootstrap --target=x86_64-unknown-linux-gnu --disable-bootstrap --enable-decimal-float --with-gmp=/rusers/sys_cron/grab_gcc/downloads_rel/lib/efi2 --with-mpfr=/rusers/sys_cron/grab_gcc/downloads_rel/lib/efi2 --with-mpc=/rusers/sys_cron/grab_gcc/downloads_rel/lib/efi2 Thread model: posix gcc version 4.8.0 (GCC)