FX, That was spot on. If I reduce the test case down to... ! { dg-do run } ! Program to test ASSIGNing a label to common variable. PR18827. program test integer i common i end
I still get the linkage error... gfortran -O3 -g -m64 assign.f90 can't find atom for N_GSYM stabs i:G(0,3) in /var/tmp//cct3ktdf.o This happens with the -g flag and -m64 at all optimization levels. The problem doesn't occur if I don't link the program. The .s for the above file shows... .machine ppc64 .stabs "/Users/howarth/",100,0,7,Ltext0 .stabs "assign.f90",100,0,7,Ltext0 .text Ltext0: .stabs "gcc2_compiled.",60,0,0,0 .align 2 .globl _MAIN__ _MAIN__: .stabd 68,0,3 LFBB1: .stabd 68,0,3 li r3,70 li r4,127 li r5,0 b L__gfortran_set_std$stub .stabs "MAIN__:F(0,1)=(0,1)",36,0,3,_MAIN__ .stabs "void:t(0,1)",128,0,0,0 Lscope1: .stabs "",36,0,0,Lscope1-LFBB1 .comm ___BLNK__,4 .stabs "__BLNK__:G(0,2)=s4i:(0,3)=r(0,3);-2147483648;2147483647;,0,32;;",32,0,3,0 .stabs "int4:t(0,3)",128,0,0,0 .stabs "__BLNK__:G(0,2)",32,0,3,0 .stabs "i:G(0,3)",32,0,4,0 .stabs "",100,0,0,Letext0 Letext0: .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .align 5 L__gfortran_set_std$stub: .indirect_symbol __gfortran_set_std mflr r0 bcl 20,31,"L00000000001$spb" "L00000000001$spb": mflr r11 addis r11,r11,ha16(L__gfortran_set_std$lazy_ptr-"L00000000001$spb") mtlr r0 ldu r12,lo16(L__gfortran_set_std$lazy_ptr-"L00000000001$spb")(r11) mtctr r12 bctr .lazy_symbol_pointer L__gfortran_set_std$lazy_ptr: .indirect_symbol __gfortran_set_std .quad dyld_stub_binding_helper .subsections_via_symbols Geoff, I assume the linker is choking on the line... .stabs "i:G(0,3)",32,0,4,0 ...right? Jack