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

            Bug ID: 58249
           Summary: [C++11] internal compiler error with std::vector and
                    deleted copy constructor
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janvidar at extatic dot org

Using a std::vector and adding a type where the copy constructor has been
deleted causes an internal compiler error.

Attached a simple source file that reproduces this on my system (Ubuntu 13.04,
amd64) g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3.


% g++ -c -std=c++11 -Wall -Wextra bug.cpp 
‘
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc9w4AfQ.out file, please attach this to
your bugreport.

If I remove the deleted copy constructor it works correctly as expected.

If I change std::vector to std::list I get the following output:

% g++ -c -std=c++11 -Wall -Wextra bug.cpp
(...)
/usr/include/c++/4.7/bits/stl_list.h:115:71: error: use of deleted function
‘Element::Element(const Element&)’
bug.cpp:8:2: error: declared here

Reply via email to