public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Rejects ASSOCIATE and a complex part%ref when target is a function
Date: Tue, 27 Feb 2024 16:55:55 -0800	[thread overview]
Message-ID: <Zd6Em0VOY4yu8GPp@troutmask.apl.washington.edu> (raw)

All,

Consider,

! { dg-do run }
program foo
   implicit none
   real y
   associate (x => log(cmplx(-1,0)))
      y = x%im
      if (int(100*y)-314 /= 0) stop 1
   end associate
end program

% gfcx -c a.f90
a.f90:6:13:

    6 |       y = x%im
      |             1
Error: Symbol 'x' at (1) has no IMPLICIT type


'x' has the type of thi selector, which is COMPLEX.
I have created the following bug report

https://gcc.gnu.org/pipermail/gcc-bugs/2024-February/855452.html

and attached a patch that fixes the problem.  The patch has been
regression tested against x86_64-*-freebsd.  Please commit.

-- 
Steve

                 reply	other threads:[~2024-02-28  0:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Zd6Em0VOY4yu8GPp@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).