This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19661] New: many redundant atexit calls emitted into the executable for static objects with empty destructors
- From: "yuri at tsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2005 22:24:30 -0000
- Subject: [Bug c++/19661] New: many redundant atexit calls emitted into the executable for static objects with empty destructors
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When some object having empty destructor is declared as static in the local
context of some function g++ still inserts <atexit> call with the empty handler
like <__tcf_0> below.
It may seem like minor issue but redundant instructions increase chances for
I-cache misses and worthen processor pipeline.
Yuri
08048800 <__tcf_0>:
8048800: 55 push %ebp
8048801: 89 e5 mov %esp,%ebp
8048803: 5d pop %ebp
8048804: c3 ret
--testcase--
begin 644 case-empty-atexit.tgz
M'XL(`.1G^4$``^V6VVJ#0!"&O=ZG&-*;))!D/:Q>)!1"GV31:2.83=`U&$KZ
M[!U-BI)#<U%)"YT/85?\]Z#C/[.Q+G""ZZW=3[3%*K4SIW>D#&2D%+5*JLBG
M5DHW4$U[PG&E&X5>Z(>^YTC7#X/(`=7_5BXI"ZMS`&=?YNEWN@1WF&VVC]C2
M(XDOXE]-7WI>0[I2AD%P,_X4^:_XUW\`Z0//"QV0/>_C*O\\_D(\I2;.R@1A
M4$U7`R&PLI@;V&W2!,H"AZ.Y$/2-;!K#$C3=B+5.S7`$[P(@WI06%@L8H*%1
M@[J+)LGF].@TMJ/)4.^PHSF(WWY[YIK_5SVO<<__7NM_GZ2-_U7$_G\$'?\O
MTDUA<]3K9U$6J7D#H]=8;'6,4-BDR0)Y&5O*`K7SEW4&:+V]I*XY"C!I/0X'
MDC:IY-6<#Z`$<:[\.,XZ&W=D"5Y..YZ1_##G_/%CKOA_0H'I]0QPM_Y+U=;_
M*"*]HHO]_PANE?]CJ6\/`8WGN\<``#VM/<UEG&$8AF$8AF$8AF$8AF$8AF$8
-AF'^#)_;GM5=`"@`````
`
end
--
Summary: many redundant atexit calls emitted into the executable
for static objects with empty destructors
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: n/a
GCC target triplet: n/a
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661