[Bug c++/13725] New: Duplicate constructor/destructor/

rmerkert at alphatech dot com gcc-bugzilla@gcc.gnu.org
Sun Jan 18 00:48:00 GMT 2004


It seems that g++ (3.3.2, 3.3.3, gcc-3.4-20040107) duplicates user defined
constructors, destructors, etc.
Is this supposed to be?

cat > test.cpp <<EOF
struct A {
  A();
  A(const A&);
  A(int);
};


A::A(){}
A::A(const A&) {}
EOF
g++ -S test.cpp


This generates the following assembly code on my system:

        .file   "test.cpp"
        .text
        .align 2
.globl _ZN1AC1ERKS_
        .type   _ZN1AC1ERKS_, @function
_ZN1AC1ERKS_:
.LFB7:
        pushl   %ebp
.LCFI0:
        movl    %esp, %ebp
.LCFI1:
        popl    %ebp
        ret
.LFE7:
        .size   _ZN1AC1ERKS_, .-_ZN1AC1ERKS_
        .align 2
.globl _ZN1AC2ERKS_
        .type   _ZN1AC2ERKS_, @function
_ZN1AC2ERKS_:
.LFB6:
        pushl   %ebp
.LCFI2:
        movl    %esp, %ebp
.LCFI3:
        popl    %ebp
        ret
.LFE6:
        .size   _ZN1AC2ERKS_, .-_ZN1AC2ERKS_
        .align 2
.globl _ZN1AC1Ev
        .type   _ZN1AC1Ev, @function
_ZN1AC1Ev:
.LFB4:
        pushl   %ebp
.LCFI4:
        movl    %esp, %ebp
.LCFI5:
        popl    %ebp
        ret
.LFE4:
        .size   _ZN1AC1Ev, .-_ZN1AC1Ev
        .align 2
.globl _ZN1AC2Ev
        .type   _ZN1AC2Ev, @function
_ZN1AC2Ev:
.LFB3:
        pushl   %ebp
.LCFI6:
        movl    %esp, %ebp
.LCFI7:
        popl    %ebp
        ret
.LFE3:
        .size   _ZN1AC2Ev, .-_ZN1AC2Ev
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4.0 20040107 (experimental)"

-- 
           Summary: Duplicate constructor/destructor/
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmerkert at alphatech dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: gcc-3.4-20040107)
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13725



More information about the Gcc-bugs mailing list