[Bug fortran/58750] Wrong code with realloc on assignment and array constructors with numeric type conversion

adam at aphirst dot karoo.co.uk gcc-bugzilla@gcc.gnu.org
Wed Oct 16 20:46:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58750

--- Comment #8 from Adam Hirst <adam at aphirst dot karoo.co.uk> ---
> Thus, the type conversion during assignement causes the problem. Looking at
> the dump, one sees that the array size is taken from the LHS - which is
> wrong.
> 
> It must be some interaction between array assignment with type conversion
> and array constructors.

Is it part of the specification that it's supposed to use the first argument's
KIND for the rest of the allocate/assign computation (i.e. that the programmer
is _supposed_ to manually ensure that the kinds match in that way), or is this
something that's meant to be handled automatically by the compiler?



More information about the Gcc-bugs mailing list