https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153
--- Comment #5 from Jonathan Wakely ---
(In reply to Xinmeng Xia from comment #0)
> The following code can be well compiled, however when execute it, GCC
> crashes with segmentation fault.
No, your program crashes, GCC doesn't.
Any use of main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153
--- Comment #4 from Jakub Jelinek ---
The code is invalid both because of the endless recursion into which it runs
and because in C++ main can't be called. See
https://eel.is/c++draft/basic.start.main#3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|WAITING
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153
--- Comment #2 from Martin Liška ---
g++ pr103153.C && valgrind ./a.out
==1687== Memcheck, a memory error detector
==1687== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1687== Using Valgrind-3.17.0.GIT and LibVEX; rerun with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153
Martin Liška changed:
What|Removed |Added
Ever confirmed|0 |1
CC|