This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Jun 2017 12:38:15 +0000
- Subject: [Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined
- Auto-submitted: auto-generated
- References: <bug-81111-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81111
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Testcase that ICEs also with -m64:
template <typename V>
struct N
{
static const V m = (((V)(-1) < 0)
? (V)1 << (sizeof(V) * __CHAR_BIT__ - ((V)(-1) < 0))
: (V) 0);
};
template<typename V>
const V N<V>::m;
void
foo ()
{
N<long long>::m;
N<unsigned long long>::m;
#ifdef __SIZEOF_INT128__
N<__int128>::m;
N<unsigned __int128>::m;
#endif
}
I guess we want to create TARGET_EXPR in ubsan_encode_value.