public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/18022] problem with structure and calling a function
Date: Sun, 10 Jul 2005 17:52:00 -0000	[thread overview]
Message-ID: <20050710173719.23986.qmail@sourceware.org> (raw)
In-Reply-To: <20041015190149.18022.gruel@astro.ufl.edu>


------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de  2005-07-10 17:37 -------
Subject: Re:  problem with structure and calling a function

paulthomas2 at wanadoo dot fr wrote:
> --- 2213,2226 ----
>     tree tmp;
>     stmtblock_t block;
>     stmtblock_t body;
> !  
> !   /* Special case a single function returning an array. Note
> !      that derived type components on lhs do not benefit from
> !      this optimization and so are excluded by testing that 
> !      the expression and symbol types are the same.  */
> !   if (expr2->expr_type == EXPR_FUNCTION && expr2->rank > 0
> !       && expr1->symtree->n.sym->ts.derived
> ! 	  == expr1->ts.derived)
>       {
>         tmp = gfc_trans_arrayfunc_assign (expr1, expr2);
>         if (tmp)

I should probably have said why I don't like this: this will probably not work
with derived types which have a component of the same type as is common e.g.
in linked lists.

Hm, thinking about it a second longer makes it seem that this is really wrong:
expr1->ts.type should be BT_REAL in our case, so you're checing something
random, but maybe I've stared at code too long today, having turned in our
second-round ICFPC submission and reviewing patches.

- Tobi


-- 


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


  parent reply	other threads:[~2005-07-10 17:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 19:01 [Bug fortran/18022] New: " gruel at astro dot ufl dot edu
2004-10-21 19:27 ` [Bug fortran/18022] " tobi at gcc dot gnu dot org
2005-07-05 14:52 ` gruel at astro dot ufl dot edu
2005-07-08  9:38 ` paulthomas2 at wanadoo dot fr
2005-07-08 13:02 ` paulthomas2 at wanadoo dot fr
2005-07-08 13:34 ` gruel at astro dot ufl dot edu
2005-07-09  0:29 ` tobi at gcc dot gnu dot org
2005-07-09 11:39 ` tobi at gcc dot gnu dot org
2005-07-09 11:47 ` tobi at gcc dot gnu dot org
2005-07-09 11:52 ` tobi at gcc dot gnu dot org
2005-07-09 12:04 ` tobi at gcc dot gnu dot org
2005-07-09 12:14 ` tobi at gcc dot gnu dot org
2005-07-09 13:14 ` paulthomas2 at wanadoo dot fr
2005-07-09 14:39 ` paulthomas2 at wanadoo dot fr
2005-07-09 15:12 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2005-07-09 17:50 ` tobi at gcc dot gnu dot org
2005-07-10 17:22 ` tobi at gcc dot gnu dot org
2005-07-10 17:25 ` paulthomas2 at wanadoo dot fr
2005-07-10 17:37 ` paulthomas2 at wanadoo dot fr
2005-07-10 17:52 ` Tobias dot Schlueter at physik dot uni-muenchen dot de [this message]
2005-07-10 18:09 ` paulthomas2 at wanadoo dot fr
2005-08-03 10:01 ` paulthomas2 at wanadoo dot fr
     [not found] <bug-18022-9317@http.gcc.gnu.org/bugzilla/>
2005-10-13  4:48 ` pault at gcc dot gnu dot org
2005-10-23  6:59 ` cvs-commit at gcc dot gnu dot org
2005-10-23 15:46 ` cvs-commit at gcc dot gnu dot org
2005-10-23 16:26 ` pault at gcc dot gnu dot org
2005-10-23 22:55 ` pinskia at gcc dot gnu dot 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=20050710173719.23986.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).