[Bug c++/88395] ICE: Segmentation fault signal terminated program cc1plus, with -std=c++2a -fconcepts

xerofoify at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Dec 13 10:36:00 GMT 2018


--- Comment #3 from Nicholas Krause <xerofoify at gmail dot com> ---
(In reply to Emmanuel Le Trong from comment #2)
> (In reply to Nicholas Krause from comment #1)
> > First off that's just a valid snippet without a class definition so I was
> > unable to build it against gcc itself to even check this is a bug. Further
> > more can you check this is still happening and if so just report back with
> > the exact code that builds but is giving you a segfault on the trunk branch.
> I'm sorry I don't understand your requests. The compilation of this small
> piece of code causes the compiler (trunk 20181213) to crash, without further
> information.

test.cpp:2:5: error: ‘concept’ does not name a type; did you mean ‘constexpr’?
     concept bool Concept2 = requires (T t, U u)
test.cpp:2:5: note: ‘concept’ only available with -fconcepts
test.cpp:8:5: error: ‘concept’ does not name a type; did you mean ‘constexpr’?
     concept bool Concept = Concept2 <T, T>;
test.cpp:8:5: note: ‘concept’ only available with -fconcepts
test.cpp:12:19: error: ‘Concept’ has not been declared
         template <Concept T>
test.cpp:13:35: error: ‘T’ was not declared in this scope
         constexpr S& operator += (T o);
test.cpp:13:38: error: declaration of ‘operator+=’ as non-function
         constexpr S& operator += (T o);
test.cpp: In function ‘constexpr S operator*(S, S)’:
test.cpp:17:18: error: no match for ‘operator+=’ (operand types are ‘S’ and
         return a += b;

Is what I am getting because I don't have the class definition. I would like
all of the code so that it builds properly and can check against a compiling
working program.

More information about the Gcc-bugs mailing list