This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/20373] INTRINSIC symbols can be given the wrong type



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]