Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 8.3 and 9.1: Internal compiler error in type_dependent_expression_p, at cp/pt.c:25930 #311

Open
mnieper opened this issue Jun 21, 2019 · 3 comments
Labels

Comments

@mnieper
Copy link

mnieper commented Jun 21, 2019

Running make produces the following error with GCC 8.3 and GCC 9.1 on Ubuntu 19.04:

[ 11%] Building CXX object test/iterator/CMakeFiles/iter.operations.dir/operations.cpp.o
In file included from /home/mnieper/github/cmcstl2/include/stl2/detail/range/concepts.hpp:24,
                 from /home/mnieper/github/cmcstl2/include/stl2/detail/iterator/insert_iterators.hpp:21,
                 from /home/mnieper/github/cmcstl2/include/stl2/iterator.hpp:28,
                 from /home/mnieper/github/cmcstl2/include/stl2/view/iota.hpp:16,
                 from /home/mnieper/github/cmcstl2/test/iterator/operations.cpp:13:
/home/mnieper/github/cmcstl2/include/stl2/detail/range/access.hpp: In substitution of ‘template<class R> using __begin_t = decltype (std::experimental::ranges::v1::__cpos::begin(declval<R>())) [with R = std::experimental::ranges::v1::ext::take_exactly_view<std::experimental::ranges::v1::iota_view<int> >&]’:
/home/mnieper/github/cmcstl2/include/stl2/detail/range/concepts.hpp:42:8:   required by substitution of ‘template<class T> using iterator_t = std::experimental::ranges::v1::__begin_t<R&> [with T = std::experimental::ranges::v1::ext::take_exactly_view<std::experimental::ranges::v1::iota_view<int> >]’
/home/mnieper/github/cmcstl2/include/stl2/detail/range/concepts.hpp:138:28:   required from here
/home/mnieper/github/cmcstl2/include/stl2/detail/range/access.hpp:53:19: internal compiler error: in type_dependent_expression_p, at cp/pt.c:25930
   53 |     { __decay_copy(r.begin()) } -> Iterator;
      |       ~~~~~~~~~~~~^~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
make[2]: *** [test/iterator/CMakeFiles/iter.operations.dir/build.make:63: test/iterator/CMakeFiles/iter.operations.dir/operations.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:1975: test/iterator/CMakeFiles/iter.operations.dir/all] Fehler 2
make: *** [Makefile:141: all] Fehler 2

Of course, this is foremost a bug of GCC (because an ICE shouldn't happen). Nevertheless, I am posting it here for two reasons:

  1. As long as the bug is not fixed in GCC, it would be nice to have a workaround.
  2. It is quite hard for me to construct a minimal example exhibiting the bug, which one can submit to the GCC bugtracker. I am hoping that the cmcstl2 team could provide a much better bug report.
@mnieper mnieper changed the title GCC 8.3 and 9.3: Internal compiler error in type_dependent_expression_p, at cp/pt.c:25930 GCC 8.3 and 9.1: Internal compiler error in type_dependent_expression_p, at cp/pt.c:25930 Jun 21, 2019
@cjdb cjdb added the bug label Jun 25, 2019
@cjdb cjdb mentioned this issue Jun 26, 2019
@cjdb
Copy link
Collaborator

cjdb commented Jun 26, 2019

Thanks for filing this! Apparently there are two independent ICEs: one for GCC 8.3 and a completely different one for GCC 9.

  • The GCC 8.3 fix was relatively straightforward as seen in Fixes GCC 8.3 ICE #314 (although further investigation should be made for a minimal repro to send upstream).
  • The GCC 9 ICE is proving to be much more elusive.

@mnieper
Copy link
Author

mnieper commented Jun 26, 2019

Would you be able to report the ICE to the GCC team?

@jicama
Copy link
Contributor

jicama commented Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants