This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46196] [OOP] gfortran compiles invalid generic TBP: dummy arguments are type compatible
- 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: Sat, 30 Oct 2010 11:52:52 +0000
- Subject: [Bug fortran/46196] [OOP] gfortran compiles invalid generic TBP: dummy arguments are type compatible
- Auto-submitted: auto-generated
- References: <bug-46196-4@http.gcc.gnu.org/bugzilla/>
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.