public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stevenj at alum dot mit.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49509] cannot promote types for arguments passed by value Date: Thu, 23 Jun 2011 02:55:00 -0000 [thread overview] Message-ID: <bug-49509-4-KCaphT8wAj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-49509-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49509 --- Comment #2 from stevenj at alum dot mit.edu 2011-06-23 02:54:50 UTC --- You're missing the point. Traditionally in Fortran, all arguments were passed *by reference*, in which case it is clearly a requirement that actual parameter match the formal parameter's type exactly, because the formal parameter refers to the *same memory* as the actual parameter. However, in this case we are passing by value. This should act just like an assignment of the formal parameter to the actual parameter (as opposed to having them be the *same* object as in passing by reference). Hence, just like an assignment statement the compiler should be able to assign a narrower integer type to a wider one. Hence, the familiar old requirements of the Fortran standard are irrelevant. The question is, what does the Fortran 2003 standard require for passing by value, which is I believe is NEW IN FORTRAN 2003, and is SPECIFIC TO BIND(C) functions.
next prev parent reply other threads:[~2011-06-23 2:55 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-22 22:10 [Bug fortran/49509] New: " stevenj at alum dot mit.edu 2011-06-23 2:11 ` [Bug fortran/49509] " kargl at gcc dot gnu.org 2011-06-23 2:55 ` stevenj at alum dot mit.edu [this message] 2011-06-23 3:01 ` stevenj at alum dot mit.edu 2011-06-23 3:23 ` stevenj at alum dot mit.edu 2011-06-23 4:02 ` sgk at troutmask dot apl.washington.edu 2011-06-23 4:02 ` sgk at troutmask dot apl.washington.edu 2011-06-23 4:14 ` sgk at troutmask dot apl.washington.edu 2011-06-23 4:23 ` sgk at troutmask dot apl.washington.edu 2011-06-23 16:07 ` burnus at gcc dot gnu.org 2011-08-06 21:09 ` tkoenig at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-49509-4-KCaphT8wAj@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).