This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++-concepts] Trouble bootstrapping concepts branch...


If you're interested, here's an unreviewed patch that will let you
play with more features. This can be applied to a fresh checkout of
the c++-concepts branch.

It adds support for constrained partial specializations, much of the
shorthand notation, and some of the introduction syntax.

Andrew

On Thu, Aug 22, 2013 at 10:57 PM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
> On 08/22/2013 06:17 PM, Andrew Sutton wrote:
>>
>> Sorry for the duplicate send. GMail is misbehaving and caused the
>> message to bounce from the gcc-help list. I thought I'd resend it.
>>
>>
>> I did see this. In fact, I have --disable-libsanitizer in my
>> configuration. So I haven't seen it in a while :/
>>
>> I figured there was a core c++ change that wasn't compatible with that
>> library and it would be fixed in time. I actually spent a little time
>> debugging it and concluded that must have been outside my set of
>> changes. I think this bug report helped me confirm that:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45253
>>
>> It's possible that I'm reusing a field (say DECL_SIZE_UNIT) that is
>> used with bitfield decls in templates, but I couldn't find any
>> evidence supporting that.
>>
>> I'm not sure what a good resolution would be here.
>>
>> Andrew
>>
>> On Thu, Aug 22, 2013 at 6:11 PM, Andrew Sutton
>> <andrew.n.sutton@gmail.com> wrote:
>>>
>>> I did see this. In fact, I have --disable-libsanitizer in my
>>> configuration.
>>> So I haven't seen it in a while :/
>>>
>>> I figured there was a core c++ change that wasn't compatible with that
>>> library and it would be fixed in time. I actually spent a little time
>>> debugging it and concluded that must have been outside my set of changes.
>>> I
>>> think this bug report helped me confirm that:
>>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45253
>>>
>>> It's possible that I'm reusing a field (say DECL_SIZE_UNIT) that is used
>>> with bitfield decls in templates, but I couldn't find any evidence
>>> supporting that.
>>>
>>> I'm not sure what a good resolution would be here.
>>>
>>> Andrew
>>>
>>>
>>> On Thu, Aug 22, 2013 at 5:50 PM, Gabriel Dos Reis
>>> <gdr@integrable-solutions.net> wrote:
>>>>
>>>> Andrew -- are you seeing this too?
>>>>
>>>> -- Gaby
>>>>
>>>> On Thu, Aug 22, 2013 at 10:45 AM, Ed Smith-Rowland <3dw4rd@verizon.net>
>>>> wrote:
>>>>>
>>>>> I checked out a brand new copy of the c++-concepts branch and tried to
>>>>> build.
>>>>> The build breaks in stage1 while trying to build libasan:
>>>>>
>>>>>
>>>>> -----------------------------------------------------------------------------------------------------------
>>>>> make[4]: Leaving directory
>>>>>
>>>>>
>>>>> `/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common'
>>>>> Making all in asan
>>>>> make[4]: Entering directory
>>>>> `/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libsanitizer/asan'
>>>>> /bin/bash ../libtool --tag=CXX --mode=compile
>>>>> /home/ed/obj_concepts/./gcc/xgcc -shared-libgcc
>>>>> -B/home/ed/obj_concepts/./gcc -nostdinc++
>>>>> -L/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libstdc++-v3/src
>>>>> -L/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
>>>>> -B/home/ed/bin_concepts/x86_64-unknown-linux-gnu/bin/
>>>>> -B/home/ed/bin_concepts/x86_64-unknown-linux-gnu/lib/ -isystem
>>>>> /home/ed/bin_concepts/x86_64-unknown-linux-gnu/include -isystem
>>>>> /home/ed/bin_concepts/x86_64-unknown-linux-gnu/sys-include
>>>>> -D_GNU_SOURCE
>>>>> -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>>>>> -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1
>>>>> -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1 -I.
>>>>> -I../../../../gcc_concepts/libsanitizer/asan -I
>>>>> ../../../../gcc_concepts/libsanitizer/include -I
>>>>> ../../../../gcc_concepts/libsanitizer -Wall -W -Wno-unused-parameter
>>>>> -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin
>>>>> -fno-exceptions
>>>>> -fomit-frame-pointer -funwind-tables -fvisibility=hidden
>>>>> -Wno-variadic-macros -I../../libstdc++-v3/include
>>>>> -I../../libstdc++-v3/include/x86_64-unknown-linux-gnu
>>>>> -I../../../../gcc_concepts/libsanitizer/../libstdc++-v3/libsupc++ -g
>>>>> -O2
>>>>> -D_GNU_SOURCE -MT asan_allocator2.lo -MD -MP -MF
>>>>> .deps/asan_allocator2.Tpo
>>>>> -c -o asan_allocator2.lo
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc
>>>>> libtool: compile: /home/ed/obj_concepts/./gcc/xgcc -shared-libgcc
>>>>> -B/home/ed/obj_concepts/./gcc -nostdinc++
>>>>> -L/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libstdc++-v3/src
>>>>> -L/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
>>>>> -B/home/ed/bin_concepts/x86_64-unknown-linux-gnu/bin/
>>>>> -B/home/ed/bin_concepts/x86_64-unknown-linux-gnu/lib/ -isystem
>>>>> /home/ed/bin_concepts/x86_64-unknown-linux-gnu/include -isystem
>>>>> /home/ed/bin_concepts/x86_64-unknown-linux-gnu/sys-include
>>>>> -D_GNU_SOURCE
>>>>> -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>>>>> -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1
>>>>> -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1 -I.
>>>>> -I../../../../gcc_concepts/libsanitizer/asan -I
>>>>> ../../../../gcc_concepts/libsanitizer/include -I
>>>>> ../../../../gcc_concepts/libsanitizer -Wall -W -Wno-unused-parameter
>>>>> -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin
>>>>> -fno-exceptions
>>>>> -fomit-frame-pointer -funwind-tables -fvisibility=hidden
>>>>> -Wno-variadic-macros -I../../libstdc++-v3/include
>>>>> -I../../libstdc++-v3/include/x86_64-unknown-linux-gnu
>>>>> -I../../../../gcc_concepts/libsanitizer/../libstdc++-v3/libsupc++ -g
>>>>> -O2
>>>>> -D_GNU_SOURCE -MT asan_allocator2.lo -MD -MP -MF
>>>>> .deps/asan_allocator2.Tpo
>>>>> -c ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc -fPIC
>>>>> -DPIC
>>>>> -o .libs/asan_allocator2.o
>>>>> In file included from
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_flags.h:16:0,
>>>>> from ../../../../gcc_concepts/libsanitizer/asan/asan_internal.h:15,
>>>>> from ../../../../gcc_concepts/libsanitizer/asan/asan_allocator.h:16,
>>>>> from ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:16:
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc: In
>>>>> member
>>>>> function ‘void
>>>>> __asan::QuarantineCallback::Recycle(__asan::AsanChunk*)’:
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:262:17:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::alloc_tid’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK_NE(m->alloc_tid, kInvalidTid);
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:174:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v1 = (u64)(c1); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:262:5:
>>>>> note:
>>>>> in expansion of macro ‘CHECK_NE’
>>>>> CHECK_NE(m->alloc_tid, kInvalidTid);
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:263:17:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::free_tid’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK_NE(m->free_tid, kInvalidTid);
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:174:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v1 = (u64)(c1); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:263:5:
>>>>> note:
>>>>> in expansion of macro ‘CHECK_NE’
>>>>> CHECK_NE(m->free_tid, kInvalidTid);
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc: In
>>>>> function
>>>>> ‘void* __asan::Allocate(__sanitizer::uptr, __sanitizer::uptr,
>>>>> __sanitizer::StackTrace*, __asan::AllocType)’:
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:364:26:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::alloc_tid’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK_EQ(alloc_tid, m->alloc_tid); // Does alloc_tid fit into the
>>>>> bitfield?
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:175:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v2 = (u64)(c2); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:364:3:
>>>>> note:
>>>>> in expansion of macro ‘CHECK_EQ’
>>>>> CHECK_EQ(alloc_tid, m->alloc_tid); // Does alloc_tid fit into the
>>>>> bitfield?
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc: In
>>>>> function
>>>>> ‘void __asan::Deallocate(void*, __sanitizer::StackTrace*,
>>>>> __asan::AllocType)’:
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:436:15:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::alloc_tid’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK_GE(m->alloc_tid, 0);
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:174:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v1 = (u64)(c1); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:436:3:
>>>>> note:
>>>>> in expansion of macro ‘CHECK_GE’
>>>>> CHECK_GE(m->alloc_tid, 0);
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:438:17:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::free_tid’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK_EQ(m->free_tid, kInvalidTid);
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:174:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v1 = (u64)(c1); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:438:5:
>>>>> note:
>>>>> in expansion of macro ‘CHECK_EQ’
>>>>> CHECK_EQ(m->free_tid, kInvalidTid);
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc: In
>>>>> function
>>>>> ‘__asan::AsanChunk* __asan::GetAsanChunkByAddr(__sanitizer::uptr)’:
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:500:14:
>>>>> error:
>>>>> cannot bind bitfield
>>>>>
>>>>>
>>>>> ‘m->__asan::AsanChunk::<anonymous>.__asan::ChunkBase::<anonymous>.__asan::ChunkHeader::from_memalign’
>>>>> to ‘__sanitizer::u32& {aka unsigned int&}’
>>>>> CHECK(m->from_memalign);
>>>>> ^
>>>>>
>>>>>
>>>>> ../../../../gcc_concepts/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:174:33:
>>>>> note: in definition of macro ‘CHECK_IMPL’
>>>>> __sanitizer::u64 v1 = (u64)(c1); \
>>>>> ^
>>>>> ../../../../gcc_concepts/libsanitizer/asan/asan_allocator2.cc:500:5:
>>>>> note:
>>>>> in expansion of macro ‘CHECK’
>>>>> CHECK(m->from_memalign);
>>>>> ^
>>>>> make[4]: *** [asan_allocator2.lo] Error 1
>>>>> make[4]: Leaving directory
>>>>> `/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libsanitizer/asan'
>>>>> make[3]: *** [all-recursive] Error 1
>>>>> make[3]: Leaving directory
>>>>> `/home/ed/obj_concepts/x86_64-unknown-linux-gnu/libsanitizer'
>>>>> make[2]: *** [all-stage1-target-libsanitizer] Error 2
>>>>> make[2]: Leaving directory `/home/ed/obj_concepts'
>>>>> make[1]: *** [stage1-bubble] Error 2
>>>>> make[1]: Leaving directory `/home/ed/obj_concepts'
>>>>> make: *** [bootstrap] Error 2
>>>>>
>>>>>
>>>>> -----------------------------------------------------------------------------------------------------------
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> I'm not having trouble building building trunk at all.
>>>>>
>>>>> Could this be *Bug 57644*
>>>>> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57644> -[C++1y] Cannot
>>>>> bind
>>>>> bitfield to lvalue reference? The default compiler for concepts branch
>>>>> is
>>>>> c++1y.
>>>>>
>>>>> I'm on x86_64 linux. The system compiler is stock (for ubuntu 13.4
>>>>> Raring):
>>>>>
>>>>> ed@bad-horse:~/obj_concepts$ g++ -v
>>>>> Using built-in specs.
>>>>> COLLECT_GCC=g++
>>>>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
>>>>> Target: x86_64-linux-gnu
>>>>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
>>>>> 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
>>>>> --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
>>>>> --program-suffix=-4.7 --enable-shared --enable-linker-build-id
>>>>> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
>>>>> --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib
>>>>> --enable-nls
>>>>> --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
>>>>> --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
>>>>> --with-system-zlib --enable-objc-gc --with-cloog
>>>>> --enable-cloog-backend=ppl
>>>>> --disable-cloog-version-check --disable-ppl-version-check
>>>>> --enable-multiarch
>>>>> --disable-werror --with-arch-32=i686 --with-abi=m64
>>>>> --with-multilib-list=m32,m64,mx32 --with-tune=generic
>>>>> --enable-checking=release --build=x86_64-linux-gnu
>>>>> --host=x86_64-linux-gnu
>>>>> --target=x86_64-linux-gnu
>>>>> Thread model: posix
>>>>> gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
>>>>>
>>>
>>>
>>>
>>> --
>>> Andrew Sutton
>>> andrew.n.sutton@gmail.com
>>
>>
>>
> Interesting.
> I wonder if http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57644
>            and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45253 are the
> same bug.
>
> In any case, turning off sanitizer libs will alow me to move forward and
> start playing with concepts ;-)
>
> Thanks.
>
> Ed
>



-- 
Andrew Sutton
andrew.n.sutton@gmail.com

Attachment: outclass.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]