public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13725] New: Duplicate constructor/destructor/
@ 2004-01-18  0:48 rmerkert at alphatech dot com
  2004-01-18  0:53 ` [Bug c++/13725] " rmerkert at alphatech dot com
  2004-01-18  2:45 ` giovannibajo at libero dot it
  0 siblings, 2 replies; 3+ messages in thread
From: rmerkert at alphatech dot com @ 2004-01-18  0:48 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/13725] Duplicate constructor/destructor/
  2004-01-18  0:48 [Bug c++/13725] New: Duplicate constructor/destructor/ rmerkert at alphatech dot com
@ 2004-01-18  0:53 ` rmerkert at alphatech dot com
  2004-01-18  2:45 ` giovannibajo at libero dot it
  1 sibling, 0 replies; 3+ messages in thread
From: rmerkert at alphatech dot com @ 2004-01-18  0:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rmerkert at alphatech dot com  2004-01-18 00:53 -------
OOPS - there's a cut and paste error (not that it really changes anything):
The program should be:

struct A {
  A();
  A(const A&);
  A(int);
};


A::A(){}
A::A(const A&) {}
A::A(int) {}


and the output it produces is:

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



-- 


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/13725] Duplicate constructor/destructor/
  2004-01-18  0:48 [Bug c++/13725] New: Duplicate constructor/destructor/ rmerkert at alphatech dot com
  2004-01-18  0:53 ` [Bug c++/13725] " rmerkert at alphatech dot com
@ 2004-01-18  2:45 ` giovannibajo at libero dot it
  1 sibling, 0 replies; 3+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-18  2:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-01-18 02:45 -------


*** This bug has been marked as a duplicate of 3187 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-18  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-18  0:48 [Bug c++/13725] New: Duplicate constructor/destructor/ rmerkert at alphatech dot com
2004-01-18  0:53 ` [Bug c++/13725] " rmerkert at alphatech dot com
2004-01-18  2:45 ` giovannibajo at libero dot it

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).