https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126628

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
>gcc-15 seems to have a regression in the way how PMF are populated inside an 
>initializer_list when the PMF function is dllimport: afaict the 
>initializer_list will populate the pointers before the dll resolution occurs

There was a change in GCC 15 to make initializer_list array constant (read
only). This sounds like the wrong section is being used for constant arrays of
(dll_import) function pointers in general.  


Does it happen if you simple things like:
typedef void (*fp)(void);
const fp array[] = {func1, func2, func3};

[[gnu::noipa]]
const fp *g()
{
  return array;
}

And then use g() ?

Reply via email to