pack_generic.c (pack): Remove unneeded calculation.

* intrinsics/pack_generic.c (pack): Remove unneeded calculation.

	* m4/matmull.m4 (matmul_): Remove unneeded calculations, fix
	pointer cast to avoid warning.
	* generated/matmul_l4.c: Regenerated.
	* generated/matmul_l8.c: Regenerated.

	* Makefile.am: Remove AM_CFLAGS here.
	* configure.ac: Define AM_CFLAGS and AM_FCFLAGS so that warnings
	are set.  Set additionally -Wstrict-prototypes for CFLAGS.
	* Makefile.in: Regenerated
	* configure: Regenerated.

From-SVN: r99723
This commit is contained in:
Andreas Jaeger 2005-05-15 17:37:18 +02:00 committed by Andreas Jaeger
parent 6b0215364d
commit e606fb399e
7 changed files with 55 additions and 41 deletions

View File

@ -1,5 +1,18 @@
2005-05-15 Andreas Jaeger <aj@suse.de>
* intrinsics/pack_generic.c (pack): Remove unneeded calculation.
* m4/matmull.m4 (matmul_): Remove unneeded calculations, fix
pointer cast to avoid warning.
* generated/matmul_l4.c: Regenerated.
* generated/matmul_l8.c: Regenerated.
* Makefile.am: Remove AM_CFLAGS here.
* configure.ac: Define AM_CFLAGS and AM_FCFLAGS so that warnings
are set. Set additionally -Wstrict-prototypes for CFLAGS.
* Makefile.in: Regenerated
* configure: Regenerated.
* intrinsics/system_clock.c (system_clock_4, system_clock_8): Add
missing returns, reformat a bit.

View File

@ -1,8 +1,6 @@
## Process this file with automake to produce Makefile.in
## We like to use C99 routines when available. This makes sure that
## __STDC_VERSION__ is set such that libc includes make them available.
AM_CFLAGS = -std=gnu99
ACLOCAL_AMFLAGS = -I ../config
## May be used by toolexeclibdir.
@ -193,7 +191,7 @@ i_dotprod_c= \
generated/dotprod_i4.c \
generated/dotprod_i8.c \
generated/dotprod_r4.c \
generated/dotprod_r8.c
generated/dotprod_r8.c
i_dotprodl_c= \
generated/dotprod_l4.c \
@ -530,4 +528,3 @@ $(gfor_built_specific2_src): m4/specific2.m4 m4/head.m4
endif
EXTRA_DIST = $(m4_files)

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -206,6 +206,8 @@ distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_FCFLAGS = @AM_FCFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
@ -213,7 +215,6 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@ -300,7 +301,6 @@ target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
AM_CFLAGS = -std=gnu99
ACLOCAL_AMFLAGS = -I ../config
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
@ -480,7 +480,7 @@ i_dotprod_c = \
generated/dotprod_i4.c \
generated/dotprod_i8.c \
generated/dotprod_r4.c \
generated/dotprod_r8.c
generated/dotprod_r8.c
i_dotprodl_c = \
generated/dotprod_l4.c \

18
libgfortran/configure vendored
View File

@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT multi_basedir toolexecdir toolexeclibdir CC ac_ct_CC EXEEXT OBJEXT CFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL enable_shared enable_static FC FCFLAGS LDFLAGS ac_ct_FC extra_ldflags_libgfortran CPP CPPFLAGS EGREP MATH_OBJ LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT multi_basedir toolexecdir toolexeclibdir CC ac_ct_CC EXEEXT OBJEXT AM_FCFLAGS AM_CFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL enable_shared enable_static FC FCFLAGS LDFLAGS ac_ct_FC extra_ldflags_libgfortran CPP CPPFLAGS EGREP MATH_OBJ LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -2932,13 +2932,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Add -Wall if we are using GCC.
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
AM_FCFLAGS="-Wall"
## We like to use C99 routines when available. This makes sure that
## __STDC_VERSION__ is set such that libc includes make them available.
AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes"
fi
# Find other programs we need.
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
@ -4086,7 +4089,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4089 "configure"' > conftest.$ac_ext
echo '#line 4092 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -4472,7 +4475,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:4475:" \
echo "$as_me:4478:" \
"checking for Fortran compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -12201,7 +12204,8 @@ s,@CC@,$CC,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@AM_FCFLAGS@,$AM_FCFLAGS,;t t
s,@AM_CFLAGS@,$AM_CFLAGS,;t t
s,@AS@,$AS,;t t
s,@ac_ct_AS@,$ac_ct_AS,;t t
s,@AR@,$AR,;t t

View File

@ -109,12 +109,15 @@ m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
# Add -Wall if we are using GCC.
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
AM_FCFLAGS="-Wall"
## We like to use C99 routines when available. This makes sure that
## __STDC_VERSION__ is set such that libc includes make them available.
AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes"
fi
AC_SUBST(AM_FCFLAGS)
AC_SUBST(AM_CFLAGS)
# Find other programs we need.
AC_CHECK_TOOL(AS, as)

View File

@ -1,5 +1,5 @@
/* Generic implementation of the PACK intrinsic
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
/* PACK is specified as follows:
13.14.80 PACK (ARRAY, MASK, [VECTOR])
Description: Pack an array into an array of rank one under the
control of a mask.
@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA. */
VECTOR (optional) shall be of the same type and type parameters
as ARRAY. VECTOR shall have at least as many elements as
there are true elements in MASK. If MASK is a scalar
with the value true, VECTOR shall have at least as many
with the value true, VECTOR shall have at least as many
elements as there are in ARRAY.
Result Characteristics: The result is an array of rank one with the
@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. */
| 9 0 0 | may be "gathered" by the function PACK. The result of
| 0 0 7 |
PACK (M, MASK = M.NE.0) is [9,7] and the result of PACK (M, M.NE.0,
VECTOR = (/ 2,4,6,8,10,12 /)) is [9,7,6,8,10,12].
VECTOR = (/ 2,4,6,8,10,12 /)) is [9,7,6,8,10,12].
There are two variants of the PACK intrinsic: one, where MASK is
array valued, and the other one where MASK is scalar. */
@ -125,7 +125,6 @@ pack (gfc_array_char *ret, const gfc_array_char *array,
runtime_error ("Funny sized logical array");
for (n = 0; n < dim; n++)
mstride[n] <<= 1;
mstride0 <<= 1;
mptr = GFOR_POINTER_L8_TO_L4 (mptr);
}
@ -134,15 +133,15 @@ pack (gfc_array_char *ret, const gfc_array_char *array,
/* Allocate the memory for the result. */
int total;
if (vector != NULL)
{
if (vector != NULL)
{
/* The return array will have as many
elements as there are in VECTOR. */
total = vector->dim[0].ubound + 1 - vector->dim[0].lbound;
}
else
{
/* We have to count the true elements in MASK. */
elements as there are in VECTOR. */
total = vector->dim[0].ubound + 1 - vector->dim[0].lbound;
}
else
{
/* We have to count the true elements in MASK. */
/* TODO: We could speed up pack easily in the case of only
few .TRUE. entries in MASK, by keeping track of where we
@ -152,7 +151,7 @@ pack (gfc_array_char *ret, const gfc_array_char *array,
only have to traverse the list, and copy those elements
into the result array. In the case of datatypes which fit
in one of the integer types we could also cache the
value instead of a pointer to it.
value instead of a pointer to it.
This approach might be bad from the point of view of
cache behavior in the case where our cache is not big
enough to hold all elements that have to be copied. */
@ -195,7 +194,7 @@ pack (gfc_array_char *ret, const gfc_array_char *array,
}
}
}
/* Setup the array descriptor. */
ret->dim[0].lbound = 0;
ret->dim[0].ubound = total - 1;
@ -344,7 +343,7 @@ pack_s (gfc_array_char *ret, const gfc_array_char *array,
ret->dim[0].stride = 1;
ret->data = internal_malloc_size (0);
ret->base = 0;
return;
}
}
@ -363,7 +362,7 @@ pack_s (gfc_array_char *ret, const gfc_array_char *array,
rstride0 = size;
rptr = ret->data;
/* The remaining possibilities are now:
/* The remaining possibilities are now:
If MASK is .TRUE., we have to copy the source array into the
result array. We then have to fill it up with elements from VECTOR.
If MASK is .FALSE., we have to copy VECTOR into the result
@ -404,7 +403,7 @@ pack_s (gfc_array_char *ret, const gfc_array_char *array,
}
}
}
/* Add any remaining elements from VECTOR. */
if (vector)
{

View File

@ -1,5 +1,5 @@
`/* Implementation of the MATMUL intrinsic
Copyright 2002 Free Software Foundation, Inc.
Copyright 2002, 2005 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@ -91,7 +91,7 @@ matmul_`'rtype_code (rtype * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
}
retarray->data
= internal_malloc_size (sizeof (rtype_name) * size0 (retarray));
= internal_malloc_size (sizeof (rtype_name) * size0 ((array_t *) retarray));
retarray->base = 0;
}
@ -100,14 +100,12 @@ matmul_`'rtype_code (rtype * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
{
assert (GFC_DESCRIPTOR_SIZE (a) == 8);
abase = GFOR_POINTER_L8_TO_L4 (abase);
astride <<= 1;
}
bbase = b->data;
if (GFC_DESCRIPTOR_SIZE (b) != 4)
{
assert (GFC_DESCRIPTOR_SIZE (b) == 8);
bbase = GFOR_POINTER_L8_TO_L4 (bbase);
bstride <<= 1;
}
dest = retarray->data;