This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46244] gfc_compare_derived_types is buggy
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 5 Nov 2010 13:56:43 +0000
- Subject: [Bug fortran/46244] gfc_compare_derived_types is buggy
- Auto-submitted: auto-generated
- References: <bug-46244-4@http.gcc.gnu.org/bugzilla/>
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?