[cfe-dev] Failing test SemaCXX/underlying_type.cpp on Mingw/Msys

Matthieu Monrocq matthieu.monrocq at gmail.com
Wed May 25 13:03:57 PDT 2011


2011/5/25 Douglas Gregor <dgregor at apple.com>

>
> 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
>

I confirm it the problem is solved in r132074 (current ToT), thanks :)

-- Matthieu

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 :/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110525/3ef7cc8c/attachment.html>


More information about the cfe-dev mailing list