Two internal clang compiler errors
Two internal clang compiler errors
- Subject: Two internal clang compiler errors
- From: Daniel Vollmer <email@hidden>
- Date: Sun, 11 Aug 2013 11:48:29 +0200
Good day,
while trying some write a generic iterator adapter in C++11, I've hit two internal errors in clang. Unfortunately bugreport.apple.com won't let me log (over the past 2 days with the helpful error message "An error has occured."), so I will try to report here in the mean-time.
As far as I understand, posting these to llvm-bugs is frowned upon because it's an Apple specific release.
One is an internal compiler crash, the other an error with "debug information for (null) is not yet supported".
Xcode Version 4.6.3 (4H1503)
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
1) Internal compiler crash when trying to compile an in-development state of my adapter.
I was trying to get a converting constructor from iterator to const_iterator to work when this crash popped up.
> clang++ -std=c++11 -stdlib=libc++ test.cpp
test.cpp:39:6: error: no matching constructor for initialization of 'It' (aka 'AdaptedIterator<MyMap::iterator, DX::IteratorPassThroughAdapter>')
It conv(CoIt(map.begin()));
^ ~~~~~~~~~~~~~~~~~
./DXIteratorAdapter.hpp:61:3: note: candidate constructor not viable: no known conversion from 'CoIt' (aka 'AdaptedIterator<MyMap::const_iterator, DX::IteratorPassThroughAdapter>') to
'const RealIterator' (aka 'const std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::pair<int, unsigned int>, std::__1::__tree_node<std::__1::pair<int, unsigned int>, void *> *, long>
>') for 1st argument
AdaptedIterator(const RealIterator &realIterator)
^
0 clang 0x0000000100c57bb2 main + 12932498
Stack dump:
<snip more gibberish>
The complete repo is here: http://www.maven.de/code/bugs/clang-425.0.28_crash.zip
I've had quite a few more of these but I suspect they're not all different causes:
10 Aug 20:08 test-rrhUO9.sh
10 Aug 20:13 test-x5bvNZ.sh
10 Aug 20:15 test-yUkZxE.sh
10 Aug 20:16 test-1CMufk.sh
10 Aug 20:16 test-uvZYmk.sh
10 Aug 20:16 test-PUSLEX.sh
10 Aug 20:17 test-j9Wjk9.sh
10 Aug 20:17 test-wHnzEB.sh
10 Aug 20:20 test-IIk5w0.sh
10 Aug 20:20 test-102uzk.sh
10 Aug 20:43 test-2NrkIO.sh
10 Aug 20:44 test-3tcM0a.sh
10 Aug 20:45 test-uu9Kvd.sh
10 Aug 20:45 test-hGEvWW.sh
10 Aug 20:46 test-ByHNku.sh
10 Aug 20:48 test-4yq0BT.sh
10 Aug 21:11 test-5kKttp.sh
10 Aug 21:11 test-2LVlMz.sh
10 Aug 21:23 test-yL3X2s.sh
10 Aug 21:30 test-GbW22d.sh
10 Aug 21:31 test-fq81Um.sh
10 Aug 22:20 test-x4oPNj.sh
10 Aug 22:25 test-kkWNOl.sh
11 Aug 01:45 test-M96v8A.sh
11 Aug 01:46 test-en3gLs.sh
11 Aug 11:26 test-I3JqCP.sh
2) clang compiles the code fine (and it seems to work correctly), but enabling debug symbols with -g results in
> clang++ -std=c++11 -stdlib=libc++ test.cpp -g
error: debug information for (null) is not yet supported
1 error generated.
I've managed to reduce this error to a single cpp-File: http://www.maven.de/code/bugs/clang-debuginfo-null.zip
which when compiled with "clang++ -std=c++11 -stdlib=libc++ test.cpp -g" results in the above message.
It seems to be somehow related to the function template for operator!= using enable_if on the iterator_tag to
determine if the adapter should provide the method or not. If the template machinery is removed and the
function non-templated, then the error seems to vanish.
Thanks for any insight,
Daniel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden