https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72076
Bug ID: 72076
Summary: cmath: illegal instruction (constexpr)
Product: gcc
Version: 6.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: t.hirsch at web dot de
Target Milestone: ---
Please have a look at line 1468 of /usr/include/c++/6.1.1/cmath:
template<typename _Tp>
constexpr
typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
int>::__type
ilogb(_Tp __x)
{ return __builtin_ilogb(__x); }
The line with a lonely constexpr is causing an "illegal instruction" error when
compiling lib32-llvm-svn on ArchLinux. After joining this line with the one
that follows the problem is fixed. So here's what works:
template<typename _Tp>
constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
int>::__type
ilogb(_Tp __x)
{ return __builtin_ilogb(__x); }