public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asl at math dot spbu dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/33097] Function decl trees without proper argument list
Date: Wed, 17 Oct 2007 17:00:00 -0000	[thread overview]
Message-ID: <20071017170035.22535.qmail@sourceware.org> (raw)
In-Reply-To: <bug-33097-14919@http.gcc.gnu.org/bugzilla/>



------- Comment #11 from asl at math dot spbu dot ru  2007-10-17 17:00 -------
Also, some chunk of code in function type creation (gfc_get_function_type() is
in question) looks suspicious to me. Let me explain on terms of C (I don't know
Fortran at all :) )

Consider we have two function decls:

int foo1();
struct some_fat_struct foo2();

Both are varargs functions, but return type for the second will be lowered to
void, so, after some lowering they in general should look like:

int foo(...);
void foo2(struct some_fat_struct *retval, ...);

The problem with gfortran is that function, which result is passed by reference
(determined with help of gfc_return_by_reference() call inside
gfc_get_function_type()) won't be varargs, so inside gfortran FE we'll end with
 something like:

void foo2(some_fat_struct *ptr); but:
int foo(...);

This looks pretty unlogical to me. Was it intentional?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097


  parent reply	other threads:[~2007-10-17 17:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17 12:39 [Bug fortran/33097] New: Invalid decl trees are created for external intrinsics asl at math dot spbu dot ru
2007-08-17 12:42 ` [Bug fortran/33097] " asl at math dot spbu dot ru
2007-08-17 12:49 ` asl at math dot spbu dot ru
2007-08-20 14:48 ` [Bug fortran/33097] Function decl trees without proper argument list fxcoudert at gcc dot gnu dot org
2007-08-20 16:47 ` asl at math dot spbu dot ru
2007-08-20 16:48 ` asl at math dot spbu dot ru
2007-08-20 16:51 ` fxcoudert at gcc dot gnu dot org
2007-08-20 17:00 ` asl at math dot spbu dot ru
2007-10-17 10:17 ` asl at math dot spbu dot ru
2007-10-17 16:45 ` asl at math dot spbu dot ru
2007-10-17 16:46 ` asl at math dot spbu dot ru
2007-10-17 17:00 ` asl at math dot spbu dot ru [this message]
2007-10-17 17:14 ` fxcoudert at gcc dot gnu dot org
2007-10-17 17:28 ` asl at math dot spbu dot ru
2009-01-03 21:31 ` dfranke at gcc dot gnu dot org
2010-05-01 20:20 ` dfranke at gcc dot gnu dot org
2010-07-15 23:06 ` steven at gcc dot gnu dot org
2010-07-16  7:17 ` burnus at gcc dot gnu dot org
     [not found] <bug-33097-4@http.gcc.gnu.org/bugzilla/>
2010-10-06 19:37 ` howarth at nitro dot med.uc.edu
2011-03-25 19:52 ` burnus at gcc dot gnu.org
2020-06-14 15:24 ` 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=20071017170035.22535.qmail@sourceware.org \
    --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: link
Be 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).