Am 10.09.2012 20:58, schrieb Paul Richard Thomas:
Bootstrapped and regtested on FC9/x86_64 - OK for trunk?
The following test case doesn't work; it should print "Overloaded" - and
does so with crayftn. But with your patch, it doesn't.
Tobias
module a_mod
type :: a
contains
procedure :: a_ass
generic :: assignment(=) => a_ass
end type a
type c
type(a) :: ta
end type c
type :: b
type(c) :: tc
end type b
contains
impure elemental subroutine a_ass(out, in)
class(a), intent(out) :: out
type(a), intent(in) :: in
print *, "Overloaded"
end subroutine a_ass
end module a_mod
program assign
use a_mod
type(b) :: tt
type(b) :: tb1
tt = tb1
end program assign
+ build_assignment (gfc_exec_op op, gfc_expr *expr1, gfc_expr *expr2, +
gfc_component *comp1, gfc_component *comp2, locus loc)
For comp1/comp2, I am wondering whether one shouldn't add a
gcc_assert ((comp1 && comp2) || (!comp1 && !comp2));
+ get_temp_from_expr (gfc_expr *e, gfc_namespace *ns)
Not that we make so much use of it, but its symbol could be a candidate
for attr.artificial. (I don't know whether it should.)