------- Comment #5 from hubicka at gcc dot gnu dot org 2010-08-21 08:41 ------- Hmm, I am confused. With my patch for pure constructor removal I get .text .p2align 4,,15 .globl main .type main, @function main: .LFB9: .cfi_startproc movss .LC0(%rip), %xmm0 xorl %eax, %eax mulss _ZN3AvgILi20EE6ResultE(%rip), %xmm0 movss %xmm0, _ZN3AvgILi20EE6ResultE(%rip) ret .cfi_endproc .LFE9: .size main, .-main .p2align 4,,15 .type _GLOBAL__I_main, @function _GLOBAL__I_main: .LFB12: .cfi_startproc cmpb $0, _ZGVN3AvgILi20EE6ResultE(%rip) jne .L2 movb $1, _ZGVN3AvgILi20EE6ResultE(%rip) .L2: rep ret .cfi_endproc .LFE12:
that is there is one static constructor that seems necessary. Is that what expected? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36310