Index: clang/lib/AST/Interp/Descriptor.cpp =================================================================== --- clang/lib/AST/Interp/Descriptor.cpp +++ clang/lib/AST/Interp/Descriptor.cpp @@ -189,6 +189,11 @@ } static BlockDtorFn getDtorPrim(PrimType Type) { + // Floating types are special. They are primitives, but need their + // destructor called, since they might allocate memory. + if (Type == PT_Float) + return dtorTy::T>; + COMPOSITE_TYPE_SWITCH(Type, return dtorTy, return nullptr); } Index: clang/test/AST/Interp/floats.cpp =================================================================== --- clang/test/AST/Interp/floats.cpp +++ clang/test/AST/Interp/floats.cpp @@ -137,3 +137,7 @@ constexpr A b{12}; static_assert(a.f == 0.0, ""); }; + +namespace LongDouble { + constexpr long double ld = 3.1425926539; +}