* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
@ 2022-04-02 16:33 ` vladimir.fuka at gmail dot com
2022-04-02 16:39 ` vladimir.fuka at gmail dot com
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: vladimir.fuka at gmail dot com @ 2022-04-02 16:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #1 from Vladimir Fuka <vladimir.fuka at gmail dot com> ---
For after naming LOG one gets
RECURSIVE FUNCTION LOG(Z) RESULT(RES)
COMPLEX,INTENT(IN) :: Z
COMPLEX :: RES
RES = LOG(Z);
END FUNCTION LOG
> gfortran-12 -c shadow.f90
/tmp/ccbpyhxl.s: Assembler messages:
/tmp/ccbpyhxl.s:3: Error: junk at end of line, first unrecognized character is
`('
/tmp/ccbpyhxl.s:4: Error: unrecognized symbol type ""
/tmp/ccbpyhxl.s:4: Error: junk at end of line, first unrecognized character is
`('
/tmp/ccbpyhxl.s:5: Error: invalid character '(' in mnemonic
/tmp/ccbpyhxl.s:36: Error: expected comma after name `__' in .size directive
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
2022-04-02 16:33 ` [Bug fortran/105138] " vladimir.fuka at gmail dot com
@ 2022-04-02 16:39 ` vladimir.fuka at gmail dot com
2022-04-02 16:49 ` kargl at gcc dot gnu.org
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: vladimir.fuka at gmail dot com @ 2022-04-02 16:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #2 from Vladimir Fuka <vladimir.fuka at gmail dot com> ---
As mentioned, the correct function is called in case everything is REAL
a = floor(5.0)
print *, a
contains
RECURSIVE FUNCTION FLOOR(Z) RESULT(RES)
REAL,INTENT(IN) :: Z
REAL :: RES
if (z>0) then
RES = FLOOR(Z - 1)
else
RES = 0
end if
END FUNCTION FLOOR
end
> gfortran-12 shadow.f90
> ./a.out
0.00000000
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
2022-04-02 16:33 ` [Bug fortran/105138] " vladimir.fuka at gmail dot com
2022-04-02 16:39 ` vladimir.fuka at gmail dot com
@ 2022-04-02 16:49 ` kargl at gcc dot gnu.org
2022-04-02 16:54 ` kargl at gcc dot gnu.org
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-02 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |kargl at gcc dot gnu.org
Target Milestone|--- |13.0
Last reconfirmed| |2022-04-02
--- Comment #3 from kargl at gcc dot gnu.org ---
F2018, 15.6.2.2, page 319
If RESULT appears, the name of the function result of the
function is result-name and all occurrences of the function
name in execution-part statements in its scope refer to the
function itself.
If I change COMPLEX to REAL in the first example, I get
% gfcx -c -fdump-parse-tree
Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
procedure name = log_gamma
symtree: 'log_gamma' || symbol: 'log_gamma'
type spec : (REAL 4)
attributes: (PROCEDURE INTRINSIC-PROC FUNCTION RECURSIVE)
result: res
Formal arglist: z
symtree: 'res' || symbol: 'res'
type spec : (REAL 4)
attributes: (VARIABLE RESULT)
symtree: 'z' || symbol: 'z'
type spec : (REAL 4)
attributes: (VARIABLE DUMMY(IN))
code:
ASSIGN log_gamma:res __lgamma_4[[((log_gamma:z))]]
The attributes for log_gamma includes INTRINSIC-PROC, which is
clearly wrong.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (2 preceding siblings ...)
2022-04-02 16:49 ` kargl at gcc dot gnu.org
@ 2022-04-02 16:54 ` kargl at gcc dot gnu.org
2022-04-02 17:07 ` vladimir.fuka at gmail dot com
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-02 16:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Vladimir Fuka from comment #2)
> As mentioned, the correct function is called in case everything is REAL
>
Actually, the correct function isn't called. See the parse
tree that I posted for log_gamma. For your floor example,
the parse tree contains
code:
IF (> floor:z 0)
ASSIGN floor:res __convert_i4_r4[[((__floor4_r4[[(((- floor:z
1.00000000e0)) ((arg not-present)))]]))]]
ELSE
ASSIGN floor:res 0
ENDIF
Notice, the __floor4_r4 is the intrinsic routine not the user-defined floor.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (3 preceding siblings ...)
2022-04-02 16:54 ` kargl at gcc dot gnu.org
@ 2022-04-02 17:07 ` vladimir.fuka at gmail dot com
2022-04-02 17:15 ` anlauf at gcc dot gnu.org
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: vladimir.fuka at gmail dot com @ 2022-04-02 17:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #5 from Vladimir Fuka <vladimir.fuka at gmail dot com> ---
In that case some compiler or linker magic happens after that, because the
correct code is executed.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (4 preceding siblings ...)
2022-04-02 17:07 ` vladimir.fuka at gmail dot com
@ 2022-04-02 17:15 ` anlauf at gcc dot gnu.org
2022-04-02 19:03 ` kargl at gcc dot gnu.org
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-02 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #6 from anlauf at gcc dot gnu.org ---
Workaround:
module m
interface LOG_GAMMA
module procedure LOG_GAMMA_
end interface LOG_GAMMA
contains
RECURSIVE FUNCTION LOG_GAMMA_(Z) RESULT(RES)
COMPLEX,INTENT(IN) :: Z
COMPLEX :: RES
RES = LOG_GAMMA_(Z)
END FUNCTION LOG_GAMMA_
end module m
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (5 preceding siblings ...)
2022-04-02 17:15 ` anlauf at gcc dot gnu.org
@ 2022-04-02 19:03 ` kargl at gcc dot gnu.org
2022-04-02 23:21 ` kargl at gcc dot gnu.org
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-02 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #7 from kargl at gcc dot gnu.org ---
It seems the problem is that gfortran does not know
that a function name is local to its own scoping unit
when a result-name is used.
First, if the function is contained in a module it seems
to work correctly. Consider,
module foo
implicit none
contains
recursive function log_gamma(z) result(res)
complex,intent(in) :: z
complex :: res
complex x
if (real(z) == 0) then
res = 42
else
x = (0,1)
res = log_gamma(x)
end if
end function log_gamma
end module foo
program bar
use foo
implicit none
complex z
z = log_gamma(cmplx(2.,3.))
print *, z
end program bar
% gfcx -Wall -o z a.f90
a.f90:4:3:
4 | recursive function log_gamma(z) result(res)
| 1
Warning: 'log_gamma' declared at (1) may shadow the intrinsic of
the same name. In order to call the intrinsic, explicit INTRINSIC
declarations may be required. [-Wintrinsic-shadow]
% ./z
(42.0000000,0.00000000)
Now, consider
recursive function log_gamma(z) result(res)
complex,intent(in) :: z
complex :: res
complex x
if (real(z) == 0) then
res = 42
else
x = (0,1)
res = log_gamma(x)
end if
end function log_gamma
program bar
implicit none
complex z
z = log_gamma(cmplx(2.,3.))
print *, z
end program bar
% gfcx -Wall -o z a.f90
a.f90:1:0:
1 | recursive function log_gamma(z) result(res)
|
Warning: 'log_gamma' declared at (1) is also the name of an intrinsic.
It can only be called via an explicit interface or if declared EXTERNAL.
[-Wintrinsic-shadow]
a.f90:9:22:
9 | res = log_gamma(x)
| 1
Error: 'x' argument of 'log_gamma' intrinsic at (1) must be REAL
a.f90:16:17:
16 | z = log_gamma(cmplx(2.,3.))
| 1
Error: 'x' argument of 'log_gamma' intrinsic at (1) must be REAL
I believe the first error is wrong. The local function name should
block the intrinsic name. The second error is correct, because the
recursive function requires an explicit interface in program bar and
gfortran is picking up the intrinsic function.
If the function is modified to
recursive function log_gamma(z) result(res)
complex,intent(in) :: z
complex :: res
complex x
if (real(z) == 0) then
res = 42
else
block
complex, external :: log_gamma
x = (0,1)
res = log_gamma(x)
end block
end if
end function log_gamma
then the first error message does not occur. The block...end block
should not be required. The second error message remains as it
should.
If the program is modified to
program bar
implicit none
complex z
complex, external :: log_gamma
z = log_gamma(cmplx(2.,3.))
print *, z
end program bar
or
program bar
implicit none
interface
recursive function log_gamma(z) result(res)
complex,intent(in) :: z
complex :: res
end function log_gamma
end interface
complex z
z = log_gamma(cmplx(2.,3.))
print *, z
end program bar
it compiles and runs with the block...end block modified function
For completeness, if log_gamma() is a contained routine within the
program it compiles and runs.
program bar
implicit none
complex z
z = log_gamma(cmplx(2.,3.))
print *, z
contains
recursive function log_gamma(z) result(res)
complex,intent(in) :: z
complex :: res
complex x
if (real(z) == 0) then
res = 42
else
x = (0,1)
res = log_gamma(x)
end if
end function log_gamma
end program bar
% gfcx -Wall -o z a.f90
a.f90:7:4:
7 | recursive function log_gamma(z) result(res)
| 1
Warning: 'log_gamma' declared at (1) may shadow the intrinsic of
the same name. In order to call the intrinsic, explicit INTRINSIC
declarations may be required. [-Wintrinsic-shadow]
%./z
(42.0000000,0.00000000)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (6 preceding siblings ...)
2022-04-02 19:03 ` kargl at gcc dot gnu.org
@ 2022-04-02 23:21 ` kargl at gcc dot gnu.org
2022-04-03 20:27 ` anlauf at gcc dot gnu.org
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-02 23:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #8 from kargl at gcc dot gnu.org ---
This patch fixes the error. The comment in the patch explains it.
diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc
index 52e5f4ed39e..ec833667dbe 100644
--- a/gcc/fortran/intrinsic.cc
+++ b/gcc/fortran/intrinsic.cc
@@ -1167,6 +1167,11 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag,
locus loc)
|| sym->attr.if_source == IFSRC_IFBODY)
return false;
+ /* If the function has a result-name and it's recursive, it cannot be
+ an intrinsic subprogram. */
+ if (sym->result && sym->attr.recursive)
+ return false;
+
if (subroutine_flag)
isym = gfc_find_subroutine (sym->name);
else
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (7 preceding siblings ...)
2022-04-02 23:21 ` kargl at gcc dot gnu.org
@ 2022-04-03 20:27 ` anlauf at gcc dot gnu.org
2022-04-03 21:23 ` sgk at troutmask dot apl.washington.edu
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-03 20:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #9 from anlauf at gcc dot gnu.org ---
(In reply to kargl from comment #8)
> This patch fixes the error. The comment in the patch explains it.
Good catch, Steve.
I think this can (and needs to) be simplified further. :-)
First, the check on sym->result should not be necessary, as it looks redundant.
Second, we need to handle recursive subroutines, such as:
recursive subroutine date_and_time (z)
real :: z
if (z > 0) call date_and_time (z-1)
end subroutine date_and_time
Thus we could combine the second part of the condition in your patch with
the code preceding it:
diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc
index 2339d9050ec..e89131f5a71 100644
--- a/gcc/fortran/intrinsic.cc
+++ b/gcc/fortran/intrinsic.cc
@@ -1164,6 +1164,7 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag,
locus loc)
/* Check for attributes which prevent the symbol from being INTRINSIC. */
if (sym->attr.external || sym->attr.contained
+ || sym->attr.recursive
|| sym->attr.if_source == IFSRC_IFBODY)
return false;
This regtests OK for me.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (8 preceding siblings ...)
2022-04-03 20:27 ` anlauf at gcc dot gnu.org
@ 2022-04-03 21:23 ` sgk at troutmask dot apl.washington.edu
2022-04-04 19:05 ` anlauf at gcc dot gnu.org
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-03 21:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Sun, Apr 03, 2022 at 08:27:03PM +0000, anlauf at gcc dot gnu.org wrote:
> --- Comment #9 from anlauf at gcc dot gnu.org ---
> (In reply to kargl from comment #8)
> > This patch fixes the error. The comment in the patch explains it.
>
> Good catch, Steve.
>
> I think this can (and needs to) be simplified further. :-)
>
> First, the check on sym->result should not be necessary, as
> it looks redundant.
I agree. I suppose that I was being to cautious with
introducing a regression.
> Second, we need to handle recursive subroutines, such as:
Ah, good catch. The use of sym->result would not catch this.
>
> /* Check for attributes which prevent the symbol from being INTRINSIC. */
> if (sym->attr.external || sym->attr.contained
> + || sym->attr.recursive
> || sym->attr.if_source == IFSRC_IFBODY)
> return false;
>
> This regtests OK for me.
>
Looks good to me.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (9 preceding siblings ...)
2022-04-03 21:23 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-04 19:05 ` anlauf at gcc dot gnu.org
2022-04-05 17:38 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-04 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
Keywords| |rejects-valid, wrong-code
--- Comment #11 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-April/057731.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (10 preceding siblings ...)
2022-04-04 19:05 ` anlauf at gcc dot gnu.org
@ 2022-04-05 17:38 ` cvs-commit at gcc dot gnu.org
2022-04-05 17:46 ` [Bug fortran/105138] [7,8,9,10,11,F95] " anlauf at gcc dot gnu.org
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-05 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:d46685b04071a485b56de353d997a866bfc8caba
commit r12-8002-gd46685b04071a485b56de353d997a866bfc8caba
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Apr 4 20:42:51 2022 +0200
Fortran: a RECURSIVE procedure cannot be an INTRINSIC
gcc/fortran/ChangeLog:
PR fortran/105138
* intrinsic.cc (gfc_is_intrinsic): When a symbol refers to a
RECURSIVE procedure, it cannot be an INTRINSIC.
gcc/testsuite/ChangeLog:
PR fortran/105138
* gfortran.dg/recursive_reference_3.f90: New test.
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (11 preceding siblings ...)
2022-04-05 17:38 ` cvs-commit at gcc dot gnu.org
@ 2022-04-05 17:46 ` anlauf at gcc dot gnu.org
2022-04-10 18:55 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-05 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[7,8,9,10,11,12,F95] Bogus |[7,8,9,10,11,F95] Bogus
|error when function name |error when function name
|does not shadow an |does not shadow an
|intrinsic when RESULT |intrinsic when RESULT
|clause is used |clause is used
--- Comment #13 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12 so far.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,11,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (12 preceding siblings ...)
2022-04-05 17:46 ` [Bug fortran/105138] [7,8,9,10,11,F95] " anlauf at gcc dot gnu.org
@ 2022-04-10 18:55 ` cvs-commit at gcc dot gnu.org
2022-04-10 18:57 ` [Bug fortran/105138] [7,8,9,10,F95] " anlauf at gcc dot gnu.org
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-10 18:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #14 from CVS 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:fdaa6de39a5da45dccd06c18dd355893b4cf9060
commit r11-9806-gfdaa6de39a5da45dccd06c18dd355893b4cf9060
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Apr 4 20:42:51 2022 +0200
Fortran: a RECURSIVE procedure cannot be an INTRINSIC
gcc/fortran/ChangeLog:
PR fortran/105138
* intrinsic.c (gfc_is_intrinsic): When a symbol refers to a
RECURSIVE procedure, it cannot be an INTRINSIC.
gcc/testsuite/ChangeLog:
PR fortran/105138
* gfortran.dg/recursive_reference_3.f90: New test.
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit d46685b04071a485b56de353d997a866bfc8caba)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (13 preceding siblings ...)
2022-04-10 18:55 ` cvs-commit at gcc dot gnu.org
@ 2022-04-10 18:57 ` anlauf at gcc dot gnu.org
2022-05-16 19:40 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-10 18:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[7,8,9,10,11,F95] Bogus |[7,8,9,10,F95] Bogus error
|error when function name |when function name does not
|does not shadow an |shadow an intrinsic when
|intrinsic when RESULT |RESULT clause is used
|clause is used |
--- Comment #15 from anlauf at gcc dot gnu.org ---
Also fixed on 11-branch in time for gcc-11.3.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (14 preceding siblings ...)
2022-04-10 18:57 ` [Bug fortran/105138] [7,8,9,10,F95] " anlauf at gcc dot gnu.org
@ 2022-05-16 19:40 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:51 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-16 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:d31975be113562448520f4c94fc75b9cbb09715e
commit r10-10746-gd31975be113562448520f4c94fc75b9cbb09715e
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Apr 4 20:42:51 2022 +0200
Fortran: a RECURSIVE procedure cannot be an INTRINSIC
gcc/fortran/ChangeLog:
PR fortran/105138
* intrinsic.c (gfc_is_intrinsic): When a symbol refers to a
RECURSIVE procedure, it cannot be an INTRINSIC.
gcc/testsuite/ChangeLog:
PR fortran/105138
* gfortran.dg/recursive_reference_3.f90: New test.
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit d46685b04071a485b56de353d997a866bfc8caba)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (15 preceding siblings ...)
2022-05-16 19:40 ` cvs-commit at gcc dot gnu.org
@ 2022-05-16 19:51 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:53 ` anlauf at gcc dot gnu.org
2022-05-16 20:38 ` anlauf at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-16 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:f43db17894744827d93ddcea7952d4ecf1f83f30
commit r9-10186-gf43db17894744827d93ddcea7952d4ecf1f83f30
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Apr 4 20:42:51 2022 +0200
Fortran: a RECURSIVE procedure cannot be an INTRINSIC
gcc/fortran/ChangeLog:
PR fortran/105138
* intrinsic.c (gfc_is_intrinsic): When a symbol refers to a
RECURSIVE procedure, it cannot be an INTRINSIC.
gcc/testsuite/ChangeLog:
PR fortran/105138
* gfortran.dg/recursive_reference_3.f90: New test.
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit d46685b04071a485b56de353d997a866bfc8caba)
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (16 preceding siblings ...)
2022-05-16 19:51 ` cvs-commit at gcc dot gnu.org
@ 2022-05-16 19:53 ` anlauf at gcc dot gnu.org
2022-05-16 20:38 ` anlauf at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-16 19:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|13.0 |9.5
--- Comment #18 from anlauf at gcc dot gnu.org ---
Fixed on all open branches. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug fortran/105138] [7,8,9,10,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used
2022-04-02 16:21 [Bug fortran/105138] New: [7,8,9,10,11,12,F95] Bogus error when function name does not shadow an intrinsic when RESULT clause is used vladimir.fuka at gmail dot com
` (17 preceding siblings ...)
2022-05-16 19:53 ` anlauf at gcc dot gnu.org
@ 2022-05-16 20:38 ` anlauf at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-16 20:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rofirrim at gmail dot com
--- Comment #19 from anlauf at gcc dot gnu.org ---
*** Bug 47359 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 20+ messages in thread