This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85739] internal compiler error: in finish_member_declaration, at cp/semantics.c:3057
- From: "freddie_chopin at op dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 May 2018 09:08:02 +0000
- Subject: [Bug c++/85739] internal compiler error: in finish_member_declaration, at cp/semantics.c:3057
- Auto-submitted: auto-generated
- References: <bug-85739-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85739
Freddie Chopin <freddie_chopin at op dot pl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #44111|0 |1
is obsolete| |
--- Comment #2 from Freddie Chopin <freddie_chopin at op dot pl> ---
Created attachment 44116
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44116&action=edit
reduced and generic test case for gcc 8.1.0
I attach reduced test case for gcc 8.1.0. Interestingly today I cannot
reproduce the error for previous versions of gcc, which means that either I
just got confused yesterday or the triggering code is a bit different. So for
now let's ignore previous versions and focus on gcc 8.1.0.
Using the test case:
-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --
$ g++ --version
g++ (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ -c Scheduler-8.cpp -std=c++14
$ g++ -c Scheduler-8.cpp -std=c++17
Scheduler-8.cpp: In instantiation of ‘class B<l, &l::f>’:
Scheduler-8.cpp:29:20: required from here
Scheduler-8.cpp:3:47: internal compiler error: in finish_member_declaration, at
cp/semantics.c:3057
template <typename a, const int a::*> class B { using e = ptrdiff_t; };
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --