https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90813
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |segher at gcc dot gnu.org --- Comment #11 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Looking at the generated POWER assembly with -O2 -fverbose-asm (on gcc135), one gets addis 10,2,.LC1@toc@ha # tmp142,, ld 10,.LC1@toc@l(10) # tmp142,, tmp142 which loads gdb with a reasonable-looking address, and then later # proc_ptr_51.f90:35: res => c_() ld 12,0(10) # c_, c_ which loads the value 0x0 into r12, so the later # proc_ptr_51.f90:35: res => c_() mtctr 12 #, branches to a NULL pointer. I don't read POWER assembly all that well (and have no idea what the @toc@ things mean). Segher, could you maybe take a look at what happens here?