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: unassig...@gcc.gnu.org
ReportedBy: madars+gcc...@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 _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
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 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
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 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 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 _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
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 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
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 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 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 ‘’
In file included fro