This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

New test (mainline only)



This test will cause certain 64bit mips platforms to abort.  The code
itself has undefined behavior, but that's no excuse for allowing the
compiler to crash.

I've got a patch to the mips backend to fix this bug, but before submitting
teh fix, I want to review a few things.

        * gcc.c-torture/compile/990617-1.c: New test.


int main()
{
    do {
        long l;
        long *p = &l;
        
        *p = 0x0000000070000000L;
        p += 2;
        {
            unsigned int *addr = (unsigned int *)0x70000000;
            printf("%d, %d\n", addr[1], addr[0]);
        }
        
    } while (1);
}





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]