https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66788

            Bug ID: 66788
           Summary: [5 Regression] Rejects instantiation of class
                    std::deque<long long unsigned int> with -m32
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-*-*

Created attachment 35922
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35922&action=edit
unincluded testcase

The testcase is rejected with GCC 5 and -std=c++11 -m32 with

In file included from
/usr/include/c++/5/x86_64-suse-linux/bits/c++allocator.h:33:0,
                 from /usr/include/c++/5/bits/allocator.h:46,
                 from /usr/include/c++/5/string:41,
                 from
/home/abuild/rpmbuild/BUILD/FreeOCL-0.3.6.svn.397/src/freeocl.h:22,
                 from
/home/abuild/rpmbuild/BUILD/FreeOCL-0.3.6.svn.397/src/freeocl.cpp:18:
/usr/include/c++/5/ext/new_allocator.h: In instantiation of ‘struct
__gnu_cxx::new_allocator<long long unsigned int>’:
/usr/include/c++/5/bits/allocator.h:92:11:   required from ‘class
std::allocator<long long unsigned int>’
/usr/include/c++/5/bits/alloc_traits.h:88:43:   required from ‘struct
std::allocator_traits<std::allocator<long long unsigned int> >’
/usr/include/c++/5/ext/alloc_traits.h:95:10:   required from ‘struct
__gnu_cxx::__alloc_traits<std::allocator<long long unsigned int> >’
/usr/include/c++/5/bits/stl_deque.h:462:21:   required from ‘class
std::_Deque_base<long long unsigned int, std::allocator<long long unsigned int>
>’
/usr/include/c++/5/bits/stl_deque.h:829:11:   required from ‘class
std::deque<long long unsigned int>’
/home/abuild/rpmbuild/BUILD/FreeOCL-0.3.6.svn.397/src/kernel.h:44:43:  
required from here
/usr/include/c++/5/ext/new_allocator.h:93:7: error: ‘const _Tp*
__gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference)
const [with _Tp = long long unsigned int;
__gnu_cxx::new_allocator<_Tp>::const_pointer = const long long unsigned int*;
__gnu_cxx::new_allocator<_Tp>::const_reference = const long long unsigned
int&]’ cannot be overloaded
       address(const_reference __x) const _GLIBCXX_NOEXCEPT
       ^

while it is accepted with GCC 5 and -m64 (or GCC 4.9 and both -m32 and -m64).

Reply via email to