<div class="gmail_quote">2011/5/25 Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
On May 25, 2011, at 10:26 AM, Eli Friedman wrote:<br>
<br>
> On Wed, May 25, 2011 at 10:00 AM, Matthieu Monrocq<br>
> <<a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>> wrote:<br>
>> Hello,<br>
>><br>
>> SemaCXX/underlying_type.cpp fails on Mingw/Msys with the following message:<br>
>><br>
>> Assertion failed: (PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) ==<br>
>> 0 && "Pointer is not sufficiently aligned", file<br>
>> d:/clang/llvm/include/llvm/ADT/PointerIntPair.h, line 80<br>
>><br>
>> From this function:<br>
>><br>
>> void setPointer(PointerTy Ptr) {<br>
>> intptr_t PtrVal<br>
>> = reinterpret_cast<intptr_t>(PtrTraits::getAsVoidPointer(Ptr));<br>
>> assert((PtrVal & ((1 << PtrTraits::NumLowBitsAvailable)-1)) == 0 &&<br>
>> "Pointer is not sufficiently aligned");<br>
>> // Preserve all low bits, just update the pointer.<br>
>> Value = PtrVal | (Value & ~PointerBitMask);<br>
>> }<br>
>><br>
>> I don't know whether the problem only occurs on mingw/msys or also occurs on<br>
>> a "bare" windows system.<br>
><br>
> Also occurs on bare Windows, at least according to some Apple-internal<br>
> buildbots. A backtrace would be helpful.<br>
><br>
> This is most likely caused by r132017; Sean, any ideas?<br>
<br>
<br>
</div></div>The problem is here:<br>
<br>
+ UnaryTransformType *Ty =<br>
+ new UnaryTransformType (BaseType, UnderlyingType, Kind,<br>
+ UnderlyingType->isDependentType() ?<br>
+ QualType() : UnderlyingType);<br>
<br>
I believe I've fixed the issue in r132064.<br>
<br>
- Doug<br>
</blockquote></div><br>I confirm it the problem is solved in r132074 (current ToT), thanks :)<br><br>-- Matthieu<br><br>PS: Sorry for not prodiving a backtrace... I still don't know how to get them under msys which does make it a pain for debugging :/<br>
<br>