This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]