[gccsdk] GCC 4.7.4 Rel 1 Dev 2014-01-08: initial comments and feedback.

Duncan Moore duncan.moore at gmx.com
Sun Mar 2 04:18:39 PST 2014


On 28/02/2014 12:32, Lee Noar wrote:
> On 27/02/14 12:18, Duncan Moore wrote:
>> 4) This program loops infinitely:
>>
>> #include <stdio.h>
>> int main(void) {
>>     for (int i=0;i<6;++i)
>>       printf("%i\n",i);
>>     return 0;
>> }
>>
>> *gcc -std=c99 abc.c -O2
>> *a/out
>>
>> -O1 and -O3 are OK!
> I can't reproduce this. I've built using the cross and native compilers
> running under rpcemu, but the program exits correctly.

Can anyone else reproduce the infinite loop? What's the best way to 
resolve this - would the ELF help?

Regards
Duncan





More information about the gcc mailing list