https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #47 from Mike Lothian <mike at fireburn dot co.uk> ---
With the patch you've committed to gcc master, applied on top of GCC 7.3 I'm
now seeing the following error building Clang:

[294/954] /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Serialization
-I/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/lib/Serialization
-I/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include -Iinclude
-I/usr/lib/llvm/7/include  -DNDEBUG -O2 -march=native -pipe
-mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register
-fpermissive -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual
-fno-strict-aliasing -pedantic -Wno-long-long -fPIC -MD -MT
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o -MF
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o.d -o
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o -c
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/lib/Serialization/ASTReader.cpp
FAILED: lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -m32 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -Ilib/Serialization
-I/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/lib/Serialization
-I/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include -Iinclude
-I/usr/lib/llvm/7/include  -DNDEBUG -O2 -march=native -pipe
-mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register
-fpermissive -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual
-fno-strict-aliasing -pedantic -Wno-long-long -fPIC -MD -MT
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o -MF
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o.d -o
lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.o -c
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/lib/Serialization/ASTReader.cpp
In file included from
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/APValue.h:20:0,
                 from
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/Decl.h:17,
                 from
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/DeclObjC.h:17,
                 from
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/Serialization/ASTReader.h:17,
                 from
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/lib/Serialization/ASTReader.cpp:14:
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h: In instantiation of ‘struct
llvm::PointerIntPairInfo<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*>, 2,
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> > >’:
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:56:57:   required from
‘PointerTy llvm::PointerIntPair<PointerTy, IntBits, IntType, PtrTraits,
Info>::getPointer() const [with PointerTy =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; IntType = unsigned int; PtrTraits
= llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; Info =
llvm::PointerIntPairInfo<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*>, 2,
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> > >]’
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/Decl.h:2859:39:
  required from here
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:132:3: error: static
assertion failed: PointerIntPair with integer size too large for pointer
   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
   ^~~~~~~~~~~~~
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:147:42: warning: left shift
count >= width of type [-Wshift-count-overflow]
     ShiftedIntMask = (uintptr_t)(IntMask << IntShift)
                                 ~~~~~~~~~^~~~~~~~~~~~
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:147:42: warning: right
operand of shift expression ‘(3 << 4294967295)’ is >= than the precision of the
left operand [-fpermissive]
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h: In instantiation of ‘static
intptr_t llvm::PointerIntPairInfo<PointerT, IntBits,
PtrTraits>::getInt(intptr_t) [with PointerT =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; PtrTraits =
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; intptr_t = int]’:
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:58:56:   required from
‘IntType llvm::PointerIntPair<PointerTy, IntBits, IntType, PtrTraits,
Info>::getInt() const [with PointerTy =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; IntType = unsigned int; PtrTraits
= llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; Info =
llvm::PointerIntPairInfo<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*>, 2,
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> > >]’
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/Decl.h:2897:32:
  required from here
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:156:19: warning: right shift
count >= width of type [-Wshift-count-overflow]
     return (Value >> IntShift) & IntMask;
            ~~~~~~~^~~~~~~~~~~~
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h: In instantiation of ‘static
intptr_t llvm::PointerIntPairInfo<PointerT, IntBits,
PtrTraits>::updateInt(intptr_t, intptr_t) [with PointerT =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; PtrTraits =
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; intptr_t = int]’:
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:73:28:   required from ‘void
llvm::PointerIntPair<PointerTy, IntBits, IntType, PtrTraits,
Info>::setPointerAndInt(PointerTy, IntType) [with PointerTy =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; IntType = unsigned int; PtrTraits
= llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; Info =
llvm::PointerIntPairInfo<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*>, 2,
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> > >]’
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:51:21:   required from
‘llvm::PointerIntPair<PointerTy, IntBits, IntType, PtrTraits,
Info>::PointerIntPair(PointerTy, IntType) [with PointerTy =
llvm::PointerUnion<clang::TypeSourceInfo*, std::pair<clang::TypeSourceInfo*,
clang::QualType>*>; unsigned int IntBits = 2; IntType = unsigned int; PtrTraits
= llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> >; Info =
llvm::PointerIntPairInfo<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*>, 2,
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::TypeSourceInfo*,
std::pair<clang::TypeSourceInfo*, clang::QualType>*> > >]’
/var/tmp/portage/sys-devel/clang-9999/work/x/y/clang-9999/include/clang/AST/Decl.h:2831:33:
  required from here
/usr/lib/llvm/7/include/llvm/ADT/PointerIntPair.h:173:52: warning: left shift
count >= width of type [-Wshift-count-overflow]
     return (OrigValue & ~ShiftedIntMask) | IntWord << IntShift;
                                            ~~~~~~~~^~~~~~~~~~~

Reply via email to