public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic
@ 2013-05-02 8:13 roger.ferrer at bsc dot es
2013-05-02 11:13 ` [Bug fortran/57141] " dominiq at lps dot ens.fr
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: roger.ferrer at bsc dot es @ 2013-05-02 8:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
Bug #: 57141
Summary: Cannot change attributes of USE-associated intrinsic
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: roger.ferrer@bsc.es
Hi,
gfortran-4.8 (and 4.7 as well and possibly earlier versions too) complain with
this snippet.
The error message is not emitted if the declaration of R is uncommented.
! -- test.f90
MODULE M
INTRINSIC :: NULL
!! Uncommenting the following statement
!! causes the error go away
! REAL, POINTER :: R(:) => NULL()
END MODULE M
MODULE M_INTERN
USE M
IMPLICIT NONE
REAL, POINTER :: ARR(:) => NULL()
END MODULE M_INTERN
! -- end of test.f90
$ gfortran -c test.f90
test.f90:12.37:
REAL, POINTER :: ARR(:) => NULL()
1
Error: Cannot change attributes of USE-associated symbol null at (1)
Kind regards,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
@ 2013-05-02 11:13 ` dominiq at lps dot ens.fr
2013-05-03 8:59 ` burnus at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-05-02 11:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-05-02
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-05-02 11:13:01 UTC ---
Confirmed from 4.3.1 to trunk.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
2013-05-02 11:13 ` [Bug fortran/57141] " dominiq at lps dot ens.fr
@ 2013-05-03 8:59 ` burnus at gcc dot gnu.org
2013-05-05 14:04 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-03 8:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-03 08:59:48 UTC ---
decl.c's gfc_match_null has:
gfc_intrinsic_symbol (sym);
if (sym->attr.proc != PROC_INTRINSIC
&& (!gfc_add_procedure(&sym->attr, PROC_INTRINSIC, sym->name, NULL)
|| !gfc_add_function (&sym->attr, sym->name, NULL)))
return MATCH_ERROR;
Failing is the call to gfc_add_procedure.
Here,
attr.proc = PROC_UNKNOWN
attr.intrinsic = 1
attr.use_assoc = 1
attr.if_source = IFSRC_DECL
Possible patch?
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1705,2 +1705,3 @@ gfc_match_null (gfc_expr **result)
if (sym->attr.proc != PROC_INTRINSIC
+ && !(sym->attr.use_assoc && sym->attr.intrinsic)
&& (!gfc_add_procedure(&sym->attr, PROC_INTRINSIC, sym->name, NULL)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
2013-05-02 11:13 ` [Bug fortran/57141] " dominiq at lps dot ens.fr
2013-05-03 8:59 ` burnus at gcc dot gnu.org
@ 2013-05-05 14:04 ` burnus at gcc dot gnu.org
2013-05-05 14:05 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-05 14:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-05 14:04:42 UTC ---
Author: burnus
Date: Sun May 5 14:01:38 2013
New Revision: 198609
URL: http://gcc.gnu.org/viewcvs?rev=198609&root=gcc&view=rev
Log:
2013-05-05 Tobias Burnus <burnus@net-b.de>
PR fortran/57141
* decl.c (gfc_match_null): Permit use-associated
NULL intrinsic.
2013-05-05 Tobias Burnus <burnus@net-b.de>
PR fortran/57141
* gfortran.dg/null_8.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/null_8.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
` (2 preceding siblings ...)
2013-05-05 14:04 ` burnus at gcc dot gnu.org
@ 2013-05-05 14:05 ` burnus at gcc dot gnu.org
2021-03-16 10:29 ` aasdelat at yahoo dot es
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-05 14:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-05 14:05:04 UTC ---
FIXED on the trunk (GCC 4.9).
Thanks for the report!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
` (3 preceding siblings ...)
2013-05-05 14:05 ` burnus at gcc dot gnu.org
@ 2021-03-16 10:29 ` aasdelat at yahoo dot es
2021-03-16 11:19 ` burnus at gcc dot gnu.org
2021-03-18 17:50 ` aserranot at aemet dot es
6 siblings, 0 replies; 8+ messages in thread
From: aasdelat at yahoo dot es @ 2021-03-16 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
Antonio <aasdelat at yahoo dot es> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aasdelat at yahoo dot es
--- Comment #5 from Antonio <aasdelat at yahoo dot es> ---
I am experiencing this problem in gfortran from gcc version 10.2.0 and the same
workaround also works. It seems to be a regression.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
` (4 preceding siblings ...)
2021-03-16 10:29 ` aasdelat at yahoo dot es
@ 2021-03-16 11:19 ` burnus at gcc dot gnu.org
2021-03-18 17:50 ` aserranot at aemet dot es
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-03-16 11:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Antonio from comment #5)
> I am experiencing this problem in gfortran from gcc version 10.2.0 and the
> same workaround also works. It seems to be a regression.
Hi Antonio.
Do you use exactly the program from the original comment 0 – or some other
program? That program works here with mainline (GCC 11) and a GCC 10.2.0.
Additionally, exactly that program is part of the regression testsuite since
2013, hence, issues would show up, but don't.
Thus, I assume that you have a slightly different program. If so, can you
please open a new PR (problem report) – and include/attach your failing
variant?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/57141] Cannot change attributes of USE-associated intrinsic
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
` (5 preceding siblings ...)
2021-03-16 11:19 ` burnus at gcc dot gnu.org
@ 2021-03-18 17:50 ` aserranot at aemet dot es
6 siblings, 0 replies; 8+ messages in thread
From: aserranot at aemet dot es @ 2021-03-18 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57141
--- Comment #7 from Antonio <aserranot at aemet dot es> ---
Ok, I have created the following bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99651
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-18 17:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 8:13 [Bug fortran/57141] New: Cannot change attributes of USE-associated intrinsic roger.ferrer at bsc dot es
2013-05-02 11:13 ` [Bug fortran/57141] " dominiq at lps dot ens.fr
2013-05-03 8:59 ` burnus at gcc dot gnu.org
2013-05-05 14:04 ` burnus at gcc dot gnu.org
2013-05-05 14:05 ` burnus at gcc dot gnu.org
2021-03-16 10:29 ` aasdelat at yahoo dot es
2021-03-16 11:19 ` burnus at gcc dot gnu.org
2021-03-18 17:50 ` aserranot at aemet dot es
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).