gcc/libgfortran/generated/minval_r10.c

547 lines
14 KiB
C
Raw Normal View History

re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
/* Implementation of the MINVAL intrinsic
Copyright 2002, 2007, 2009 Free Software Foundation, Inc.
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
Libgfortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
minloc1.m4: Update copyright year and ajust headers order. * m4/minloc1.m4: Update copyright year and ajust headers order. * m4/maxloc1.m4: Likewise. * m4/in_pack.m4: Likewise. * m4/sum.m4: Likewise. * m4/fraction.m4: Likewise. * m4/all.m4: Likewise. * m4/set_exponent.m4: Likewise. * m4/transpose.m4: Likewise. * m4/eoshift1.m4: Likewise. * m4/spacing.m4: Likewise. * m4/eoshift3.m4: Likewise. * m4/minval.m4: Likewise. * m4/count.m4: Likewise. * m4/maxval.m4: Likewise. * m4/exponent.m4: Likewise. * m4/shape.m4: Likewise. * m4/head.m4: Likewise. * m4/cshift1.m4: Likewise. * m4/minloc0.m4: Likewise. * m4/nearest.m4: Likewise. * m4/maxloc0.m4: Likewise. * m4/pow.m4: Likewise. * m4/in_unpack.m4: Likewise. * m4/matmull.m4: Likewise. * m4/product.m4: Likewise. * m4/reshape.m4: Likewise. * m4/any.m4: Likewise. * m4/rrspacing.m4: Likewise. * m4/matmul.m4: Likewise. * runtime/backtrace.c: Likewise. * runtime/environ.c: Likewise. * runtime/in_pack_generic.c: Likewise. * runtime/compile_options.c: Likewise. * runtime/in_unpack_generic.c: Likewise. * runtime/main.c: Likewise. * runtime/stop.c: Likewise. * runtime/string.c: Likewise. * runtime/memory.c: Likewise. * runtime/error.c: Likewise. * runtime/pause.c: Likewise. * intrinsics/ierrno.c: Likewise. * intrinsics/system_clock.c: Likewise. * intrinsics/cshift0.c: Likewise. * intrinsics/unlink.c: Likewise. * intrinsics/ctime.c: Likewise. * intrinsics/etime.c: Likewise. * intrinsics/cpu_time.c: Likewise. * intrinsics/malloc.c: Likewise. * intrinsics/hostnm.c: Likewise. * intrinsics/sleep.c: Likewise. * intrinsics/exit.c: Likewise. * intrinsics/perror.c: Likewise. * intrinsics/transpose_generic.c: Likewise. * intrinsics/pack_generic.c: Likewise. * intrinsics/spread_generic.c: Likewise. * intrinsics/stat.c: Likewise. * intrinsics/string_intrinsics.c: Likewise. * intrinsics/getcwd.c: Likewise. * intrinsics/date_and_time.c: Likewise. * intrinsics/unpack_generic.c: Likewise. * intrinsics/move_alloc.c: Likewise. * intrinsics/getlog.c: Likewise. * intrinsics/eoshift0.c: Likewise. * intrinsics/eoshift2.c: Likewise. * intrinsics/reshape_generic.c: Likewise. * intrinsics/system.c: Likewise. * intrinsics/iso_c_binding.c: Likewise. * intrinsics/env.c: Likewise. * intrinsics/kill.c: Likewise. * intrinsics/reshape_packed.c: Likewise. * intrinsics/time.c: Likewise. * intrinsics/gerror.c: Likewise. * intrinsics/access.c: Likewise. * intrinsics/fnum.c: Likewise. * intrinsics/abort.c: Likewise. * intrinsics/rename.c: Likewise. * intrinsics/signal.c: Likewise. * intrinsics/symlnk.c: Likewise. * intrinsics/random.c: Likewise. * intrinsics/umask.c: Likewise. * intrinsics/getXid.c: Likewise. * intrinsics/rand.c: Likewise. * intrinsics/chdir.c: Likewise. * intrinsics/chmod.c: Likewise. * intrinsics/clock.c: Likewise. * intrinsics/args.c: Likewise. * intrinsics/link.c: Likewise. * c99_protos.h: Likewise. * config/fpu-387.h: Likewise. * config/fpu-aix.h: Likewise. * config/fpu-sysv.h: Likewise. * config/fpu-generic.h: Likewise. * config/fpu-glibc.h: Likewise. * io/file_pos.c: Likewise. * io/open.c: Likewise. * io/size_from_kind.c: Likewise. * io/close.c: Likewise. * io/list_read.c: Likewise. * io/read.c: Likewise. * io/inquire.c: Likewise. * io/unit.c: Likewise. * io/unix.c: Likewise. * io/transfer.c: Likewise. * io/intrinsics.c: Likewise. * io/format.c: Likewise. * io/lock.c: Likewise. * io/write.c: Likewise. * io/write_float.def: Likewise. * fmain.c: Likewise. * generated/minval_r8.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/eoshift3_4.c: Regenerate. * generated/transpose_c8.c: Regenerate. * generated/any_l16.c: Regenerate. * generated/eoshift1_8.c: Regenerate. * generated/pow_r8_i8.c: Regenerate. * generated/reshape_r16.c: Regenerate. * generated/pow_i4_i16.c: Regenerate. * generated/maxval_i2.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/exponent_r16.c: Regenerate. * generated/maxloc0_4_r4.c: Regenerate. * generated/fraction_r16.c: Regenerate. * generated/in_unpack_i8.c: Regenerate. * generated/matmul_r8.c: Regenerate. * generated/product_i2.c: Regenerate. * generated/fraction_r4.c: Regenerate. * generated/minloc0_4_r16.c: Regenerate. * generated/reshape_c4.c: Regenerate. * generated/minloc0_4_i1.c: Regenerate. * generated/maxloc0_4_r16.c: Regenerate. * generated/maxloc0_4_i2.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/set_exponent_r8.c: Regenerate. * generated/in_unpack_i16.c: Regenerate. * generated/transpose_c16.c: Regenerate. * generated/maxloc0_8_i8.c: Regenerate. * generated/pow_c4_i8.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/sum_i1.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/transpose_r10.c: Regenerate. * generated/pow_i8_i4.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/minloc0_16_i8.c: Regenerate. * generated/maxloc0_16_i8.c: Regenerate. * generated/nearest_r8.c: Regenerate. * generated/spacing_r16.c: Regenerate. * generated/transpose_i8.c: Regenerate. * generated/count_16_l16.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/count_8_l8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc0_16_i16.c: Regenerate. * generated/matmul_r16.c: Regenerate. * generated/eoshift1_16.c: Regenerate. * generated/minloc0_4_r4.c: Regenerate. * generated/pow_c16_i16.c: Regenerate. * generated/set_exponent_r10.c: Regenerate. * generated/pow_i16_i16.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/pow_c16_i4.c: Regenerate. * generated/rrspacing_r10.c: Regenerate. * generated/in_pack_c16.c: Regenerate. * generated/minloc0_4_i2.c: Regenerate. * generated/maxloc0_8_i1.c: Regenerate. * generated/reshape_i4.c: Regenerate. * generated/minloc0_8_i8.c: Regenerate. * generated/matmul_c8.c: Regenerate. * generated/spacing_r4.c: Regenerate. * generated/in_pack_c4.c: Regenerate. * generated/all_l16.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/sum_i2.c: Regenerate. * generated/minloc0_16_i1.c: Regenerate. * generated/reshape_c16.c: Regenerate. * generated/maxloc0_16_i1.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/reshape_r10.c: Regenerate. * generated/exponent_r10.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/any_l4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/fraction_r10.c: Regenerate. * generated/maxloc0_16_i16.c: Regenerate. * generated/shape_i4.c: Regenerate. * generated/pow_r16_i8.c: Regenerate. * generated/maxloc0_8_r4.c: Regenerate. * generated/rrspacing_r8.c: Regenerate. * generated/pow_c10_i4.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc0_4_r10.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/minloc0_8_i16.c: Regenerate. * generated/maxloc0_4_r10.c: Regenerate. * generated/maxloc0_8_i16.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/minloc0_16_r4.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc0_16_r4.c: Regenerate. * generated/transpose_c10.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/minloc0_8_i1.c: Regenerate. * generated/maxloc0_4_i4.c: Regenerate. * generated/transpose_r4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/pow_i16_i8.c: Regenerate. * generated/cshift1_4.c: Regenerate. * generated/maxloc0_8_i2.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/nearest_r16.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/count_4_l16.c: Regenerate. * generated/pow_c8_i8.c: Regenerate. * generated/matmul_i8.c: Regenerate. * generated/in_pack_i4.c: Regenerate. * generated/pow_i4_i8.c: Regenerate. * generated/minloc0_16_i2.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/maxloc0_16_i2.c: Regenerate. * generated/exponent_r4.c: Regenerate. * generated/spacing_r10.c: Regenerate. * generated/matmul_c16.c: Regenerate. * generated/pow_c4_i16.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/count_4_l4.c: Regenerate. * generated/shape_i16.c: Regenerate. * generated/minval_i1.c: Regenerate. * generated/maxloc1_4_i1.c: Regenerate. * generated/matmul_r10.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/pow_r10_i8.c: Regenerate. * generated/minloc0_8_r4.c: Regenerate. * generated/in_unpack_c4.c: Regenerate. * generated/matmul_l4.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/minloc0_16_r16.c: Regenerate. * generated/reshape_r8.c: Regenerate. * generated/pow_r10_i16.c: Regenerate. * generated/all_l4.c: Regenerate. * generated/in_pack_c10.c: Regenerate. * generated/minloc0_4_i4.c: Regenerate. * generated/minloc0_8_i2.c: Regenerate. * generated/matmul_i1.c: Regenerate. * generated/reshape_c10.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/pow_r8_i16.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/count_16_l8.c: Regenerate. * generated/transpose_c4.c: Regenerate. * generated/eoshift1_4.c: Regenerate. * generated/eoshift3_8.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/minloc1_4_i1.c: Regenerate. * generated/minval_i2.c: Regenerate. * generated/maxloc1_4_i2.c: Regenerate. * generated/pow_i8_i16.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc0_4_r8.c: Regenerate. * generated/maxloc0_16_r16.c: Regenerate. * generated/in_unpack_i4.c: Regenerate. * generated/matmul_r4.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/fraction_r8.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/set_exponent_r4.c: Regenerate. * generated/minloc0_8_r16.c: Regenerate. * generated/in_unpack_c16.c: Regenerate. * generated/reshape_c8.c: Regenerate. * generated/maxloc0_8_r16.c: Regenerate. * generated/nearest_r10.c: Regenerate. * generated/maxloc0_8_i4.c: Regenerate. * generated/pow_c4_i4.c: Regenerate. * generated/matmul_i2.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/transpose_i16.c: Regenerate. * generated/matmul_c10.c: Regenerate. * generated/minloc0_16_i4.c: Regenerate. * generated/maxloc0_16_i4.c: Regenerate. * generated/pow_i8_i8.c: Regenerate. * generated/nearest_r4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/transpose_i4.c: Regenerate. * generated/count_8_l4.c: Regenerate. * generated/minloc1_4_i2.c: Regenerate. * generated/matmul_l16.c: Regenerate. * generated/maxloc1_8_i1.c: Regenerate. * generated/minloc0_16_r10.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc0_4_r8.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/pow_r16_i16.c: Regenerate. * generated/sum_r8.c: Regenerate. * generated/pow_c16_i8.c: Regenerate. * generated/in_pack_i16.c: Regenerate. * generated/minloc0_8_i4.c: Regenerate. * generated/matmul_c4.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/reshape_i8.c: Regenerate. * generated/spacing_r8.c: Regenerate. * generated/in_pack_c8.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/minloc1_16_i1.c: Regenerate. * generated/maxloc1_16_i1.c: Regenerate. * generated/reshape_i16.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/pow_r4_i8.c: Regenerate. * generated/minloc1_8_i1.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxloc1_8_i2.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/eoshift3_16.c: Regenerate. * generated/any_l8.c: Regenerate. * generated/maxloc0_16_r10.c: Regenerate. * generated/rrspacing_r4.c: Regenerate. * generated/shape_i8.c: Regenerate. * generated/maxloc0_8_r8.c: Regenerate. * generated/minloc0_4_i16.c: Regenerate. * generated/maxloc0_4_i16.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/pow_c10_i8.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/in_unpack_c10.c: Regenerate. * generated/minloc0_8_r10.c: Regenerate. * generated/maxloc0_8_r10.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/minloc0_16_r8.c: Regenerate. * generated/pow_i16_i4.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/maxloc0_16_r8.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/maxloc0_4_i8.c: Regenerate. * generated/transpose_r8.c: Regenerate. * generated/cshift1_8.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/matmul_i4.c: Regenerate. * generated/pow_c8_i4.c: Regenerate. * generated/pow_i4_i4.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/count_8_l16.c: Regenerate. * generated/minloc1_16_i2.c: Regenerate. * generated/maxloc1_16_i2.c: Regenerate. * generated/in_pack_i8.c: Regenerate. * generated/transpose_r16.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/exponent_r8.c: Regenerate. * generated/matmul_i16.c: Regenerate. * generated/count_4_l8.c: Regenerate. * generated/pow_c8_i16.c: Regenerate. * generated/maxval_i1.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/minloc1_8_i2.c: Regenerate. * generated/pow_c10_i16.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/reshape_r4.c: Regenerate. * generated/in_unpack_c8.c: Regenerate. * generated/minloc0_8_r8.c: Regenerate. * generated/matmul_l8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/set_exponent_r16.c: Regenerate. * generated/cshift1_16.c: Regenerate. * generated/product_i1.c: Regenerate. * generated/all_l8.c: Regenerate. * generated/maxloc0_4_i1.c: Regenerate. * generated/rrspacing_r16.c: Regenerate. * generated/minloc0_4_i8.c: Regenerate. * generated/pow_r4_i16.c: Regenerate. * generated/count_16_l4.c: Regenerate. * generated/maxval_r4.c: Regenerate. From-SVN: r127990
2007-08-31 16:01:34 +02:00
#include "libgfortran.h"
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
#include <stdlib.h>
#include <assert.h>
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_REAL_10)
extern void minval_r10 (gfc_array_r10 * const restrict,
gfc_array_r10 * const restrict, const index_type * const restrict);
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
export_proto(minval_r10);
void
minval_r10 (gfc_array_r10 * const restrict retarray,
gfc_array_r10 * const restrict array,
const index_type * const restrict pdim)
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
{
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
index_type sstride[GFC_MAX_DIMENSIONS];
index_type dstride[GFC_MAX_DIMENSIONS];
const GFC_REAL_10 * restrict base;
GFC_REAL_10 * restrict dest;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
index_type rank;
index_type n;
index_type len;
index_type delta;
index_type dim;
re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * m4/ifunction_logical.m4: If the extent of "array" is less than zero, set it to zero. Use an explicit flag for breaking out of the main loop to avoid, because the data pointer for "array" may be NULL for an empty array. * m4/ifunction.m4: Likewise. * generated/all_l1.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * gfortran.dg/intrinsic_ifunction_1.f90: New test case. From-SVN: r134934
2008-05-04 21:07:28 +02:00
int continue_loop;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
/* Make dim zero based to avoid confusion. */
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * m4/ifunction_logical.m4: If the extent of "array" is less than zero, set it to zero. Use an explicit flag for breaking out of the main loop to avoid, because the data pointer for "array" may be NULL for an empty array. * m4/ifunction.m4: Likewise. * generated/all_l1.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * gfortran.dg/intrinsic_ifunction_1.f90: New test case. From-SVN: r134934
2008-05-04 21:07:28 +02:00
if (len < 0)
len = 0;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
delta = array->dim[dim].stride;
for (n = 0; n < dim; n++)
{
sstride[n] = array->dim[n].stride;
extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
if (extent[n] < 0)
extent[n] = 0;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
for (n = dim; n < rank; n++)
{
sstride[n] = array->dim[n + 1].stride;
extent[n] =
array->dim[n + 1].ubound + 1 - array->dim[n + 1].lbound;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
if (extent[n] < 0)
extent[n] = 0;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
if (retarray->data == NULL)
{
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
size_t alloc_size;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
for (n = 0; n < rank; n++)
{
retarray->dim[n].lbound = 0;
retarray->dim[n].ubound = extent[n]-1;
if (n == 0)
retarray->dim[n].stride = 1;
else
retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1];
}
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
alloc_size = sizeof (GFC_REAL_10) * retarray->dim[rank-1].stride
* extent[rank-1];
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
retarray->dim[0].lbound = 0;
retarray->dim[0].ubound = -1;
return;
}
else
retarray->data = internal_malloc_size (alloc_size);
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
else
{
if (rank != GFC_DESCRIPTOR_RANK (retarray))
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
runtime_error ("rank of return array incorrect in"
re PR libfortran/34746 (wrong formats in libgfortran's runtime_error) 2008-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34746 * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Use %ld in printf format for all bounds checking; cast all integer-like arguments to runtime_error() to long int. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Likewise. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r131514
2008-01-13 23:13:52 +01:00
" MINVAL intrinsic: is %ld, should be %ld",
(long int) (GFC_DESCRIPTOR_RANK (retarray)),
(long int) rank);
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
libgfortran.h (likely,unlikely): New makros. 2008-09-06 Tobias Burnus <burnus@net-b.de> * libgfortran.h (likely,unlikely): New makros. (runtime_warning_at,__mingw_snprintf): Add __attribute__(format()). * m4/spread.m4 (spread_'rtype_code`): Use unlikely for bounds_check. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmull.m4 (matmul_'rtype_code`): Ditto. * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmul.m4 (matmul_'rtype_code`): Ditto. * generated/minval_r8.c: Regenerated. * generated/spread_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/spread_i8.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/all_l1.c: Regenerated. * generated/matmul_r8.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/spread_i1.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/matmul_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/spread_c10.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/spread_r4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/matmul_c8.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/spread_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/matmul_i8.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/spread_c4.c: Regenerated. * generated/matmul_c16.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/matmul_r10.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/matmul_i1.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/spread_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/spread_i4.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/matmul_r4.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/matmul_i2.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/matmul_c10.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/matmul_l16.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/sum_r8.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/matmul_c4.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/spread_r8.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/spread_r16.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/matmul_i4.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/spread_c8.c: Regenerated. * generated/matmul_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/spread_c16.c: Regenerated. * generated/maxval_r4.c: Regenerated. From-SVN: r140060
2008-09-06 16:53:26 +02:00
if (unlikely (compile_options.bounds_check))
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
{
for (n=0; n < rank; n++)
{
index_type ret_extent;
ret_extent = retarray->dim[n].ubound + 1
- retarray->dim[n].lbound;
if (extent[n] != ret_extent)
runtime_error ("Incorrect extent in return value of"
re PR libfortran/34746 (wrong formats in libgfortran's runtime_error) 2008-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34746 * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Use %ld in printf format for all bounds checking; cast all integer-like arguments to runtime_error() to long int. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Likewise. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r131514
2008-01-13 23:13:52 +01:00
" MINVAL intrinsic in dimension %ld:"
" is %ld, should be %ld", (long int) n + 1,
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
(long int) ret_extent, (long int) extent[n]);
}
}
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
for (n = 0; n < rank; n++)
{
count[n] = 0;
dstride[n] = retarray->dim[n].stride;
if (extent[n] <= 0)
len = 0;
}
base = array->data;
dest = retarray->data;
re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * m4/ifunction_logical.m4: If the extent of "array" is less than zero, set it to zero. Use an explicit flag for breaking out of the main loop to avoid, because the data pointer for "array" may be NULL for an empty array. * m4/ifunction.m4: Likewise. * generated/all_l1.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * gfortran.dg/intrinsic_ifunction_1.f90: New test case. From-SVN: r134934
2008-05-04 21:07:28 +02:00
continue_loop = 1;
while (continue_loop)
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
{
const GFC_REAL_10 * restrict src;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
GFC_REAL_10 result;
src = base;
{
result = GFC_REAL_10_HUGE;
if (len <= 0)
*dest = GFC_REAL_10_HUGE;
else
{
for (n = 0; n < len; n++, src += delta)
{
if (*src < result)
result = *src;
}
*dest = result;
}
}
/* Advance to the next element. */
count[0]++;
base += sstride[0];
dest += dstride[0];
n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
the next dimension. */
count[n] = 0;
/* We could precalculate these products, but this is a less
minval_r8.c: Regenerate. * generated/minval_r8.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/eoshift3_4.c: Regenerate. * generated/any_l16.c: Regenerate. * generated/eoshift1_8.c: Regenerate. * generated/reshape_r16.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/maxloc0_4_r4.c: Regenerate. * generated/in_unpack_i8.c: Regenerate. * generated/minloc0_4_r16.c: Regenerate. * generated/reshape_c4.c: Regenerate. * generated/maxloc0_4_r16.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/in_unpack_i16.c: Regenerate. * generated/maxloc0_8_i8.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/minloc0_16_i8.c: Regenerate. * generated/maxloc0_16_i8.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/count_16_l16.c: Regenerate. * generated/count_8_l8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc0_16_i16.c: Regenerate. * generated/eoshift1_16.c: Regenerate. * generated/minloc0_4_r4.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/in_pack_c16.c: Regenerate. * generated/reshape_i4.c: Regenerate. * generated/minloc0_8_i8.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/in_pack_c4.c: Regenerate. * generated/all_l16.c: Regenerate. * generated/reshape_c16.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/reshape_r10.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/any_l4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/maxloc0_16_i16.c: Regenerate. * generated/maxloc0_8_r4.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc0_4_r10.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/minloc0_8_i16.c: Regenerate. * generated/maxloc0_4_r10.c: Regenerate. * generated/maxloc0_8_i16.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/minloc0_16_r4.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc0_16_r4.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/maxloc0_4_i4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/cshift1_4.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/count_4_l16.c: Regenerate. * generated/in_pack_i4.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/count_4_l4.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/in_unpack_c4.c: Regenerate. * generated/minloc0_8_r4.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/minloc0_16_r16.c: Regenerate. * generated/reshape_r8.c: Regenerate. * generated/all_l4.c: Regenerate. * generated/in_pack_c10.c: Regenerate. * generated/minloc0_4_i4.c: Regenerate. * generated/reshape_c10.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/count_16_l8.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/eoshift1_4.c: Regenerate. * generated/eoshift3_8.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc0_4_r8.c: Regenerate. * generated/maxloc0_16_r16.c: Regenerate. * generated/in_unpack_i4.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/in_unpack_c16.c: Regenerate. * generated/minloc0_8_r16.c: Regenerate. * generated/reshape_c8.c: Regenerate. * generated/maxloc0_8_r16.c: Regenerate. * generated/maxloc0_8_i4.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/minloc0_16_i4.c: Regenerate. * generated/maxloc0_16_i4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/count_8_l4.c: Regenerate. * generated/minloc0_16_r10.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc0_4_r8.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/sum_r8.c: Regenerate. * generated/in_pack_i16.c: Regenerate. * generated/minloc0_8_i4.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/reshape_i8.c: Regenerate. * generated/in_pack_c8.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/reshape_i16.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/eoshift3_16.c: Regenerate. * generated/any_l8.c: Regenerate. * generated/maxloc0_16_r10.c: Regenerate. * generated/minloc0_4_i16.c: Regenerate. * generated/maxloc0_8_r8.c: Regenerate. * generated/maxloc0_4_i16.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/minloc0_8_r10.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/in_unpack_c10.c: Regenerate. * generated/maxloc0_8_r10.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/minloc0_16_r8.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/maxloc0_16_r8.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/maxloc0_4_i8.c: Regenerate. * generated/cshift1_8.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/count_8_l16.c: Regenerate. * generated/in_pack_i8.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/count_4_l8.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/reshape_r4.c: Regenerate. * generated/minloc0_8_r8.c: Regenerate. * generated/in_unpack_c8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/cshift1_16.c: Regenerate. * generated/all_l8.c: Regenerate. * generated/minloc0_4_i8.c: Regenerate. * generated/maxval_r4.c: Regenerate. * generated/count_16_l4.c: Regenerate. From-SVN: r117904
2006-10-20 13:52:56 +02:00
frequently used path so probably not worth it. */
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
base -= sstride[n] * extent[n];
dest -= dstride[n] * extent[n];
n++;
if (n == rank)
{
/* Break out of the look. */
re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * m4/ifunction_logical.m4: If the extent of "array" is less than zero, set it to zero. Use an explicit flag for breaking out of the main loop to avoid, because the data pointer for "array" may be NULL for an empty array. * m4/ifunction.m4: Likewise. * generated/all_l1.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-05-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35995 * gfortran.dg/intrinsic_ifunction_1.f90: New test case. From-SVN: r134934
2008-05-04 21:07:28 +02:00
continue_loop = 0;
break;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
else
{
count[n]++;
base += sstride[n];
dest += dstride[n];
}
}
}
}
extern void mminval_r10 (gfc_array_r10 * const restrict,
gfc_array_r10 * const restrict, const index_type * const restrict,
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
gfc_array_l1 * const restrict);
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
export_proto(mminval_r10);
void
mminval_r10 (gfc_array_r10 * const restrict retarray,
gfc_array_r10 * const restrict array,
const index_type * const restrict pdim,
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
gfc_array_l1 * const restrict mask)
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
{
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
index_type sstride[GFC_MAX_DIMENSIONS];
index_type dstride[GFC_MAX_DIMENSIONS];
index_type mstride[GFC_MAX_DIMENSIONS];
GFC_REAL_10 * restrict dest;
const GFC_REAL_10 * restrict base;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
const GFC_LOGICAL_1 * restrict mbase;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
int rank;
int dim;
index_type n;
index_type len;
index_type delta;
index_type mdelta;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
int mask_kind;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
if (len <= 0)
return;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
mbase = mask->data;
mask_kind = GFC_DESCRIPTOR_SIZE (mask);
if (mask_kind == 1 || mask_kind == 2 || mask_kind == 4 || mask_kind == 8
#ifdef HAVE_GFC_LOGICAL_16
|| mask_kind == 16
#endif
)
mbase = GFOR_POINTER_TO_L1 (mbase, mask_kind);
else
runtime_error ("Funny sized logical array");
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
delta = array->dim[dim].stride;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
mdelta = mask->dim[dim].stride * mask_kind;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
for (n = 0; n < dim; n++)
{
sstride[n] = array->dim[n].stride;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
mstride[n] = mask->dim[n].stride * mask_kind;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
if (extent[n] < 0)
extent[n] = 0;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
for (n = dim; n < rank; n++)
{
sstride[n] = array->dim[n + 1].stride;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
mstride[n] = mask->dim[n + 1].stride * mask_kind;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
extent[n] =
array->dim[n + 1].ubound + 1 - array->dim[n + 1].lbound;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
if (extent[n] < 0)
extent[n] = 0;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
if (retarray->data == NULL)
{
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
size_t alloc_size;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
for (n = 0; n < rank; n++)
{
retarray->dim[n].lbound = 0;
retarray->dim[n].ubound = extent[n]-1;
if (n == 0)
retarray->dim[n].stride = 1;
else
retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1];
}
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
alloc_size = sizeof (GFC_REAL_10) * retarray->dim[rank-1].stride
* extent[rank-1];
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
re PR fortran/30321 (program crash for SUM applied to zero-size array) 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Check for extents < 0 for zero-sized arrays. If no retarray has been specified and the size is zero, return early. (`m'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/cshift1_16.c: Regenerated. * generated/cshift1_4.c: Regenerated. * generated/cshift1_8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2006-12-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/30321 * gfortran.dg/sum_zero_array_1.f90: New test. From-SVN: r120287
2006-12-30 14:16:36 +01:00
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
retarray->dim[0].lbound = 0;
retarray->dim[0].ubound = -1;
return;
}
else
retarray->data = internal_malloc_size (alloc_size);
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
else
{
if (rank != GFC_DESCRIPTOR_RANK (retarray))
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
runtime_error ("rank of return array incorrect in MINVAL intrinsic");
libgfortran.h (likely,unlikely): New makros. 2008-09-06 Tobias Burnus <burnus@net-b.de> * libgfortran.h (likely,unlikely): New makros. (runtime_warning_at,__mingw_snprintf): Add __attribute__(format()). * m4/spread.m4 (spread_'rtype_code`): Use unlikely for bounds_check. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmull.m4 (matmul_'rtype_code`): Ditto. * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmul.m4 (matmul_'rtype_code`): Ditto. * generated/minval_r8.c: Regenerated. * generated/spread_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/spread_i8.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/all_l1.c: Regenerated. * generated/matmul_r8.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/spread_i1.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/matmul_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/spread_c10.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/spread_r4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/matmul_c8.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/spread_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/matmul_i8.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/spread_c4.c: Regenerated. * generated/matmul_c16.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/matmul_r10.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/matmul_i1.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/spread_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/spread_i4.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/matmul_r4.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/matmul_i2.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/matmul_c10.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/matmul_l16.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/sum_r8.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/matmul_c4.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/spread_r8.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/spread_r16.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/matmul_i4.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/spread_c8.c: Regenerated. * generated/matmul_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/spread_c16.c: Regenerated. * generated/maxval_r4.c: Regenerated. From-SVN: r140060
2008-09-06 16:53:26 +02:00
if (unlikely (compile_options.bounds_check))
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
{
for (n=0; n < rank; n++)
{
index_type ret_extent;
ret_extent = retarray->dim[n].ubound + 1
- retarray->dim[n].lbound;
if (extent[n] != ret_extent)
runtime_error ("Incorrect extent in return value of"
re PR libfortran/34746 (wrong formats in libgfortran's runtime_error) 2008-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34746 * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Use %ld in printf format for all bounds checking; cast all integer-like arguments to runtime_error() to long int. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Likewise. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r131514
2008-01-13 23:13:52 +01:00
" MINVAL intrinsic in dimension %ld:"
" is %ld, should be %ld", (long int) n + 1,
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
(long int) ret_extent, (long int) extent[n]);
}
for (n=0; n<= rank; n++)
{
index_type mask_extent, array_extent;
array_extent = array->dim[n].ubound + 1 - array->dim[n].lbound;
mask_extent = mask->dim[n].ubound + 1 - mask->dim[n].lbound;
if (array_extent != mask_extent)
runtime_error ("Incorrect extent in MASK argument of"
re PR libfortran/34746 (wrong formats in libgfortran's runtime_error) 2008-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34746 * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Use %ld in printf format for all bounds checking; cast all integer-like arguments to runtime_error() to long int. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Likewise. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r131514
2008-01-13 23:13:52 +01:00
" MINVAL intrinsic in dimension %ld:"
" is %ld, should be %ld", (long int) n + 1,
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
(long int) mask_extent, (long int) array_extent);
}
}
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
}
for (n = 0; n < rank; n++)
{
count[n] = 0;
dstride[n] = retarray->dim[n].stride;
if (extent[n] <= 0)
return;
}
dest = retarray->data;
base = array->data;
while (base)
{
const GFC_REAL_10 * restrict src;
re PR libfortran/32972 (performance of pack/unpack) 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * iresolve.c: Don't convert array masks. 2007-08-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/32972 * libgfortran.h: Remove GFOR_POINTER_L8_TO_L4 macro. Add GFOR_POINTER_TO_L1 macro. * m4/iforeach.m4(`m'name`'rtype_qual`_'atype_code): Change argument 'mask' to gfc_array_l1. Adjust prototype. Change mask pointer to GFC_LOGICAL_1. Multiply strides by kind of mask * m4/ifunction.m4: Likewise. * intrinsics/pack_generic.c(pack_internal): Likewise. * intrinsics/unpack_generic.c(unpack_internal): Likewise. * m4/matmull.m4: Switch to GFC_LOGICAL_1. Multiply strides by kind of logical arguments a and b. * generated/matmul_l16.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r127774
2007-08-24 18:16:16 +02:00
const GFC_LOGICAL_1 * restrict msrc;
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
GFC_REAL_10 result;
src = base;
msrc = mbase;
{
result = GFC_REAL_10_HUGE;
if (len <= 0)
*dest = GFC_REAL_10_HUGE;
else
{
for (n = 0; n < len; n++, src += delta, msrc += mdelta)
{
if (*msrc && *src < result)
result = *src;
}
*dest = result;
}
}
/* Advance to the next element. */
count[0]++;
base += sstride[0];
mbase += mstride[0];
dest += dstride[0];
n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
the next dimension. */
count[n] = 0;
/* We could precalculate these products, but this is a less
minval_r8.c: Regenerate. * generated/minval_r8.c: Regenerate. * generated/maxloc1_4_r8.c: Regenerate. * generated/minloc1_16_r16.c: Regenerate. * generated/sum_i8.c: Regenerate. * generated/eoshift3_4.c: Regenerate. * generated/any_l16.c: Regenerate. * generated/eoshift1_8.c: Regenerate. * generated/reshape_r16.c: Regenerate. * generated/product_r4.c: Regenerate. * generated/maxloc1_8_i4.c: Regenerate. * generated/maxloc0_4_r4.c: Regenerate. * generated/in_unpack_i8.c: Regenerate. * generated/minloc0_4_r16.c: Regenerate. * generated/reshape_c4.c: Regenerate. * generated/maxloc0_4_r16.c: Regenerate. * generated/minloc1_8_r16.c: Regenerate. * generated/maxloc1_8_r16.c: Regenerate. * generated/in_unpack_i16.c: Regenerate. * generated/maxloc0_8_i8.c: Regenerate. * generated/sum_r16.c: Regenerate. * generated/minloc1_4_r8.c: Regenerate. * generated/maxloc1_16_r16.c: Regenerate. * generated/minloc1_16_i4.c: Regenerate. * generated/maxloc1_16_i4.c: Regenerate. * generated/minloc0_16_i8.c: Regenerate. * generated/maxloc0_16_i8.c: Regenerate. * generated/maxval_r16.c: Regenerate. * generated/count_16_l16.c: Regenerate. * generated/count_8_l8.c: Regenerate. * generated/product_c10.c: Regenerate. * generated/minloc1_8_i4.c: Regenerate. * generated/minloc0_16_i16.c: Regenerate. * generated/eoshift1_16.c: Regenerate. * generated/minloc0_4_r4.c: Regenerate. * generated/product_c4.c: Regenerate. * generated/sum_r4.c: Regenerate. * generated/in_pack_c16.c: Regenerate. * generated/reshape_i4.c: Regenerate. * generated/minloc0_8_i8.c: Regenerate. * generated/minloc1_16_r10.c: Regenerate. * generated/in_pack_c4.c: Regenerate. * generated/all_l16.c: Regenerate. * generated/reshape_c16.c: Regenerate. * generated/maxloc1_8_r8.c: Regenerate. * generated/minval_i16.c: Regenerate. * generated/reshape_r10.c: Regenerate. * generated/maxval_i4.c: Regenerate. * generated/any_l4.c: Regenerate. * generated/minval_i8.c: Regenerate. * generated/maxloc1_4_i8.c: Regenerate. * generated/maxloc0_16_i16.c: Regenerate. * generated/maxloc0_8_r4.c: Regenerate. * generated/minloc1_4_i16.c: Regenerate. * generated/minloc0_4_r10.c: Regenerate. * generated/maxloc1_4_i16.c: Regenerate. * generated/minloc0_8_i16.c: Regenerate. * generated/maxloc0_4_r10.c: Regenerate. * generated/maxloc0_8_i16.c: Regenerate. * generated/minloc1_8_r10.c: Regenerate. * generated/product_i4.c: Regenerate. * generated/minloc0_16_r4.c: Regenerate. * generated/sum_c16.c: Regenerate. * generated/maxloc1_8_r10.c: Regenerate. * generated/maxloc0_16_r4.c: Regenerate. * generated/minloc1_16_r8.c: Regenerate. * generated/maxloc0_4_i4.c: Regenerate. * generated/maxloc1_16_r8.c: Regenerate. * generated/cshift1_4.c: Regenerate. * generated/sum_r10.c: Regenerate. * generated/sum_c4.c: Regenerate. * generated/maxloc1_16_r10.c: Regenerate. * generated/count_4_l16.c: Regenerate. * generated/in_pack_i4.c: Regenerate. * generated/minloc1_8_r8.c: Regenerate. * generated/count_4_l4.c: Regenerate. * generated/maxval_r10.c: Regenerate. * generated/minloc1_4_i8.c: Regenerate. * generated/in_unpack_c4.c: Regenerate. * generated/minloc0_8_r4.c: Regenerate. * generated/product_i16.c: Regenerate. * generated/minloc0_16_r16.c: Regenerate. * generated/reshape_r8.c: Regenerate. * generated/all_l4.c: Regenerate. * generated/in_pack_c10.c: Regenerate. * generated/minloc0_4_i4.c: Regenerate. * generated/reshape_c10.c: Regenerate. * generated/minval_r4.c: Regenerate. * generated/maxloc1_4_r4.c: Regenerate. * generated/sum_i4.c: Regenerate. * generated/count_16_l8.c: Regenerate. * generated/maxval_r8.c: Regenerate. * generated/eoshift1_4.c: Regenerate. * generated/eoshift3_8.c: Regenerate. * generated/minval_r16.c: Regenerate. * generated/product_r8.c: Regenerate. * generated/maxloc1_8_i8.c: Regenerate. * generated/maxloc0_4_r8.c: Regenerate. * generated/maxloc0_16_r16.c: Regenerate. * generated/in_unpack_i4.c: Regenerate. * generated/sum_c10.c: Regenerate. * generated/minloc1_4_r16.c: Regenerate. * generated/maxloc1_4_r16.c: Regenerate. * generated/in_unpack_c16.c: Regenerate. * generated/minloc0_8_r16.c: Regenerate. * generated/reshape_c8.c: Regenerate. * generated/maxloc0_8_r16.c: Regenerate. * generated/maxloc0_8_i4.c: Regenerate. * generated/minloc1_4_r4.c: Regenerate. * generated/minloc0_16_i4.c: Regenerate. * generated/maxloc0_16_i4.c: Regenerate. * generated/minloc1_16_i8.c: Regenerate. * generated/maxloc1_16_i8.c: Regenerate. * generated/count_8_l4.c: Regenerate. * generated/minloc0_16_r10.c: Regenerate. * generated/minloc1_8_i8.c: Regenerate. * generated/minloc0_4_r8.c: Regenerate. * generated/product_r16.c: Regenerate. * generated/product_c8.c: Regenerate. * generated/sum_r8.c: Regenerate. * generated/in_pack_i16.c: Regenerate. * generated/minloc0_8_i4.c: Regenerate. * generated/minloc1_16_i16.c: Regenerate. * generated/reshape_i8.c: Regenerate. * generated/in_pack_c8.c: Regenerate. * generated/maxloc1_8_r4.c: Regenerate. * generated/reshape_i16.c: Regenerate. * generated/minval_r10.c: Regenerate. * generated/minval_i4.c: Regenerate. * generated/maxloc1_4_i4.c: Regenerate. * generated/maxval_i8.c: Regenerate. * generated/eoshift3_16.c: Regenerate. * generated/any_l8.c: Regenerate. * generated/maxloc0_16_r10.c: Regenerate. * generated/minloc0_4_i16.c: Regenerate. * generated/maxloc0_8_r8.c: Regenerate. * generated/maxloc0_4_i16.c: Regenerate. * generated/minloc1_4_r10.c: Regenerate. * generated/minloc1_8_i16.c: Regenerate. * generated/maxloc1_4_r10.c: Regenerate. * generated/minloc0_8_r10.c: Regenerate. * generated/maxloc1_8_i16.c: Regenerate. * generated/in_unpack_c10.c: Regenerate. * generated/maxloc0_8_r10.c: Regenerate. * generated/minloc1_16_r4.c: Regenerate. * generated/maxloc1_16_r4.c: Regenerate. * generated/minloc0_16_r8.c: Regenerate. * generated/product_i8.c: Regenerate. * generated/maxloc0_16_r8.c: Regenerate. * generated/sum_i16.c: Regenerate. * generated/maxloc0_4_i8.c: Regenerate. * generated/cshift1_8.c: Regenerate. * generated/maxloc1_16_i16.c: Regenerate. * generated/minloc1_8_r4.c: Regenerate. * generated/sum_c8.c: Regenerate. * generated/count_8_l16.c: Regenerate. * generated/in_pack_i8.c: Regenerate. * generated/maxval_i16.c: Regenerate. * generated/count_4_l8.c: Regenerate. * generated/minloc1_4_i4.c: Regenerate. * generated/product_c16.c: Regenerate. * generated/reshape_r4.c: Regenerate. * generated/minloc0_8_r8.c: Regenerate. * generated/in_unpack_c8.c: Regenerate. * generated/product_r10.c: Regenerate. * generated/cshift1_16.c: Regenerate. * generated/all_l8.c: Regenerate. * generated/minloc0_4_i8.c: Regenerate. * generated/maxval_r4.c: Regenerate. * generated/count_16_l4.c: Regenerate. From-SVN: r117904
2006-10-20 13:52:56 +02:00
frequently used path so probably not worth it. */
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
base -= sstride[n] * extent[n];
mbase -= mstride[n] * extent[n];
dest -= dstride[n] * extent[n];
n++;
if (n == rank)
{
/* Break out of the look. */
base = NULL;
break;
}
else
{
count[n]++;
base += sstride[n];
mbase += mstride[n];
dest += dstride[n];
}
}
}
}
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
extern void sminval_r10 (gfc_array_r10 * const restrict,
gfc_array_r10 * const restrict, const index_type * const restrict,
GFC_LOGICAL_4 *);
export_proto(sminval_r10);
void
sminval_r10 (gfc_array_r10 * const restrict retarray,
gfc_array_r10 * const restrict array,
const index_type * const restrict pdim,
GFC_LOGICAL_4 * mask)
{
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
index_type sstride[GFC_MAX_DIMENSIONS];
index_type dstride[GFC_MAX_DIMENSIONS];
GFC_REAL_10 * restrict dest;
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
index_type rank;
index_type n;
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
index_type dim;
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
if (*mask)
{
minval_r10 (retarray, array, pdim);
return;
}
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
/* Make dim zero based to avoid confusion. */
dim = (*pdim) - 1;
rank = GFC_DESCRIPTOR_RANK (array) - 1;
for (n = 0; n < dim; n++)
{
sstride[n] = array->dim[n].stride;
extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
if (extent[n] <= 0)
extent[n] = 0;
}
for (n = dim; n < rank; n++)
{
sstride[n] = array->dim[n + 1].stride;
extent[n] =
array->dim[n + 1].ubound + 1 - array->dim[n + 1].lbound;
if (extent[n] <= 0)
extent[n] = 0;
}
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
if (retarray->data == NULL)
{
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
size_t alloc_size;
for (n = 0; n < rank; n++)
{
retarray->dim[n].lbound = 0;
retarray->dim[n].ubound = extent[n]-1;
if (n == 0)
retarray->dim[n].stride = 1;
else
retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1];
}
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
retarray->offset = 0;
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
alloc_size = sizeof (GFC_REAL_10) * retarray->dim[rank-1].stride
* extent[rank-1];
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
retarray->dim[0].lbound = 0;
retarray->dim[0].ubound = -1;
return;
}
else
retarray->data = internal_malloc_size (alloc_size);
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
}
else
{
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
if (rank != GFC_DESCRIPTOR_RANK (retarray))
runtime_error ("rank of return array incorrect in"
" MINVAL intrinsic: is %ld, should be %ld",
(long int) (GFC_DESCRIPTOR_RANK (retarray)),
(long int) rank);
libgfortran.h (likely,unlikely): New makros. 2008-09-06 Tobias Burnus <burnus@net-b.de> * libgfortran.h (likely,unlikely): New makros. (runtime_warning_at,__mingw_snprintf): Add __attribute__(format()). * m4/spread.m4 (spread_'rtype_code`): Use unlikely for bounds_check. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmull.m4 (matmul_'rtype_code`): Ditto. * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto. * m4/matmul.m4 (matmul_'rtype_code`): Ditto. * generated/minval_r8.c: Regenerated. * generated/spread_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/spread_i8.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/any_l2.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/all_l1.c: Regenerated. * generated/matmul_r8.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/spread_i1.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/matmul_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/all_l2.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/spread_c10.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/spread_r4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/matmul_c8.c: Regenerated. * generated/all_l16.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/spread_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/count_4_l.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/count_8_l.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/matmul_i8.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/spread_c4.c: Regenerated. * generated/matmul_c16.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/matmul_r10.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/matmul_l4.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/matmul_i1.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/spread_i16.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/spread_i4.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/matmul_r4.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/count_1_l.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/matmul_i2.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/matmul_c10.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/matmul_l16.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/sum_r8.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/matmul_c4.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/spread_r8.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/spread_r16.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/count_16_l.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/count_2_l.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/matmul_i4.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/spread_c8.c: Regenerated. * generated/matmul_i16.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/any_l1.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/matmul_l8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/spread_c16.c: Regenerated. * generated/maxval_r4.c: Regenerated. From-SVN: r140060
2008-09-06 16:53:26 +02:00
if (unlikely (compile_options.bounds_check))
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
{
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
for (n=0; n < rank; n++)
{
index_type ret_extent;
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
ret_extent = retarray->dim[n].ubound + 1
- retarray->dim[n].lbound;
if (extent[n] != ret_extent)
runtime_error ("Incorrect extent in return value of"
" MINVAL intrinsic in dimension %ld:"
" is %ld, should be %ld", (long int) n + 1,
(long int) ret_extent, (long int) extent[n]);
}
re PR libfortran/34670 (bounds checking for array intrinsics) 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * m4/iparm.m4 (upcase): New macro (copied from the m4 manual). (u_name): New macro for the upper case name of the intrinsic. * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Add bounds checking and rank check, depending on compile_options.bounds_check. (`m'name`'rtype_qual`_'atype_code): Likewise. (`s'name`'rtype_qual`_'atype_code): Likewise. * generated/all_l16.c: Regenerated. * generated/all_l4.c: Regenerated. * generated/all_l8.c: Regenerated. * generated/any_l16.c: Regenerated. * generated/any_l4.c: Regenerated. * generated/any_l8.c: Regenerated. * generated/count_16_l16.c: Regenerated. * generated/count_16_l4.c: Regenerated. * generated/count_16_l8.c: Regenerated. * generated/count_4_l16.c: Regenerated. * generated/count_4_l4.c: Regenerated. * generated/count_4_l8.c: Regenerated. * generated/count_8_l16.c: Regenerated. * generated/count_8_l4.c: Regenerated. * generated/count_8_l8.c: Regenerated. * generated/maxloc0_16_i1.c: Regenerated. * generated/maxloc0_16_i16.c: Regenerated. * generated/maxloc0_16_i2.c: Regenerated. * generated/maxloc0_16_i4.c: Regenerated. * generated/maxloc0_16_i8.c: Regenerated. * generated/maxloc0_16_r10.c: Regenerated. * generated/maxloc0_16_r16.c: Regenerated. * generated/maxloc0_16_r4.c: Regenerated. * generated/maxloc0_16_r8.c: Regenerated. * generated/maxloc0_4_i1.c: Regenerated. * generated/maxloc0_4_i16.c: Regenerated. * generated/maxloc0_4_i2.c: Regenerated. * generated/maxloc0_4_i4.c: Regenerated. * generated/maxloc0_4_i8.c: Regenerated. * generated/maxloc0_4_r10.c: Regenerated. * generated/maxloc0_4_r16.c: Regenerated. * generated/maxloc0_4_r4.c: Regenerated. * generated/maxloc0_4_r8.c: Regenerated. * generated/maxloc0_8_i1.c: Regenerated. * generated/maxloc0_8_i16.c: Regenerated. * generated/maxloc0_8_i2.c: Regenerated. * generated/maxloc0_8_i4.c: Regenerated. * generated/maxloc0_8_i8.c: Regenerated. * generated/maxloc0_8_r10.c: Regenerated. * generated/maxloc0_8_r16.c: Regenerated. * generated/maxloc0_8_r4.c: Regenerated. * generated/maxloc0_8_r8.c: Regenerated. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc0_16_i1.c: Regenerated. * generated/minloc0_16_i16.c: Regenerated. * generated/minloc0_16_i2.c: Regenerated. * generated/minloc0_16_i4.c: Regenerated. * generated/minloc0_16_i8.c: Regenerated. * generated/minloc0_16_r10.c: Regenerated. * generated/minloc0_16_r16.c: Regenerated. * generated/minloc0_16_r4.c: Regenerated. * generated/minloc0_16_r8.c: Regenerated. * generated/minloc0_4_i1.c: Regenerated. * generated/minloc0_4_i16.c: Regenerated. * generated/minloc0_4_i2.c: Regenerated. * generated/minloc0_4_i4.c: Regenerated. * generated/minloc0_4_i8.c: Regenerated. * generated/minloc0_4_r10.c: Regenerated. * generated/minloc0_4_r16.c: Regenerated. * generated/minloc0_4_r4.c: Regenerated. * generated/minloc0_4_r8.c: Regenerated. * generated/minloc0_8_i1.c: Regenerated. * generated/minloc0_8_i16.c: Regenerated. * generated/minloc0_8_i2.c: Regenerated. * generated/minloc0_8_i4.c: Regenerated. * generated/minloc0_8_i8.c: Regenerated. * generated/minloc0_8_r10.c: Regenerated. * generated/minloc0_8_r16.c: Regenerated. * generated/minloc0_8_r4.c: Regenerated. * generated/minloc0_8_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-01-11 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34670 * all_bounds_1.f90: New test case. * maxloc_bounds_1.f90: New test case. * maxloc_bounds_2.f90: New test case. * maxloc_bounds_3.f90: New test case. * maxloc_bounds_4.f90: New test case. * maxloc_bounds_5.f90: New test case. * maxloc_bounds_6.f90: New test case. * maxloc_bounds_7.f90: New test case. * maxloc_bounds_8.f90: New test case. From-SVN: r131473
2008-01-11 21:21:05 +01:00
}
}
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
re PR fortran/35993 (wrong answer for all array intrinsics with scalar mask) 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * ifunction.m4 (SCALAR_ARRAY_FUNCTION): Use correct implementation for multi-dimensional return arrays when the mask is .false. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. 2008-04-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/35993 * gfortran.dg/intrinsic_product_1.f90: New test case. From-SVN: r134830
2008-04-30 18:56:01 +02:00
for (n = 0; n < rank; n++)
{
count[n] = 0;
dstride[n] = retarray->dim[n].stride;
}
dest = retarray->data;
while(1)
{
*dest = GFC_REAL_10_HUGE;
count[0]++;
dest += dstride[0];
n = 0;
while (count[n] == extent[n])
{
/* When we get to the end of a dimension, reset it and increment
the next dimension. */
count[n] = 0;
/* We could precalculate these products, but this is a less
frequently used path so probably not worth it. */
dest -= dstride[n] * extent[n];
n++;
if (n == rank)
return;
else
{
count[n]++;
dest += dstride[n];
}
}
}
re PR fortran/20935 (failed assertion for maxloc(n, mask=.true.)) 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * iresolve.c (gfc_resolve_maxloc): If mask is scalar, prefix the function name with an "s". If the mask is scalar or if its kind is smaller than gfc_default_logical_kind, coerce it to default kind. (gfc_resolve_maxval): Likewise. (gfc_resolve_minloc): Likewise. (gfc_resolve_minval): Likewise. (gfc_resolve_product): Likewise. (gfc_resolve_sum): Likewise. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * m4/iforeach.m4: Add SCALAR_FOREACH_FUNCTION macro. * m4/ifunction.m4: Add SCALAR_ARRAY_FUNCTION macro. * m4/minloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/minloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/maxloc0.m4: Use SCALAR_FOREACH_FUNCTION. * m4/maxloc1.m4: Use SCALAR_ARRAY_FUNCTION. * m4/minval.m4: Likewise. * m4/maxval.m4: Likewise. * m4/product.m4: Likewise. * m4/sum.m4: Likewise. * minloc0_16_i16.c : Regenerated. * minloc0_16_i4.c : Regenerated. * minloc0_16_i8.c : Regenerated. * minloc0_16_r10.c : Regenerated. * minloc0_16_r16.c : Regenerated. * minloc0_16_r4.c : Regenerated. * minloc0_16_r8.c : Regenerated. * minloc0_4_i16.c : Regenerated. * minloc0_4_i4.c : Regenerated. * minloc0_4_i8.c : Regenerated. * minloc0_4_r10.c : Regenerated. * minloc0_4_r16.c : Regenerated. * minloc0_4_r4.c : Regenerated. * minloc0_4_r8.c : Regenerated. * minloc0_8_i16.c : Regenerated. * minloc0_8_i4.c : Regenerated. * minloc0_8_i8.c : Regenerated. * minloc0_8_r10.c : Regenerated. * minloc0_8_r16.c : Regenerated. * minloc0_8_r4.c : Regenerated. * minloc0_8_r8.c : Regenerated. * minloc1_16_i16.c : Regenerated. * minloc1_16_i4.c : Regenerated. * minloc1_16_i8.c : Regenerated. * minloc1_16_r10.c : Regenerated. * minloc1_16_r16.c : Regenerated. * minloc1_16_r4.c : Regenerated. * minloc1_16_r8.c : Regenerated. * minloc1_4_i16.c : Regenerated. * minloc1_4_i4.c : Regenerated. * minloc1_4_i8.c : Regenerated. * minloc1_4_r10.c : Regenerated. * minloc1_4_r16.c : Regenerated. * minloc1_4_r4.c : Regenerated. * minloc1_4_r8.c : Regenerated. * minloc1_8_i16.c : Regenerated. * minloc1_8_i4.c : Regenerated. * minloc1_8_i8.c : Regenerated. * minloc1_8_r10.c : Regenerated. * minloc1_8_r16.c : Regenerated. * minloc1_8_r4.c : Regenerated. * minloc1_8_r8.c : Regenerated. * maxloc0_16_i16.c : Regenerated. * maxloc0_16_i4.c : Regenerated. * maxloc0_16_i8.c : Regenerated. * maxloc0_16_r10.c : Regenerated. * maxloc0_16_r16.c : Regenerated. * maxloc0_16_r4.c : Regenerated. * maxloc0_16_r8.c : Regenerated. * maxloc0_4_i16.c : Regenerated. * maxloc0_4_i4.c : Regenerated. * maxloc0_4_i8.c : Regenerated. * maxloc0_4_r10.c : Regenerated. * maxloc0_4_r16.c : Regenerated. * maxloc0_4_r4.c : Regenerated. * maxloc0_4_r8.c : Regenerated. * maxloc0_8_i16.c : Regenerated. * maxloc0_8_i4.c : Regenerated. * maxloc0_8_i8.c : Regenerated. * maxloc0_8_r10.c : Regenerated. * maxloc0_8_r16.c : Regenerated. * maxloc0_8_r4.c : Regenerated. * maxloc0_8_r8.c : Regenerated. * maxloc1_16_i16.c : Regenerated. * maxloc1_16_i4.c : Regenerated. * maxloc1_16_i8.c : Regenerated. * maxloc1_16_r10.c : Regenerated. * maxloc1_16_r16.c : Regenerated. * maxloc1_16_r4.c : Regenerated. * maxloc1_16_r8.c : Regenerated. * maxloc1_4_i16.c : Regenerated. * maxloc1_4_i4.c : Regenerated. * maxloc1_4_i8.c : Regenerated. * maxloc1_4_r10.c : Regenerated. * maxloc1_4_r16.c : Regenerated. * maxloc1_4_r4.c : Regenerated. * maxloc1_4_r8.c : Regenerated. * maxloc1_8_i16.c : Regenerated. * maxloc1_8_i4.c : Regenerated. * maxloc1_8_i8.c : Regenerated. * maxloc1_8_r10.c : Regenerated. * maxloc1_8_r16.c : Regenerated. * maxloc1_8_r4.c : Regenerated. * maxloc1_8_r8.c : Regenerated. * maxval_i16.c : Regenerated. * maxval_i4.c : Regenerated. * maxval_i8.c : Regenerated. * maxval_r10.c : Regenerated. * maxval_r16.c : Regenerated. * maxval_r4.c : Regenerated. * maxval_r8.c : Regenerated. * minval_i16.c : Regenerated. * minval_i4.c : Regenerated. * minval_i8.c : Regenerated. * minval_r10.c : Regenerated. * minval_r16.c : Regenerated. * minval_r4.c : Regenerated. * minval_r8.c : Regenerated. * sum_c10.c : Regenerated. * sum_c16.c : Regenerated. * sum_c4.c : Regenerated. * sum_c8.c : Regenerated. * sum_i16.c : Regenerated. * sum_i4.c : Regenerated. * sum_i8.c : Regenerated. * sum_r10.c : Regenerated. * sum_r16.c : Regenerated. * sum_r4.c : Regenerated. * sum_r8.c : Regenerated. * product_c10.c : Regenerated. * product_c16.c : Regenerated. * product_c4.c : Regenerated. * product_c8.c : Regenerated. * product_i16.c : Regenerated. * product_i4.c : Regenerated. * product_i8.c : Regenerated. * product_r10.c : Regenerated. * product_r16.c : Regenerated. * product_r4.c : Regenerated. * product_r8.c : Regenerated. 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/20935 * gfortran.dg/scalar_mask_2.f90: New test case. From-SVN: r112230
2006-03-20 22:56:00 +01:00
}
re PR libfortran/19308 (I/O library should support more real and integer kinds) PR libfortran/19308 PR fortran/20120 PR libfortran/22437 * Makefile.am: Add generated files for large real and integers kinds. Add a rule to create the kinds.inc c99_protos.inc files. Use kinds.inc to preprocess Fortran generated files. * libgfortran.h: Add macro definitions for GFC_INTEGER_16_HUGE, GFC_REAL_10_HUGE and GFC_REAL_16_HUGE. Add types gfc_array_i16, gfc_array_r10, gfc_array_r16, gfc_array_c10, gfc_array_c16, gfc_array_l16. * mk-kinds-h.sh: Define macros HAVE_GFC_LOGICAL_* and HAVE_GFC_COMPLEX_* when these types are available. * intrinsics/ishftc.c (ishftc16): New function for GFC_INTEGER_16. * m4/all.m4, m4/any.m4, m4/count.m4, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/mtype.m4, m4/nearest.m4, m4/pow.m4, m4/product.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/sum.m4, m4/transpose.m4: Protect generated functions with appropriate "#if defined (HAVE_GFC_type_kind)" preprocessor directives. * Makefile.in: Regenerate. * all files in generated/: Regenerate. * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long double builtin function. (gfc_init_builtin_functions): Add mfunc_longdouble, mfunc_clongdouble and func_clongdouble_longdouble trees. Build them for round, trunc, cabs, copysign and pow functions. * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add case for kind 10 and 16. * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. (gfc_build_intrinsic_function_decls): Build nodes for int16, real10, real16, complex10 and complex16 types. Build all possible combinations for function _gfortran_pow_?n_?n. Build function calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * trans-expr.c (gfc_conv_power_op): Add case for integer(16), real(10) and real(16). * trans-intrinsic.c: Add suppport for long double builtin functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION macros. (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and real(16) kinds. (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl and real16_decl in library functions. (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex kinds 10 and 16. (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16) kinds. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind. * trans-types.c (gfc_get_int_type, gfc_get_real_type, gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in the case of kinds not available. * trans.h: Declare trees for cpowl10, cpowl16, ishftc16, exponent10 and exponent16. * gfortran.dg/large_real_kind_2.F90: New test. * gfortran.dg/large_integer_kind_2.f90: New test. From-SVN: r104889
2005-10-03 09:22:20 +02:00
#endif