https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89796

--- Comment #3 from Nicholas Krause <xerofoify at gmail dot com> ---
(In reply to Arsène Pérard-Gayot from comment #2)
> (In reply to Nicholas Krause from comment #1)
> > I just compiled this like so:
> > ./bin/g++ test.cpp -fopenmp -Wall -fconcepts -o name test2.cpp 
> > and got this on a build from yesterday:
> > 
> > g++: internal compiler error: Segmentation fault signal terminated program
> > cc1plus
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <https://gcc.gnu.org/bugs/> for instructions.
> > 
> > This code is linked to another version of this
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395 as it crashes before your
> > warning issue. I posted to
> > the list here about a possible fix yesterday for it:
> > 
> > https://gcc.gnu.org/ml/gcc/2019-03/msg00185.html
> 
> Could you please explain the connection with this bug? From what I see, what
> you are reporting here is unrelated to the warning issue, and the
> segmentation fault only occurs because of your use of the "-fconcepts" flag.
> Please correct me if I am wrong.

Yes that's correct. However the problem is that it needs to compile and you
would get this:
test.cpp:2:5: error: ‘concept’ does not name a type
    2 |     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
    8 |     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
   12 |         template <Concept T>
      |                   ^~~~~~~
test.cpp:13:35: error: ‘T’ was not declared in this scope
   13 |         constexpr S& operator += (T o);
      |                                   ^
test.cpp:13:38: error: declaration of ‘operator+=’ as non-function
   13 |         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
‘S’)
   17 |         return a += b;
      |                ~~^~~~
test2.cpp: In member function ‘void S::test(size_t&)’:
test2.cpp:21:21: warning: value computed is not used [-Wunused-value]
   21 |             #pragma omp atomic capture
      |                     ^~~
Therefore it must be build must and that bug fixed first before we take on this
bug unless you can send me a example without concepts required and just openmp
code.

Reply via email to