OSDN Git Service

PR fortran/16580
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Oct 2006 13:34:16 +0000 (13:34 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Oct 2006 13:34:16 +0000 (13:34 +0000)
commit37e0271a833027439fd91f2364506a04d96cb72c
tree7d388fa3ec358e48da0a798ae99b8b3ed8f52f37
parent8e3eaeaffe8add93338478044b42b881ade28608
PR fortran/16580
PR fortran/29288

* gcc/fortran/intrinsic.c (add_sym): Define the actual_ok when a
gfc_intrinsic_sym structure is filled.
(gfc_intrinsic_actual_ok): New function.
(add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s, add_sym_4s,
add_sym_5s): Intrinsic subroutines are not allowed as actual
arguments, so we remove argument actual_ok.
(add_functions): Correct the values for actual_ok of all intrinsics.
(add_subroutines): Remove the actual_ok argument, which was never used.
* gcc/fortran/intrinsic.h (gfc_intrinsic_actual_ok): New prototype.
* gcc/fortran/gfortran.h (gfc_resolve_index_func): New prototype.
* gcc/fortran/resolve.c (resolve_actual_arglist): Check whether
an intrinsic used as an argument list is allowed there.
* gcc/fortran/iresolve.c (gfc_resolve_index_func): New function.
(gfc_resolve_len): Change intrinsic function name to agree with
libgfortran.
* gcc/fortran/trans-decl.c (gfc_get_extern_function_decl): Add
new case, because some specific intrinsics take 3 arguments.
* gcc/fortran/intrinsic.texi: DIMAG is a GNU extension.

* libgfortran/Makefile.am: Add the new files to the build
process, and rules to build them.
* libgfortran/Makefile.in: Regenerate.
* libgfortran/m4/misc_specifics.m4: New file.
* libgfortran/m4/specific.m4: Add new special cases for function
with complex argument and real result, like abs_c* and aimag_c*.
* libgfortran/intrinsics/f2c_specifics.F90: Add specifics for
AIMAG, ASINH, ACOSH and ATANH.
* libgfortran/generated/_aimag_c4.F90: New file.
* libgfortran/generated/_aimag_c8.F90: New file.
* libgfortran/generated/_asinh_r10.F90: New file.
* libgfortran/generated/_acosh_r16.F90: New file.
* libgfortran/generated/_aimag_c10.F90: New file.
* libgfortran/generated/_atanh_r16.F90: New file.
* libgfortran/generated/_acosh_r4.F90: New file.
* libgfortran/generated/_acosh_r8.F90: New file.
* libgfortran/generated/_asinh_r4.F90: New file.
* libgfortran/generated/_asinh_r8.F90: New file.
* libgfortran/generated/_asinh_r16.F90: New file.
* libgfortran/generated/_atanh_r4.F90: New file.
* libgfortran/generated/_atanh_r8.F90: New file.
* libgfortran/generated/_acosh_r10.F90: New file.
* libgfortran/generated/misc_specifics.F90: New file.
* libgfortran/generated/_aimag_c16.F90: New file.
* libgfortran/generated/_atanh_r10.F90: New file.

* gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90:
Add tests for using all possible intrinsics as actual arguments.
* gcc/testsuite/gfortran.dg/specifics_1.f90: Add tests for using
all possible intrinsics as actual arguments.
* gcc/testsuite/gfortran.dg/specifics_2.f90: New file.
* gcc/testsuite/gfortran.dg/specifics_3.f90: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117534 138bc75d-0d04-0410-961f-82ee72b054a4
36 files changed:
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/intrinsic.c
gcc/fortran/intrinsic.h
gcc/fortran/intrinsic.texi
gcc/fortran/iresolve.c
gcc/fortran/resolve.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/specifics_1.f90
gcc/testsuite/gfortran.dg/specifics_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/specifics_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/generated/_acosh_r10.F90 [new file with mode: 0644]
libgfortran/generated/_acosh_r16.F90 [new file with mode: 0644]
libgfortran/generated/_acosh_r4.F90 [new file with mode: 0644]
libgfortran/generated/_acosh_r8.F90 [new file with mode: 0644]
libgfortran/generated/_aimag_c10.F90 [new file with mode: 0644]
libgfortran/generated/_aimag_c16.F90 [new file with mode: 0644]
libgfortran/generated/_aimag_c4.F90 [new file with mode: 0644]
libgfortran/generated/_aimag_c8.F90 [new file with mode: 0644]
libgfortran/generated/_asinh_r10.F90 [new file with mode: 0644]
libgfortran/generated/_asinh_r16.F90 [new file with mode: 0644]
libgfortran/generated/_asinh_r4.F90 [new file with mode: 0644]
libgfortran/generated/_asinh_r8.F90 [new file with mode: 0644]
libgfortran/generated/_atanh_r10.F90 [new file with mode: 0644]
libgfortran/generated/_atanh_r16.F90 [new file with mode: 0644]
libgfortran/generated/_atanh_r4.F90 [new file with mode: 0644]
libgfortran/generated/_atanh_r8.F90 [new file with mode: 0644]
libgfortran/generated/misc_specifics.F90 [new file with mode: 0644]
libgfortran/intrinsics/f2c_specifics.F90
libgfortran/m4/misc_specifics.m4 [new file with mode: 0644]
libgfortran/m4/specific.m4