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/46244] gfc_compare_derived_types is buggy


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46244

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus@net-b.de, pault at
                   |                            |gcc dot gnu.org

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-11-05 13:56:29 UTC ---
Is the code in comment #5 valid Fortran? If no, what kind of error should it
emit? (If yes, I would be interested to know what it would be supposed to
do!-).

If I replace one of the 

      type b
              sequence
              type(a), pointer :: pa
      end type b

with

      type b
              sequence
              class(a), pointer :: pa
      end type b

the code is rejected with

Error: Type mismatch in argument 'x' at (1); passed TYPE(a) to TYPE(a)

Is this correct?

If I do the replacement in both places, I am back to the infinite loop (-> it
gives a segmentation fault).
Again is the modified code valid?


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