re PR fortran/21177 (wrong code with NULL())
PR fortran/21177 * interface.c (compare_parameter): Ignore type for EXPR_NULL only if type is BT_UNKNOWN. * gfortran.dg/pr21177.f90: New test From-SVN: r98837
This commit is contained in:
parent
b9f8dfba42
commit
90aeadcb5c
|
@ -1,3 +1,9 @@
|
|||
2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/21177
|
||||
* interface.c (compare_parameter): Ignore type for EXPR_NULL
|
||||
only if type is BT_UNKNOWN.
|
||||
|
||||
2005-04-25 Paul Brook <paul@codesourcery.com>
|
||||
Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
|
|
|
@ -1096,7 +1096,7 @@ compare_parameter (gfc_symbol * formal, gfc_expr * actual,
|
|||
return compare_interfaces (formal, actual->symtree->n.sym, 0);
|
||||
}
|
||||
|
||||
if (actual->expr_type != EXPR_NULL
|
||||
if ((actual->expr_type != EXPR_NULL || actual->ts.type != BT_UNKNOWN)
|
||||
&& !gfc_compare_types (&formal->ts, &actual->ts))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR fortran/21177
|
||||
* gfortran.dg/pr21177.f90: New test.
|
||||
|
||||
2005-04-27 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/21171
|
||||
|
@ -5,15 +10,15 @@
|
|||
|
||||
2004-04-27 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* gcc.dg/tree-ssa/gen-vect-11.c, gcc.dg/tree-ssa/gen-vect-11a.c,
|
||||
gcc.dg/tree-ssa/gen-vect-11b.c, gcc.dg/tree-ssa/gen-vect-11c.c,
|
||||
gcc.dg/tree-ssa/gen-vect-2.c, gcc.dg/tree-ssa/gen-vect-25.c,
|
||||
gcc.dg/tree-ssa/gen-vect-26.c, gcc.dg/tree-ssa/gen-vect-28.c,
|
||||
gcc.dg/tree-ssa/gen-vect-32.c: New.
|
||||
* gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Fix dg-final.
|
||||
* gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c: Remove xfail,
|
||||
don't run on PPC32.
|
||||
|
||||
* gcc.dg/tree-ssa/gen-vect-11.c, gcc.dg/tree-ssa/gen-vect-11a.c,
|
||||
gcc.dg/tree-ssa/gen-vect-11b.c, gcc.dg/tree-ssa/gen-vect-11c.c,
|
||||
gcc.dg/tree-ssa/gen-vect-2.c, gcc.dg/tree-ssa/gen-vect-25.c,
|
||||
gcc.dg/tree-ssa/gen-vect-26.c, gcc.dg/tree-ssa/gen-vect-28.c,
|
||||
gcc.dg/tree-ssa/gen-vect-32.c: New.
|
||||
* gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Fix dg-final.
|
||||
* gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c: Remove xfail,
|
||||
don't run on PPC32.
|
||||
|
||||
2005-04-27 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR c/21213
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
! { dg-do run }
|
||||
! PR fortran/21177
|
||||
module mymod
|
||||
interface tt
|
||||
module procedure tt_i, tt_r, tt_l, tt_c4, tt_c8
|
||||
end interface tt
|
||||
contains
|
||||
function tt_l(x) result(y)
|
||||
integer :: y
|
||||
logical, pointer :: x
|
||||
y = 0
|
||||
end function
|
||||
function tt_i(x) result(y)
|
||||
integer :: y
|
||||
integer, pointer :: x
|
||||
y = 1
|
||||
end function
|
||||
function tt_r(x) result(y)
|
||||
integer :: y
|
||||
real, pointer :: x
|
||||
y = 2
|
||||
end function
|
||||
function tt_c4(x) result(y)
|
||||
integer :: y
|
||||
complex(4), pointer :: x
|
||||
y = 3
|
||||
end function
|
||||
function tt_c8(x) result(y)
|
||||
integer :: y
|
||||
complex(8), pointer :: x
|
||||
y = 4
|
||||
end function
|
||||
end module mymod
|
||||
|
||||
program test
|
||||
use mymod
|
||||
logical, pointer :: l
|
||||
integer, pointer :: i
|
||||
real, pointer :: r
|
||||
complex(4), pointer :: c4
|
||||
complex(8), pointer :: c8
|
||||
|
||||
if (tt(l) /= 0) call abort()
|
||||
if (tt(i) /= 1) call abort()
|
||||
if (tt(r) /= 2) call abort()
|
||||
if (tt(c4) /= 3) call abort()
|
||||
if (tt(c8) /= 4) call abort()
|
||||
if (tt(null(l)) /= 0) call abort()
|
||||
if (tt(null(i)) /= 1) call abort()
|
||||
if (tt(null(r)) /= 2) call abort()
|
||||
if (tt(null(c4)) /= 3) call abort()
|
||||
if (tt(null(c8)) /= 4) call abort()
|
||||
end program test
|
Loading…
Reference in New Issue