Hi, On Tue, 7 Jun 2011, Richard Guenther wrote:
> > > fold_convert_loc it to the expected type, while the middle-end has > > > the notion of useless type conversions, fold-const.c is also used by > > > FEs and I think it is expected to have the types exactly matching. > > > So (T)s1[10] instead of s1[10] in this case. > > > > I'm not sure that's a good idea if the caller wants an lvalue. > > Rather build the array-ref with type T directly (thus, with a mismatch > between the type of the array-ref and the element type). Ick. Sooner or later such inconsistency will bite us. It always does. Ciao, Michael.