public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46244] New: gfc_compare_derived_types is buggy
@ 2010-10-30 14:24 janus at gcc dot gnu.org
  2010-10-30 14:30 ` [Bug fortran/46244] " janus at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: janus at gcc dot gnu.org @ 2010-10-30 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: gfc_compare_derived_types is buggy
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


As noted by Dominique in PR 46196 comment #5, there is a problem in
gfc_compare_derived_types (interface.c):

--- ../_clean/gcc/fortran/interface.c    2010-10-27 23:47:20.000000000 +0200
+++ gcc/fortran/interface.c    2010-10-29 10:55:07.000000000 +0200
@@ -445,16 +445,16 @@ gfc_compare_derived_types (gfc_symbol *d
       /* Make sure that link lists do not put this function into an 
     endless recursive loop!  */
       if (!(dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived)
-        && !(dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived)
+        && !(dt2->ts.type == BT_DERIVED && derived2 == dt2->ts.u.derived)
        && gfc_compare_types (&dt1->ts, &dt2->ts) == 0)
    return 0;

       else if ((dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived)
-        && !(dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived))
+        && !(dt2->ts.type == BT_DERIVED && derived2 == dt2->ts.u.derived))
    return 0;

       else if (!(dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived)
-        && (dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived))
+        && (dt2->ts.type == BT_DERIVED && derived2 == dt2->ts.u.derived))
    return 0;

       dt1 = dt1->next;


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-01-19 18:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30 14:24 [Bug fortran/46244] New: gfc_compare_derived_types is buggy janus at gcc dot gnu.org
2010-10-30 14:30 ` [Bug fortran/46244] " janus at gcc dot gnu.org
2010-10-30 14:54 ` janus at gcc dot gnu.org
2010-10-30 15:04 ` janus at gcc dot gnu.org
2010-10-30 15:11 ` janus at gcc dot gnu.org
2010-10-30 16:02 ` mikael at gcc dot gnu.org
2010-10-30 16:04 ` mikael at gcc dot gnu.org
2010-11-05 13:56 ` dominiq at lps dot ens.fr
2010-11-05 15:01 ` burnus at gcc dot gnu.org
2010-11-06 13:00 ` burnus at gcc dot gnu.org
2010-11-10 17:45 ` burnus at gcc dot gnu.org
2010-11-10 17:49 ` burnus at gcc dot gnu.org
2011-02-20 16:58 ` mikael at gcc dot gnu.org
2011-02-20 17:01 ` mikael at gcc dot gnu.org
2011-02-20 21:07 ` dominiq at lps dot ens.fr
2011-02-20 22:20 ` dominiq at lps dot ens.fr
2011-02-20 23:18 ` mikael at gcc dot gnu.org
2011-02-21  9:37 ` paul.richard.thomas at gmail dot com
2011-10-02 17:47 ` dominiq at lps dot ens.fr
2011-10-02 22:06 ` mikael at gcc dot gnu.org
2024-01-19 18:00 ` mikael at gcc dot gnu.org

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