public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55099] New: Surprising 'PROCEDURE attribute conflicts with INTENT attribute' error
@ 2012-10-27 15:30 Joost.VandeVondele at mat dot ethz.ch
2012-10-27 17:29 ` [Bug fortran/55099] Surprising but valid " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-10-27 15:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55099
Bug #: 55099
Summary: Surprising 'PROCEDURE attribute conflicts with INTENT
attribute' error
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Joost.VandeVondele@mat.ethz.ch
In the following, a surprising (but correct) error message is issued. Maybe it
is possible to improve the wording to point at the other option... looking at
ifort's error message is cheating ;-) but certainly that one helps the
non-expert.
SUBROUTINE S(num_proc_2d)
INTEGER, INTENT(IN) :: num_proc_2d
INTEGER :: proc_x,proc_y
proc_x=num_proc_2d(1) ; proc_x=num_proc_2d(2)
END SUBROUTINE
Error message:
SUBROUTINE S(num_proc_2d)
1
Error: PROCEDURE attribute conflicts with INTENT attribute in 'num_proc_2d' at
(1)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55099] Surprising but valid 'PROCEDURE attribute conflicts with INTENT attribute' error
2012-10-27 15:30 [Bug fortran/55099] New: Surprising 'PROCEDURE attribute conflicts with INTENT attribute' error Joost.VandeVondele at mat dot ethz.ch
@ 2012-10-27 17:29 ` burnus at gcc dot gnu.org
2012-10-27 17:38 ` Joost.VandeVondele at mat dot ethz.ch
2014-01-18 17:33 ` dominiq at lps dot ens.fr
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-10-27 17:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55099
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |burnus at gcc dot gnu.org
Summary|Surprising 'PROCEDURE |Surprising but valid
|attribute conflicts with |'PROCEDURE attribute
|INTENT attribute' error |conflicts with INTENT
| |attribute' error
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-10-27 17:29:00 UTC ---
I don't know whether you'd prefer NAG's message: "Inconsistent usage of
NUM_PROC_2D". Nor I am not sure that Intel's message is much better than
gfortran's or NAG's: "This name has not been declared as an array or a
function."
How about the following (which of course implies that the users didn't intent
to use an array - if they did, Intel's becomes more helpful.)
PathScale/Oracles/Open64/Crayftn have: "NUM_PROC_2D" has the INTENT attribute,
therefore it must not be used as an external function name.
PGI has "Illegal attribute - intent specified for dummy subprogram argument
num_proc_2d"
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55099] Surprising but valid 'PROCEDURE attribute conflicts with INTENT attribute' error
2012-10-27 15:30 [Bug fortran/55099] New: Surprising 'PROCEDURE attribute conflicts with INTENT attribute' error Joost.VandeVondele at mat dot ethz.ch
2012-10-27 17:29 ` [Bug fortran/55099] Surprising but valid " burnus at gcc dot gnu.org
@ 2012-10-27 17:38 ` Joost.VandeVondele at mat dot ethz.ch
2014-01-18 17:33 ` dominiq at lps dot ens.fr
2 siblings, 0 replies; 4+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-10-27 17:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55099
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Joost.VandeVondele at mat
| |dot ethz.ch
--- Comment #2 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-10-27 17:38:34 UTC ---
(In reply to comment #1)
> How about the following (which of course implies that the users didn't intent
> to use an array - if they did, Intel's becomes more helpful.)
Indeed, I was coding this with the intent of declaring it as an array, no
doubt, passing an array is much more common than passing a procedure. Note that
intel's location is also more useful in that case. I think the usefulness of
Intel's message lies in the fact that it suggests the common cause of the
error. Even with the experience I have, I first started to look for a procedure
with the same name as the variable.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/55099] Surprising but valid 'PROCEDURE attribute conflicts with INTENT attribute' error
2012-10-27 15:30 [Bug fortran/55099] New: Surprising 'PROCEDURE attribute conflicts with INTENT attribute' error Joost.VandeVondele at mat dot ethz.ch
2012-10-27 17:29 ` [Bug fortran/55099] Surprising but valid " burnus at gcc dot gnu.org
2012-10-27 17:38 ` Joost.VandeVondele at mat dot ethz.ch
@ 2014-01-18 17:33 ` dominiq at lps dot ens.fr
2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-01-18 17:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55099
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-18
Ever confirmed|0 |1
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at r206753.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-18 17:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 15:30 [Bug fortran/55099] New: Surprising 'PROCEDURE attribute conflicts with INTENT attribute' error Joost.VandeVondele at mat dot ethz.ch
2012-10-27 17:29 ` [Bug fortran/55099] Surprising but valid " burnus at gcc dot gnu.org
2012-10-27 17:38 ` Joost.VandeVondele at mat dot ethz.ch
2014-01-18 17:33 ` dominiq at lps dot ens.fr
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).