[Bug c++/57086] New: Internal compiler error: Error reporting routines re-entered.

madars+gccbug at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Apr 26 20:47:00 GMT 2013


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

             Bug #: 57086
           Summary: Internal compiler error: Error reporting routines
                    re-entered.
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: madars+gccbug@gmail.com


The code is obviously wrong, but it shouldn't give ICE.

$ g++ --version | head -1
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

$ g++ -std=c++11 crash.cpp 
crash.cpp:15:35: error: ‘undef_class’ was not declared in this scope
crash.cpp:15:46: error: template argument 1 is invalid
crash.cpp: In member function ‘void p::f2(int)’:
crash.cpp:17:23: error: no matching function for call to ‘begin(int&)’
crash.cpp:17:23: note: candidates are:
In file included from /usr/include/c++/4.7/vector:67:0,
                 from crash.cpp:1:
/usr/include/c++/4.7/bits/range_access.h:87:5: note: template<class _Tp, long
unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
/usr/include/c++/4.7/bits/range_access.h:87:5: note:   template argument
deduction/substitution failed:
crash.cpp:17:23: note:   mismatched types ‘_Tp [_Nm]’ and ‘int’
In file included from /usr/include/c++/4.7/vector:67:0,
                 from crash.cpp:1:
/usr/include/c++/4.7/bits/range_access.h:58:5: note: template<class _Container>
decltype (__cont.begin()) std::begin(const _Container&)
/usr/include/c++/4.7/bits/range_access.h:58:5: note:   template argument
deduction/substitution failed:
/usr/include/c++/4.7/bits/range_access.h: In substitution of ‘template<class
_Container> decltype (__cont.begin()) std::begin(const _Container&) [with
_Container = int]’:
crash.cpp:17:23:   required from here
/usr/include/c++/4.7/bits/range_access.h:58:5: error: request for member
‘begin’ in ‘__cont’, which is of non-class type ‘const int’
/usr/include/c++/4.7/bits/range_access.h:48:5: note: template<class _Container>
decltype (__cont.begin()) std::begin(_Container&)
/usr/include/c++/4.7/bits/range_access.h:48:5: note:   template argument
deduction/substitution failed:
/usr/include/c++/4.7/bits/range_access.h: In substitution of ‘template<class
_Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container
= int]’:
crash.cpp:17:23:   required from here
/usr/include/c++/4.7/bits/range_access.h:48:5: error: request for member
‘begin’ in ‘__cont’, which is of non-class type ‘int’
In file included from /usr/include/c++/4.7/bits/stl_vector.h:64:0,
                 from /usr/include/c++/4.7/vector:65,
                 from crash.cpp:1:
/usr/include/c++/4.7/initializer_list:89:5: note: template<class _Tp> constexpr
const _Tp* std::begin(std::initializer_list<_Tp>)
/usr/include/c++/4.7/initializer_list:89:5: note:   template argument
deduction/substitution failed:
crash.cpp:17:23: note:   mismatched types ‘std::initializer_list<_Tp>’ and
‘int’
crash.cpp:17:23: error: no matching function for call to ‘end(int&)’
crash.cpp:17:23: note: candidates are:
In file included from /usr/include/c++/4.7/vector:67:0,
                 from crash.cpp:1:
/usr/include/c++/4.7/bits/range_access.h:97:5: note: template<class _Tp, long
unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
/usr/include/c++/4.7/bits/range_access.h:97:5: note:   template argument
deduction/substitution failed:
crash.cpp:17:23: note:   mismatched types ‘_Tp [_Nm]’ and ‘int’
In file included from /usr/include/c++/4.7/vector:67:0,
                 from crash.cpp:1:
/usr/include/c++/4.7/bits/range_access.h:78:5: note: template<class _Container>
decltype (__cont.end()) std::end(const _Container&)
/usr/include/c++/4.7/bits/range_access.h:78:5: note:   template argument
deduction/substitution failed:
/usr/include/c++/4.7/bits/range_access.h: In substitution of ‘template<class
_Container> decltype (__cont.end()) std::end(const _Container&) [with
_Container = int]’:
crash.cpp:17:23:   required from here
/usr/include/c++/4.7/bits/range_access.h:78:5: error: request for member ‘end’
in ‘__cont’, which is of non-class type ‘const int’
/usr/include/c++/4.7/bits/range_access.h:68:5: note: template<class _Container>
decltype (__cont.end()) std::end(_Container&)
/usr/include/c++/4.7/bits/range_access.h:68:5: note:   template argument
deduction/substitution failed:
/usr/include/c++/4.7/bits/range_access.h: In substitution of ‘template<class
_Container> decltype (__cont.end()) std::end(_Container&) [with _Container =
int]’:
crash.cpp:17:23:   required from here
/usr/include/c++/4.7/bits/range_access.h:68:5: error: request for member ‘end’
in ‘__cont’, which is of non-class type ‘int’
In file included from /usr/include/c++/4.7/bits/stl_vector.h:64:0,
                 from /usr/include/c++/4.7/vector:65,
                 from crash.cpp:1:
/usr/include/c++/4.7/initializer_list:99:5: note: template<class _Tp> constexpr
const _Tp* std::end(std::initializer_list<_Tp>)
/usr/include/c++/4.7/initializer_list:99:5: note:   template argument
deduction/substitution failed:
crash.cpp:17:23: note:   mismatched types ‘std::initializer_list<_Tp>’ and
‘int’
crash.cpp:17:23: error: unable to deduce ‘auto’ from ‘<expression error>’
In file included from /usr/include/c++/4.7/vector:65:0,
                 from crash.cpp:1:
/usr/include/c++/4.7/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp,
_Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp,
_Alloc>::size_type) [with _Tp = v; _Alloc = std::allocator<v>; std::vector<_Tp,
_Alloc>::reference = v&; std::vector<_Tp, _Alloc>::size_type = long unsigned
int]’:
crash.cpp:11:37:   required from here
/usr/include/c++/4.7/bits/stl_vector.h:751:46: error: invalid use of incomplete
type ‘class v’
crash.cpp:2:7: error: forward declaration of ‘class v’
‘
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/ccUpst6x.out file, please attach this to
your bugreport.


More information about the Gcc-bugs mailing list