[LLVMbugs] [Bug 16166] nested loops produces wrong result at -O3

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 31 11:58:14 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16166

Dara Hazeghi <dhazeghi at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Dara Hazeghi <dhazeghi at yahoo.com> ---
I think I may have submitted the wrong testcase.  This one still fails with
current trunk.


int printf (const char *, ...);
int a, b, c, d, g, h;
int **e;
int f;

void
fn1 ()
{
    for (;; c++)
    {
        if (f)
            for (; a;)
                *e = 0;
        for (; b; b--);
    }
}

int
main ()
{
    h = 22;
    for (; h <= 53; h++)
    {
        d = 0;
        for (; d > -3; d--)
            if (g)
                break;
    }
    printf ("%d\n", d);
    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130531/b84d47f2/attachment.html>


More information about the llvm-bugs mailing list