http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47028

           Summary: [4.6 Regression] gcc.dg/tree-ssa/tailrecursion-[57].c
                    FAIL with -foptimize-sibling-calls
                    -fno-forward-propagate -fno-tree-copy-prop
                    -fno-tree-dominator-opts
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 22832
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22832
reduced testcase

Output:
$ gcc -O -foptimize-sibling-calls -fno-forward-propagate -fno-tree-copy-prop
-fno-tree-dominator-opts pr47028.c
$ ./a.out 
Aborted

At the assembly level, fib() is reduced to "return 1;":
fib:
    mov    eax, 0    # add_acc.0,
    add    eax, 1    # tmp73,
    ret

it seems to first appear in the pr47028.c.179r.combine dump

Tested revision:
r168061 - fail
r165699 - fail
r161659 - OK
4.5 r168062 -OK

Reply via email to