[cfe-dev] Failing test SemaCXX/underlying_type.cpp on Mingw/Msys
Douglas Gregor
dgregor at apple.com
Wed May 25 10:57:23 PDT 2011
On May 25, 2011, at 10:26 AM, Eli Friedman wrote:
> On Wed, May 25, 2011 at 10:00 AM, Matthieu Monrocq
> <matthieu.monrocq at gmail.com> wrote:
>> Hello,
>>
>> SemaCXX/underlying_type.cpp fails on Mingw/Msys with the following message:
>>
>> Assertion failed: (PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) ==
>> 0 && "Pointer is not sufficiently aligned", file
>> d:/clang/llvm/include/llvm/ADT/PointerIntPair.h, line 80
>>
>> From this function:
>>
>> void setPointer(PointerTy Ptr) {
>> intptr_t PtrVal
>> = reinterpret_cast<intptr_t>(PtrTraits::getAsVoidPointer(Ptr));
>> assert((PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) == 0 &&
>> "Pointer is not sufficiently aligned");
>> // Preserve all low bits, just update the pointer.
>> Value = PtrVal | (Value & ~PointerBitMask);
>> }
>>
>> I don't know whether the problem only occurs on mingw/msys or also occurs on
>> a "bare" windows system.
>
> Also occurs on bare Windows, at least according to some Apple-internal
> buildbots. A backtrace would be helpful.
>
> This is most likely caused by r132017; Sean, any ideas?
The problem is here:
+ UnaryTransformType *Ty =
+ new UnaryTransformType (BaseType, UnderlyingType, Kind,
+ UnderlyingType->isDependentType() ?
+ QualType() : UnderlyingType);
I believe I've fixed the issue in r132064.
- Doug
More information about the cfe-dev
mailing list