public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/98022] [9/10/11 Regression] ICE in gfc_assign_data_value, at fortran/data.c:468 since r9-3803-ga5fbc2f36a291cbe
Date: Sat, 12 Dec 2020 16:02:54 +0000	[thread overview]
Message-ID: <bug-98022-4-JOHT0HhPuA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98022-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98022

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to kargl from comment #4)
> (In reply to Paul Thomas from comment #3)
> 
> >   function kn1() result(hm2)
> >     complex :: hm(1:2), hm2(1:2)
> >     data (hm(md)%re, md=1,2)/1.0, 2.0/
> >     hm2 = hm
> >   end function kn1
> 
> Are you sure that this is valid Fortran?  I cannot
> find anything in the Fortran standard that says hm%im
> is defined.  Thus, 'hm2=hm' is referencing a variable
> that is no completely defined.
> 
> 
> 19.6.1 Definition of objects and subobjects
> 
> 2 Arrays, including sections, and variables of derived, character,
>   or complex type are objects that consist of zero or more subobjects.
>   Associations may be established between variables and subobjects and
>   between subobjects of different variables. These subobjects may become
>   defined or undefined.
> 
> 5 A complex or character scalar object is defined if and only if all
>   of its subobjects are defined.

Hi Steve,

I saw your comment a bit too late. I think that you are correct. I guess that,
at very least, I should not zero out the undefined part of the complex object?
That way it would be equivalent to using assignment to achieve the same thing
or to partially define a derived type.

I'll post on clf.

Cheers

Paul

  parent reply	other threads:[~2020-12-12 16:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  3:22 [Bug fortran/98022] New: ICE in gfc_assign_data_value, at fortran/data.c:468 asolokha at gmx dot com
2020-11-27 11:18 ` [Bug fortran/98022] [9/10/11 Regression] ICE in gfc_assign_data_value, at fortran/data.c:468 since r9-3803-ga5fbc2f36a291cbe marxin at gcc dot gnu.org
2020-11-27 11:26 ` pault at gcc dot gnu.org
2020-12-09 17:25 ` pault at gcc dot gnu.org
2020-12-09 18:13 ` kargl at gcc dot gnu.org
2020-12-12 14:01 ` cvs-commit at gcc dot gnu.org
2020-12-12 16:02 ` pault at gcc dot gnu.org [this message]
2020-12-12 16:34 ` sgk at troutmask dot apl.washington.edu
2020-12-12 17:54 ` pault at gcc dot gnu.org
2020-12-12 18:24 ` sgk at troutmask dot apl.washington.edu
2020-12-26 16:44 ` cvs-commit at gcc dot gnu.org
2021-01-23 10:37 ` cvs-commit at gcc dot gnu.org
2021-01-23 10:43 ` cvs-commit at gcc dot gnu.org
2021-01-23 10:44 ` cvs-commit at gcc dot gnu.org
2021-01-23 10:44 ` cvs-commit at gcc dot gnu.org
2021-01-27 11:21 ` pault 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-98022-4-JOHT0HhPuA@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: 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).