https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96893
--- Comment #2 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei
dot com> ---
(In reply to Richard Biener from comment #1)
> Please provide a script to generate the testcase. A backtrace would be nice
> as well, likely the stack blows up.
cat gen.sh
#!/bin/bash
echo 'int f3000001() { }' > test.c
for i in {300000..1}
do
j=$(($i+1))
echo "void f$i() { printf(\"$i\\n\"); f$j(); }" >> test.c
done
echo "int main(int argc, char** argv){ f1(); }" >> test.c
The script can generate the testcase.