This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/84276] Invalid error for valid statement function
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Feb 2018 03:46:32 +0000
- Subject: [Bug fortran/84276] Invalid error for valid statement function
- Auto-submitted: auto-generated
- References: <bug-84276-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84276
--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Feb 08, 2018 at 02:26:50AM +0000, sgk at troutmask dot
apl.washington.edu wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84276
>
> --- Comment #1 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
> Reduced testcase.
>
> subroutine stepns(hh,h,s,w)
> real, intent(inout) :: h,hh,s
> real, intent(out) :: w
> real :: qofs
> qofs(s)=s
> w=qofs(hh+h)
> end subroutine stepns
>
> Problem occurs with interface.c:3219.
>
So, the problem appears to boil down to gfortran acquiring
not only the type and type parameters from the declaration
statements, but also the attributes. Statement functions
should not inherit the attributes.