GCC 4.4.1 bug? need help isolating problem
Ian Lance Taylor
iant@google.com
Wed Sep 30 00:09:00 GMT 2009
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.
Ian
More information about the Gcc-help
mailing list