#1417 G++ generates asm listing with duplicate code

OTHER
closed
nobody
gcc (462)
Bug
out-of-date
Unknown
False
2013-02-07
2010-04-12
No

When there is a class/struct within a CPP source G++ generates two copies (exactly the same) of asm code for such a CPP source.

See attached archive. Wihtin bbb.cpp there are two versions of the constructor of the Foo class: called there as 1) ZN3FooC2Ev 2) ZN3FooC1Ev
This does not allow inline asm code with labels to be compilable and possibly increases the size of the output executable.

Compilation command line: g++ -O0 -Wall -c -fmessage-length=0 -save-temps -osrc\bbb.o ..\src\bbb.cpp

Discussion

  • Dzmitry Liauchuk

    The code that reproduces the bug

     
  • Dzmitry Liauchuk

    GCC version:

    Reading specs from C:/Program Files/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
    Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --wi
    th-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --dis
    able-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --d
    isable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --with
    out-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enabl
    e-hash-synchronization --enable-libstdcxx-debug
    Thread model: win32
    gcc version 3.4.5 (mingw-vista special r3)

    GNU ld (GNU Binutils) 2.18.50.20080625

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-07
    • status: open --> closed
    • milestone: --> OTHER
    • type: --> Bug
    • resolution: --> out-of-date
    • category: --> Unknown
    • patch_attached: --> False
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks