https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114141
Bug ID: 114141 Summary: ASSOCIATE and complex part ref when associate target is a function Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kargl at gcc dot gnu.org Target Milestone: --- Created attachment 57556 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57556&action=edit patch gfortran rejects the following code with an invalid error message. The problem is that the target is not resolved to have type COMPLEX. The attach patch rectifies the issue. It has been regtested on x86_64-*-freebsd. ! { 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 gfortran13 -c a.f90 a.f90:6:13: 6 | y = x%im | 1 Error: Symbol 'x' at (1) has no IMPLICIT type troutmask:sgk[244]