This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix handling of arguments in statement functions
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 Feb 2018 13:48:10 +0100
- Subject: Re: [PATCH] Fix handling of arguments in statement functions
- Authentication-results: sourceware.org; auth=none
Hi Steve,
With your patch applied to revision r257559, I get the following failures
/opt/gcc/p_work/gcc/testsuite/gfortran.dg/statement_function_3.f:5:72: Warning: Obsolescent feature: Statement function at (1)
/opt/gcc/p_work/gcc/testsuite/gfortran.dg/statement_function_3.f:3:24: Error: Argument 'e' of statement function at (1) must be scalar
compiler exited with status 1
FAIL: gfortran.dg/statement_function_3.f -O (test for errors, line 5)
FAIL: gfortran.dg/statement_function_3.f -O (test for excess errors)
The error still occurs at line 3
/opt/gcc/work/gcc/testsuite/gfortran.dg/statement_function_3.f:3:24:
subroutine phtod(e,n,i,h)
1
Error: Argument 'e' of statement function at (1) must be scalar
and not at line 5.
IMO there should be no error with the test since e(i-1) is a scalar in
h = hstar(e(i-1), a)
but
h = hstar(e, a)
should give an error.
Thanks for working on this issue.
Dominique