diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-12 14:06:19 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-12 14:06:19 +0000 |
commit | d660687874534bfc6eb3f2dfecf42bb5fdab50a1 (patch) | |
tree | 3f6f1f97c22b8ddc8b4db0231e42b95da118a586 /gcc/fortran/trans-expr.c | |
parent | 987727ef0723fe3f5c879b5e2af226888254d4e0 (diff) | |
download | ppe42-gcc-d660687874534bfc6eb3f2dfecf42bb5fdab50a1.tar.gz ppe42-gcc-d660687874534bfc6eb3f2dfecf42bb5fdab50a1.zip |
fortran/
PR fortran/12841
* interface.c (compare_parameter, compare_actual_formal): Don't
check types and array shapes for NULL()
* trans-expr.c (conv_function_call): No double indirection for
NULL()
( I had accidentally committed the interface.c part before)
testuite/
PR fortran/12841
* gfortran.fortran-torture/execute/null_arg.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 2258ce6377d..e4953f6f080 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1100,10 +1100,12 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, if (argss == gfc_ss_terminator) { gfc_conv_expr_reference (&parmse, arg->expr); - if (formal && formal->sym->attr.pointer) + if (formal && formal->sym->attr.pointer + && arg->expr->expr_type != EXPR_NULL) { /* Scalar pointer dummy args require an extra level of - indirection. */ + indirection. The null pointer already contains + this level of indirection. */ parmse.expr = gfc_build_addr_expr (NULL, parmse.expr); } } |