------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-07-08 
09:37 -------
(In reply to comment #1)
> This looks like it's a dupe of 15553
> *** This bug has been marked as a duplicate of 15553 ***

This is not correct - 15553 has been resolved.

The present bug comes about because the scalarizer does not recognise that the 
lvalues in   pts%x =  char2real_1d(tab_c(:,1))  are components in an array of 
derived types.  It instead treats them as an array of reals. This is odd because
  rbuffer = char2real_1d(tab_c(:,1))
  pts%x = rbuffer
works correctly.

There is something screwed up in gfc_trans_arrayfunc_assign that is causing 
this problem.  This can be confirmed by rewriting the two assignments as 
pts%x =  1.0*char2real_1d(tab_c(:,1))
pts%y =  1.0*char2real_1d(tab_c(:,2)), which now works correctly!!

Thus emboldened, I emliminated the branch to gfc_trans_arrayfunc_assign, 
whereupon the bug disappears.  What is this function for?  The rest of 
gfc_trans_assignment does its job correctly.

I will regtest over the weekend and check out whether it is "de-optimising" any 
code or not.


-- 


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

Reply via email to