This is the mail archive of the 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: [patch, fortran] annotate library calls, part 1

Le 13.07.2010 15:21, Tobias Burnus a écrit :
On 07/12/2010 06:18 PM, Mikael Morin wrote:
Le 12.07.2010 16:39, Tobias Burnus a écrit :
Attached patch annotates the library calls in trans-decl.c and
trans-io.c with
noclobber/noescape attributes.

I disagree for ttynam, fdate, ctime. - ttynam : ".W.." instead of ".WW." : - fdate : ".W." instead of ".ww" : - ctime : ".W.." instead of ".Rw." :

I concur - seemingly, I wrongly looked at the subroutine version instead of the function version. (trans-decl.c only handles the latter.)

By the way the documentation has the arguments in reversed order it seems.

I checked "ctime" and the result looks fine for both subroutine and function version, cf. -- why do you think that the order is reversed?
From your patch :

+  gfor_fndecl_ctime = gfc_build_library_function_decl_with_spec (
+	get_identifier (PREFIX("ctime")), ".W",
+	void_type_node, 3, pchar_type_node, gfc_charlen_type_node,
+	gfc_int8_type_node);

the char (pointer and length) is first, the integer is last.

From the documentation :
              call ctime(i,date)
The integer is first, the char (pointer and length) is last.

But you have said that trans-decl.c doesn't handle the subroutine version ? I was supposing that both were handled by the same subroutine declaration and the front-end was rewriting the function version as a subroutine call.

For set_args, isn't "..." the same as no spec at all ?
Changed to the no-spec version.

Updated patch attached, committed as Rev. 162140.


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