This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [PATCH,fortran] fix iso_c_binding only clause bug


hi Tobias,

If you are looking for more C interoperability-related bugs:


[ISO C Binding] Accepts character with len /= 1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32599

This is something which should be rejected for -std=f2003; it should be
easy using "gfc_notify_std (GFC_STD_F2003, ..." I think one can allow it
by default, but I don't mind always rejecting it.Note: using "call foo("abcdef"//C_CHAR_NULL)" works with
"character(len=0),dimension(*)" per F2003 standard, which is implemented
in gfortran. Thus prohibiting it completely would also be ok.

i agree that this should be an error w/ -std=f2003, but having it error for std=gnu or by default seems harsh to me. i know of at least one other compiler that allows it. if acceptable, i'll add the std=f2003
check for the error.


[ISO Bind C] Access to private components not prevented
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32601

I don't care whether one allows it for -std=gnu or not. Allowing it (for
-std=gnu) is ok as one can use it for "print *" debugging. However, if one
wants to allow it, one should some testing to make sure one does not get
ICEs. The PR contains also an example which triggers an internal compiler
error.

this i also think could be useful for -std=gnu, but for standard conformance, should be an error for f2003. i think the easiest way to do this would be to flag the address component as private if the user specifies -std=f2003. any opinions?



PS: Chris, I think you are involved in http://sourceforge.net/projects/ccain/ Does this work with gfortran's ISO Bind(C)? I wanted to try it but I cannot get past configure:http://sourceforge.net/tracker/index.php?func=detail&aid=1747338&group_id=132751&atid=725219

yes, i am involved with that project and it does work with gfortran's BIND(C). i haven't had a chance to look at the bug you filed but i was wondering how i'd be able to reproduce the problem since it's working with my gfortran. i may have to mail you with more questions.


thanks.
Chris


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