GCC 4.4.1 bug? need help isolating problem

Corey Hickey bugfood-ml@fatooh.org
Wed Sep 30 00:38:00 GMT 2009


Ian Lance Taylor wrote:
> Corey Hickey <bugfood-ml@fatooh.org> writes:
> 
>> The line it complains about is:
>>
>> grow_array((void **)&mkv_d->cluster_positions, mkv_d->num_cluster_pos,
>>     sizeof(uint64_t));
>>
>> Would that indeed be a bug of the sort to which you refer? 
> 
> Yes, that is the kind of thing Andrew meant.  The grow_array function
> is going to change a value of type void*.  When using
> -fstrict-aliasing, the compiler knows that that assignment can not
> change a value of type uint64_t*, such as
> mkv_d->cluster_positions.  So instruction scheduling will be permitted
> to move the use of mkv_d->cluster_positions above the assignment to
> the void* pointer in grow_array.
> 
> This seems consistent with your earlier report since it requires
> function inlining + strict aliasing + instruction scheduling.

That's good to hear. I'll take the discussion over to the MPlayer
development list now.

Thanks again,
Corey



More information about the Gcc-help mailing list