This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20373] INTRINSIC symbols can be given the wrong type
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2007 10:12:51 -0000
- Subject: [Bug fortran/20373] INTRINSIC symbols can be given the wrong type
- References: <bug-20373-8513@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from dfranke at gcc dot gnu dot org 2007-05-19 11:12 -------
Tobi, currently intrinsics don't start with any type at all. As their symbols
are processed in resolve.c (resolve_symbol), they are assigned a default type:
/* Assign default type to symbols that need one and don't have one. */
As shown by gfc_show_symbol():
symbol conjg (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC INTRINSIC FUNCTION)
result: conjg
symbol conjg (REAL 4)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC INTRINSIC FUNCTION IMPLICIT-TYPE)
result: conjg
(the correct type for CONJG would be COMPLEX 4)
Thus, we should make sure that each intrinsic starts with the correct type to
begin with and emit a warning/error if someone attempts to change that type
(wherever the right place for this may be)?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20373