diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 10:49:56 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 10:49:56 +0000 |
commit | b266f68c6db0161616b4e7f3735e888e1486cd8d (patch) | |
tree | c1e1aa24e171ab1a431b8e48c0670b792d0c34b5 /gcc/fortran/intrinsic.c | |
parent | 666f4bf028657b6b4d9f0e773d7ed1dff78a7e7f (diff) | |
download | gcc-b266f68c6db0161616b4e7f3735e888e1486cd8d.tar.gz |
2010-08-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/44595
* intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
'gfc_intrinsic_arg'.
(check_arglist,check_specific): Add reference to 'name' field.
(init_arglist): Remove reference to 'name' field.
* intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
* check.c (variable_check): Reverse order of checks. Respect intent of
formal arg.
(int_or_proc_check): New function.
(coarray_check): New function.
(allocatable_check): New function.
(gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
(gfc_check_complex): Use 'int_or_real_check'.
(gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
gfc_check_ucobound): Use 'coarray_check'.
(gfc_check_pack): Use 'real_or_complex_check'.
(gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
'int_or_proc_check'.
(scalar_check,type_check,numeric_check,int_or_real_check,
real_or_complex_check,kind_check,double_check,logical_array_check,
array_check,same_type_check,rank_check,nonoptional_check,
kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
to 'name' field.
2010-08-11 Janus Weil <janus@gcc.gnu.org>
Steve Kargl <kargl@gcc.gnu.org>
PR fortran/44595
* gfortran.dg/move_alloc_3.f90: New.
* gfortran.dg/random_seed_2.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 121afc0120f..c9e3833fd2e 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -36,7 +36,7 @@ bool gfc_init_expr_flag = false; checked. */ const char *gfc_current_intrinsic; -const char *gfc_current_intrinsic_arg[MAX_INTRINSIC_ARGS]; +gfc_intrinsic_arg *gfc_current_intrinsic_arg[MAX_INTRINSIC_ARGS]; locus *gfc_current_intrinsic_where; static gfc_intrinsic_sym *functions, *subroutines, *conversion, *next_sym; @@ -3390,7 +3390,7 @@ check_arglist (gfc_actual_arglist **ap, gfc_intrinsic_sym *sym, { if (error_flag) gfc_error ("Type of argument '%s' in call to '%s' at %L should " - "be %s, not %s", gfc_current_intrinsic_arg[i], + "be %s, not %s", gfc_current_intrinsic_arg[i]->name, gfc_current_intrinsic, &actual->expr->where, gfc_typename (&formal->ts), gfc_typename (&actual->expr->ts)); @@ -3609,7 +3609,7 @@ init_arglist (gfc_intrinsic_sym *isym) { if (i >= MAX_INTRINSIC_ARGS) gfc_internal_error ("init_arglist(): too many arguments"); - gfc_current_intrinsic_arg[i++] = formal->name; + gfc_current_intrinsic_arg[i++] = formal; } } @@ -3678,8 +3678,8 @@ check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag) if (gfc_check_conformance (first_expr, arg->expr, "arguments '%s' and '%s' for " "intrinsic '%s'", - gfc_current_intrinsic_arg[0], - gfc_current_intrinsic_arg[n], + gfc_current_intrinsic_arg[0]->name, + gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic) == FAILURE) return FAILURE; } |