[Bug target/34341] GCC generates incorrect code on ARM in certain case, resulting in stack corruption

ramana at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed May 13 10:52:00 GMT 2009



------- Comment #1 from ramana at gcc dot gnu dot org  2009-05-13 10:52 -------
I see a problem with your testcase here. r is assigned to h which has not been
initialized if I uncomment the line //r=h as per your comment above.


int test_func(void *p) {
        dummy_func();
        register int r;
        register void *h;
        if (p == 0) {
                return 0;
        }
        //r = (int)h;
        return r;
}

I'm not sure what the bug is here because the testcase doesn't seem reasonable.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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



More information about the Gcc-bugs mailing list