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

Bug#193049: g++-3.3: inlining failure for allocate in ~vector()



Package: g++-3.3
Version: 1:3.3-0pre9
Severity: normal


Hi,

I saw Mark Mitchell's announcement about a final call for tests before
the g++ 3.3 release.  So I did some tests and found that this program
generates warnings whereas it did not with g++ 3.2:

// Compile with: g++-3.3 -O -Winline essai.cpp

#include <vector>

using namespace std;

int main(void)
{
  vector<int> v(10);

}


$ g++-3.3 -O -Winline essai.cpp
essai.cpp: In member function `std::allocator<_Alloc>::~allocator() [with _Tp =
   int]':
essai.cpp:232:   instantiated from `static _Tp* std::__simple_alloc<_Tp, _Alloc>::allocate(unsigned int) [with _Tp = int, _Alloc = std::__default_alloc_template<true, 0>]'
essai.cpp:233:   instantiated from `_Tp* std::_Vector_alloc_base<_Tp, _Allocator, true>::_M_allocate(unsigned int) [with _Tp = int, _Allocator = std::allocator<int>]'
essai.cpp:127:   instantiated from `std::_Vector_base<_Tp, _Alloc>::_Vector_base(unsigned int, typename std::_Vector_alloc_base<_Tp, _Alloc, std::_Alloc_traits<_Tp, _Allocator>::_S_instanceless>::allocator_type&) [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:158:   instantiated from `std::vector<_Tp, _Alloc>::vector(unsigned int) [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:253:   instantiated from here
/usr/include/c++/3.3/bits/stl_alloc.h:388: warning: inlining failed in call to
   `static void* std::__default_alloc_template<__threads,
   __inst>::allocate(unsigned int) [with bool __threads = true, int __inst = 0]
   '
essai.cpp:232: warning: called from here
essai.cpp: In member function `std::_Vector_base<_Tp, _Alloc>::~_Vector_base()
   [with _Tp = int, _Alloc = std::allocator<int>]':
essai.cpp:242:   instantiated from `static void std::__simple_alloc<_Tp, _Alloc>::deallocate(_Tp*, unsigned int) [with _Tp = int, _Alloc = std::__default_alloc_template<true, 0>]'
essai.cpp:242:   instantiated from `void std::_Vector_alloc_base<_Tp, _Allocator, true>::_M_deallocate(_Tp*, unsigned int) [with _Tp = int, _Allocator = std::allocator<int>]'
essai.cpp:130:   instantiated from `std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:253:   instantiated from `std::vector<_Tp, _Alloc>::vector(unsigned int) [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:253:   instantiated from here
/usr/include/c++/3.3/bits/stl_alloc.h:429: warning: inlining failed in call to
   `static void std::__default_alloc_template<__threads,
   __inst>::deallocate(void*, unsigned int) [with bool __threads = true, int
   __inst = 0]'
essai.cpp:242: warning: called from here
essai.cpp: In member function `std::vector<_Tp, _Alloc>::~vector() [with _Tp =
   int, _Alloc = std::allocator<int>]':
essai.cpp:242:   instantiated from `static void std::__simple_alloc<_Tp, _Alloc>::deallocate(_Tp*, unsigned int) [with _Tp = int, _Alloc = std::__default_alloc_template<true, 0>]'
essai.cpp:242:   instantiated from `void std::_Vector_alloc_base<_Tp, _Allocator, true>::_M_deallocate(_Tp*, unsigned int) [with _Tp = int, _Allocator = std::allocator<int>]'
essai.cpp:130:   instantiated from `std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:162:   instantiated from `std::vector<_Tp, _Alloc>::~vector() [with _Tp = int, _Alloc = std::allocator<int>]'
essai.cpp:7:   instantiated from here
/usr/include/c++/3.3/bits/stl_alloc.h:429: warning: inlining failed in call to
   `static void std::__default_alloc_template<__threads,
   __inst>::deallocate(void*, unsigned int) [with bool __threads = true, int
   __inst = 0]'
essai.cpp:242: warning: called from here


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux irancy 2.4.20-1-k7 #1 Sat Mar 22 15:17:52 EST 2003 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages g++-3.3 depends on:
ii  gcc-3.3                      1:3.3-0pre9 The GNU C compiler
ii  gcc-3.3-base                 1:3.3-0pre9 The GNU Compiler Collection (base 
ii  libc6                        2.3.1-17    GNU C Library: Shared libraries an
ii  libstdc++5-3.3-dev           1:3.3-0pre9 The GNU Standard C++ Library v3 (d

-- no debconf information




Reply to: