Re: arm-eabi-gcc with -O2 is wrong code output.

2011-02-07 Thread Andrew Pinski
2011/2/7 Ry deen : > Hi all, > > The code that contains the code shown below is compiled > with arm-eabi-gcc -O2. >        if((aaa_struct *)NULL == aaa) { >                printf("1\n"); >        } >        else { >                printf("2\n"); >        } > >        bbb = aaa->member1; The output

arm-eabi-gcc with -O2 is wrong code output.

2011-02-07 Thread Ry deen
Hi all, The code that contains the code shown below is compiled with arm-eabi-gcc -O2. #include typedef struct { int member1; } aaa_struct; int bbb; void test(aaa_struct *aaa) { if((aaa_struct *)NULL == aaa) { printf("1\n"); } else {