This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug fortran/32732] [Bind C] Character scalars are passed as arrays


On Fri, Aug 03, 2007 at 03:15:25PM -0600, Christopher D. Rickett wrote:
> 
> the problem this patch addresses is the way character args are passed 
> by-value to a bind(c) procedure.  in non-bind(c), character scalars of any 
> length are passed as an array type, which means an address.  this doesn't 
> work for bind(c) procedures with a character dummy (of len 1) if it's 
> called by a C routine.  C will promote char to an integer type node for 
> passing it as a parameter.  therefore, bind(c) procedures needed to change 
> both the expected type of any by-value character dummies, and the type of 
> the expression for the actual.  i realize that i forgot to put a comment 
> block at the top of gfc_conv_scalar_char_value; that should be done as i'm 
> sure this issue will resurface.
> 
> does that help?  also, i think Steve Kargl was willing/planning to review 
> the patch, so you may need to check with him.
> 

I've been following the iterations between you and Steve E., I'm
somewhat familiar with the testing that's been done.  I can deal
with this patch sometime tomorrow, so if FX beats me to a review
and commit I won't be upset.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]