public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/114474] [11/12/13/14 Regression] DATA statement with derived type, pointer component rejected
Date: Sun, 07 Apr 2024 18:13:46 +0000	[thread overview]
Message-ID: <bug-114474-4-LQH4Kj7M6p@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114474-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:619fc13043c86d616ef57cb31f8ac5d29b059ade

commit r11-11311-g619fc13043c86d616ef57cb31f8ac5d29b059ade
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Mar 27 21:18:04 2024 +0100

    Fortran: fix DATA and derived types with pointer components [PR114474]

    When matching actual arguments in match_actual_arg, these are initially
    treated as a possible dummy procedure, assuming that the correct type is
    determined later.  This resolution could fail when the procedure is a
    derived type constructor with a pointer component and appears in a DATA
    statement, where the pointer shall be associated with an initial data
    target.  Check for those cases where the type obviously has not been
    resolved yet, and which were missed because there was no component
    reference.

    gcc/fortran/ChangeLog:

            PR fortran/114474
            * primary.c (gfc_variable_attr): Catch variables used in structure
            constructors within DATA statements that are still tagged with a
            temporary type BT_PROCEDURE from match_actual_arg and which have
the
            target attribute, and fix their typespec.

    gcc/testsuite/ChangeLog:

            PR fortran/114474
            * gfortran.dg/data_pointer_3.f90: New test.

    (cherry picked from commit bbb7c513dddc5c9b2d5e9b78bc1c2f85a0cfe07e)

  parent reply	other threads:[~2024-04-07 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 19:27 [Bug fortran/114474] New: " anlauf at gcc dot gnu.org
2024-03-25 19:28 ` [Bug fortran/114474] " anlauf at gcc dot gnu.org
2024-03-25 20:55 ` anlauf at gcc dot gnu.org
2024-03-26 21:29 ` anlauf at gcc dot gnu.org
2024-03-27 20:43 ` anlauf at gcc dot gnu.org
2024-03-28 17:44 ` cvs-commit at gcc dot gnu.org
2024-04-07 18:10 ` cvs-commit at gcc dot gnu.org
2024-04-07 18:12 ` cvs-commit at gcc dot gnu.org
2024-04-07 18:13 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-07 18:14 ` anlauf 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-114474-4-LQH4Kj7M6p@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).