bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12919] New: icf falis to fold one of the component of std::sor


From: vincenzo.innocente at cern dot ch
Subject: [Bug gold/12919] New: icf falis to fold one of the component of std::sort
Date: Wed, 22 Jun 2011 08:07:04 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12919

           Summary: icf falis to fold one of the component of std::sort
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden


in this simple example below compiled with
 c++ -O2 -Wl,--icf=all,--print-icf-sections -shared -fPIC
-fvisibility-inlines-hidden -ffunction-sections ICFproblem.cpp -o libbha.so
This function does not get folded
void std::__introsort_loop<__gnu_cxx::__normal_iterator<T**, std::vector<T*,
std::allocator<T*> > >, long>(__gnu_cxx::__normal_iterator<T**, std::vector<T*,
std::allocator<T*> > >, __gnu_cxx::__normal_iterator<T**, std::vector<T*,
std::allocator<T*> > >, long)

details after the source code
I'm using
gcc version 4.6.1 20110520 (prerelease) (GCC) 
GNU gold (GNU Binutils 2.21.51.20110514) 1.11


cat ICFproblem.cpp 
#include<vector>
#include<algorithm>

struct A {
 A(float q=0): v(q){} 
 float v;
};
struct B { 
 B(float q=0): v(q){}
 float v;
};
struct C {
 C(double q=0): v(q){}
 double v;
};

std::vector<A*> ap;
std::vector<B*> bp;
std::vector<C*> cp;


void go() {
   std::sort(ap.begin(),ap.end());
   std::sort(bp.begin(),bp.end());
   std::sort(cp.begin(),cp.end());
}


 c++ -O2 -Wl,--icf=all,--print-icf-sections -shared -fPIC
-fvisibility-inlines-hidden -ffunction-sections ICFproblem.cpp -o libbha.so
/afs/cern.ch/user/i/innocent/bin/ld: ICF Converged after 2 iteration(s)
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZNSt6vectorIP1BSaIS1_EED2Ev' in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZNSt6vectorIP1ASaIS1_EED2Ev' in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZNSt6vectorIP1CSaIS1_EED2Ev' in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZNSt6vectorIP1ASaIS1_EED2Ev' in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPP1BSt6vectorIS3_SaIS3_EEEEEvT_S9_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEEEvT_S9_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEEEvT_S9_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEEEvT_S9_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt19__move_median_firstIN9__gnu_cxx17__normal_iteratorIPP1BSt6vectorIS3_SaIS3_EEEEEvT_S9_S9_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt19__move_median_firstIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEEEvT_S9_S9_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt19__move_median_firstIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEEEvT_S9_S9_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt19__move_median_firstIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEEEvT_S9_S9_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPP1BSt6vectorIS3_SaIS3_EEEElS3_EvT_T0_SA_T1_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEElS3_EvT_T0_SA_T1_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section
'.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPP1CSt6vectorIS3_SaIS3_EEEElS3_EvT_T0_SA_T1_'
in file '/tmp/innocent/ccDpI7uD.o'into
'.text._ZSt13__adjust_heapIN9__gnu_cxx17__normal_iteratorIPP1ASt6vectorIS3_SaIS3_EEEElS3_EvT_T0_SA_T1_'
in file '/tmp/innocent/ccDpI7uD.o'
/afs/cern.ch/user/i/innocent/bin/ld: ICF folding section '.text' in file
'/usr/lib/../lib64/crtn.o'into '.text' in file '/tmp/innocent/ccDpI7uD.o'
[vinavx0] ~/public/ctest $ nm -C libbha.so | sort | grep vector
00000000000010c0 W std::vector<A*, std::allocator<A*> >::~vector()
00000000000010c0 W std::vector<A*, std::allocator<A*> >::~vector()
00000000000010c0 W std::vector<B*, std::allocator<B*> >::~vector()
00000000000010c0 W std::vector<B*, std::allocator<B*> >::~vector()
00000000000010c0 W std::vector<C*, std::allocator<C*> >::~vector()
00000000000010c0 W std::vector<C*, std::allocator<C*> >::~vector()
00000000000010e0 W void std::__insertion_sort<__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > > >(__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, __gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >)
00000000000010e0 W void std::__insertion_sort<__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > > >(__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, __gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >)
00000000000010e0 W void std::__insertion_sort<__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > > >(__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >)
00000000000011b0 W void
std::__move_median_first<__gnu_cxx::__normal_iterator<A**, std::vector<A*,
std::allocator<A*> > > >(__gnu_cxx::__normal_iterator<A**, std::vector<A*,
std::allocator<A*> > >, __gnu_cxx::__normal_iterator<A**, std::vector<A*,
std::allocator<A*> > >, __gnu_cxx::__normal_iterator<A**, std::vector<A*,
std::allocator<A*> > >)
00000000000011b0 W void
std::__move_median_first<__gnu_cxx::__normal_iterator<B**, std::vector<B*,
std::allocator<B*> > > >(__gnu_cxx::__normal_iterator<B**, std::vector<B*,
std::allocator<B*> > >, __gnu_cxx::__normal_iterator<B**, std::vector<B*,
std::allocator<B*> > >, __gnu_cxx::__normal_iterator<B**, std::vector<B*,
std::allocator<B*> > >)
00000000000011b0 W void
std::__move_median_first<__gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > > >(__gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**, std::vector<C*,
std::allocator<C*> > >)
00000000000011f0 W void std::__adjust_heap<__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, long,
A*>(__gnu_cxx::__normal_iterator<A**, std::vector<A*, std::allocator<A*> > >,
long, long, A*)
00000000000011f0 W void std::__adjust_heap<__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, long,
B*>(__gnu_cxx::__normal_iterator<B**, std::vector<B*, std::allocator<B*> > >,
long, long, B*)
00000000000011f0 W void std::__adjust_heap<__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, long,
C*>(__gnu_cxx::__normal_iterator<C**, std::vector<C*, std::allocator<C*> > >,
long, long, C*)
00000000000012e0 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, long>(__gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, __gnu_cxx::__normal_iterator<A**,
std::vector<A*, std::allocator<A*> > >, long)
0000000000001430 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, long>(__gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, __gnu_cxx::__normal_iterator<B**,
std::vector<B*, std::allocator<B*> > >, long)
0000000000001580 W void std::__introsort_loop<__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, long>(__gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, __gnu_cxx::__normal_iterator<C**,
std::vector<C*, std::allocator<C*> > >, long)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]