public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Tobias Schlüter" <tobias.schlueter@physik.uni-muenchen.de>
To: Paul Brook <paul@codesourcery.com>
Cc: fortran@gcc.gnu.org, patch <gcc-patches@gcc.gnu.org>
Subject: Re: [gfortran] Fix PR 15211
Date: Mon, 14 Jun 2004 21:38:00 -0000	[thread overview]
Message-ID: <40CDF3B1.8070107@physik.uni-muenchen.de> (raw)
In-Reply-To: <200406141824.58484.paul@codesourcery.com>

Paul Brook wrote:
>>
>>So, to make sure I understand correctly, checking (arg->ref == NULL ||
>>(arg->ref->next == NULL && arg->ref->type == REF_ARRAY)) should fix the
> 
> Yes, that would work. Patch approved with that change.

Below is what I committed after testing. I also added a check for this 
to execute/intrinsic_len.f90.

- Tobi

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.73
diff -u -p -r1.73 ChangeLog
--- ChangeLog   14 Jun 2004 16:04:39 -0000      1.73
+++ ChangeLog   14 Jun 2004 18:46:33 -0000
@@ -1,3 +1,9 @@
+2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/15211
+       * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
+       of strings.
+
  2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

         PR fortran/15510
Index: trans-intrinsic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-intrinsic.c,v
retrieving revision 1.6
diff -u -p -r1.6 trans-intrinsic.c
--- trans-intrinsic.c   12 Jun 2004 17:34:45 -0000      1.6
+++ trans-intrinsic.c   14 Jun 2004 18:46:33 -0000
@@ -1874,8 +1874,12 @@ gfc_conv_intrinsic_len (gfc_se * se, gfc
        break;

      default:
-       if (arg->expr_type == EXPR_VARIABLE && arg->ref == NULL)
+       if (arg->expr_type == EXPR_VARIABLE && arg->ref == NULL
+           || (arg->ref->next == NULL && arg->ref->type == REF_ARRAY))
           {
+           /* This doesn't catch all cases.
+              See http://gcc.gnu.org/ml/fortran/2004-06/msg00165.html
+              and the surrounding thread.  */
             sym = arg->symtree->n.sym;
             decl = gfc_get_symbol_decl (sym);
             if (decl == current_function_decl && sym->attr.function

  reply	other threads:[~2004-06-14 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-31 22:03 Tobias Schlüter
2004-05-31 22:12 ` Tobias Schlüter
2004-06-12 13:55 ` Paul Brook
2004-06-14 19:28   ` Tobias Schlüter
2004-06-14 20:17     ` Paul Brook
2004-06-14 21:38       ` Tobias Schlüter [this message]
2004-06-14 21:48         ` Tobias Schlüter

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=40CDF3B1.8070107@physik.uni-muenchen.de \
    --to=tobias.schlueter@physik.uni-muenchen.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul@codesourcery.com \
    /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).