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/46196] [OOP] gfortran compiles invalid generic TBP: dummy arguments are type compatible


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

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-10-30 11:52:46 UTC ---
> Can we find any test case which is sensitive to this change?

I di not find one in store!-(
Am I correct to expect that such test will be of the "reject valid" kind?

Clearly
(dt1->ts.type == BT_DERIVED && derived1 == dt1->ts.u.derived)
                && !(dt1->ts.type == BT_DERIVED && derived1 ==
dt1->ts.u.derived)
is always false and the third test is the same. So these tests are just nops
and the 'return 0' will never be reached. Then the if-else block reduces to

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

For this case we need a test with 'dt1->ts.type == BT_DERIVED' and
'dt1->ts.u.derived == derived1' and one of these conditions false for dt2. My
understanding of the code is not good enough to reach a valid test from that (I
don't know where derived* come from.


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