https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81717
Bug ID: 81717 Summary: [c++ concepts] - simple "define function if not defined" code doesn't compile, no errors generated Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jordok at wp dot pl Target Milestone: --- Created attachment 41925 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41925&action=edit Minimal code to reproduce Simple usage of keyword `requires` (C++ concepts) to define a function only if it's not already defined causes compilation failure. Code attached is a minimal example of situation in which compilation fails, but no error is generated. g++ --version: g++.exe (MinGW.org GCC-6.3.0-1) 6.3.0 OS : Windows 7 (x64) Compiling with command: g++ -Wall -fconcepts source.cpp Which generates no text output and no files. Are generated. Checked also here: http://coliru.stacked-crooked.com/a/16466d6c732d9f21 Same source code compiled with: g++ -std=c++17 -fconcepts -Wall -Wextra main.cpp && ./a.out main.cpp: In function 'bool foo(A)': main.cpp:6:12: warning: unused parameter 'a' [-Wunused-parameter] bool foo(A a) { ^ g++: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. In this IDE (Coliru), g++ --version gives: g++ (GCC) 7.1.0