[Bug tree-optimization/90567] GCC bad optimization on recursive functions

2019-05-21 Thread msmaldi at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90567 --- Comment #4 from msmaldi --- -O2 generate better results, but gcc 7 continue faster gcc-7 with -O3 real0m3,143s user0m3,119s sys 0m0,008s gcc-8 with -O2 real0m4,802s user0m4,793s sys 0m0,009s gcc 7 assembly generated

[Bug c/90567] New: GCC bad optimization on recursive functions

2019-05-21 Thread msmaldi at hotmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: msmaldi at hotmail dot com Target Milestone: --- consider code: int fibo (int n) { if (n == 1 || n == 2) return 1; else return fibo(n - 1) + fibo(n - 2); } int main() { printf ("%d\n"