public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/24557] ICE: PRINTing function result of size depending on assumed length CHARACTER dummy
Date: Wed, 25 Jan 2006 14:52:00 -0000	[thread overview]
Message-ID: <20060125145237.22339.qmail@sourceware.org> (raw)
In-Reply-To: <bug-24557-11549@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from paul dot richard dot thomas at cea dot fr  2006-01-25 14:52 -------
The code is really crazy for this example. Please note that I have Jakub's
nongomp type patch in place.  This bug is independent of the completeness of
the types, however.

The problem is that the character length of the DUMMY argument is somehow being
referenced in the main program.  This aberrant behaviour is somehow associated
with the IO transfer.

MAIN__ ()
{
  char a[2][1:4];
  static void fun (struct array1_int4 &, struct array1_unknown &, int4);

  {
    struct __st_parameter_dt dt_parm.8;

    dt_parm.8.common.filename = "pr24557.f90";
    dt_parm.8.common.line = 5;
    dt_parm.8.common.unit = 6;
    dt_parm.8.common.flags = 128;
    _gfortran_st_write (&dt_parm.8);
    {
      void * D.840;
      int4 D.839;
      struct array1_int4 atmp.12;
      int4 D.837;
      int4 D.836;
      int4 D.835;
      struct array1_unknown parm.11;
      int4 D.833;
      int4 D.832;
      char[0:][1:_arg] * parm.10;      /******Here******/
      struct array1_unknown * D.830;
      struct array1_unknown parm.9;

      parm.9.dtype = 305;
      parm.9.dim[0].lbound = 1;
      parm.9.dim[0].ubound = 2;
      parm.9.dim[0].stride = 1;
      parm.9.data = (void *) (char[0:][1:4] *) &a[0];
      parm.9.offset = 0;
      D.830 = &parm.9;
      parm.10 = (char[0:][1:_arg] *) (char[0:][1:4] *) D.830->data; /*Here*/
      D.832 = D.830->dim[0].ubound - D.830->dim[0].lbound + 1;
      D.833 = -D.830->dim[0].stride;
      parm.11.dtype = ((<unnamed type>) _arg << 6) + 49;    /***and here***/
      D.835 = D.830->dim[0].stride;
      parm.11.dim[0].lbound = 1;
      parm.11.dim[0].ubound = D.832;
      parm.11.dim[0].stride = NON_LVALUE_EXPR <D.835>;
      parm.11.data = (void *) (char[0:][1:_arg] *) &(*parm.10)[0];  /*here*/
      parm.11.offset = 0;
      D.836 = _gfortran_size0 (&parm.11);
      D.837 = D.836 - 1;
      atmp.12.dtype = 265;
      atmp.12.dim[0].stride = 1;
      atmp.12.dim[0].lbound = 0;
      atmp.12.dim[0].ubound = NON_LVALUE_EXPR <D.837>;
      D.839 = NON_LVALUE_EXPR <D.837> + 1;
      D.840 = _gfortran_internal_malloc (D.839 * 4);
      atmp.12.data = D.840;
      atmp.12.offset = 0;
      atmp.12.dim[0].stride = 0;
      fun (&atmp.12, D.830, 4);        /* After the call, all is well.*/

Paul


-- 


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


  parent reply	other threads:[~2006-01-25 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27 11:16 [Bug fortran/24557] New: " eedelman at gcc dot gnu dot org
2005-10-27 22:00 ` [Bug fortran/24557] " pinskia at gcc dot gnu dot org
2006-01-25 14:52 ` paul dot richard dot thomas at cea dot fr [this message]
2006-02-06 13:51 ` pinskia at gcc dot gnu dot org
2006-02-16  7:04 ` pault at gcc dot gnu dot org
2006-02-16  7:07 ` pault at gcc dot gnu dot org
2006-03-07  0:07 ` pault at gcc dot gnu dot org
2006-03-07  2:24 ` 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=20060125145237.22339.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).