Thursday 15 May 2014

compiler construction - Is there a limit to the number of arguments passed to a fortran function? -



compiler construction - Is there a limit to the number of arguments passed to a fortran function? -

i came across fortran 90 code 68 arguments passed function. upon searching web found limit of passing 256 bytes cuda fortran related stuff (http://www.pgroup.com/userforum/viewtopic.php?t=2235&sid=f241ca3fd406ef89d0ba08a361acd962).

so wonder: there limit number of arguments may passed function intel/visual/gnu fortran compilers?

i came across give-and-take of fortran 90 standards:

http://www.nag.co.uk/sc22wg5/guidelines_for_bindings-b.html

the relevant section in italics below:

3.4 statements

constraints on length of fortran statement impose upper limit on length of procedure call. although unlikely serious imposition, single fortran statement in free-form format subject upper limit of 5241 characters, including possible label (f90 sections 3.3.1, 3.3.1.4); in fixed-form format upper limit 1320 characters plus possible label (f90 section 3.3.2). these limits subject characters beingness of "default kind", in practice single-byte characters; double-byte characters, used illustration ideographic languages, limits processor-dependent of same order of size.

there no limit in fortran standard on maximum number of arguments procedure.

i have security tool developing in research analyzes binaries. knew c language has limits on number of arguments (31 in c90 standard, 127 in c99 standard), thought dimension vector hold 128 items pertaining incoming arguments. encountered fortran-derived binary had 290 arguments passed, led me discussion. binary spec cpu2006 benchmark suite, benchmark 481.wrf, see procedure named (in binary) "solve_interface_" sets 290 arguments on stack , calls "solve_em_" processes these arguments. can no uncertainty find fortran source code these procedures online. binary produced gnu compiler tools x86/linux/elf system.

function compiler-construction arguments fortran limit

No comments:

Post a Comment