summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-10 05:52:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-10 05:52:27 +0000
commit9464eccb913d9f3b08c0e1c7c4335efb1a18e87d (patch)
treefe90f20a9846012a04d1bd4dbdfdf0197ab5ef27
parent7f7fa13c350f1e7b525dcd00ecba084312bc845b (diff)
downloadgcc-9464eccb913d9f3b08c0e1c7c4335efb1a18e87d.tar.gz
2009-09-10 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151586 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151587 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.MELT3
-rw-r--r--MAINTAINERS1
-rw-r--r--config/ChangeLog9
-rw-r--r--config/stdint.m4498
-rw-r--r--gcc/ChangeLog181
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config.gcc8
-rw-r--r--gcc/config/i386/i386.c16
-rw-r--r--gcc/config/moxie/constraints.md6
-rw-r--r--gcc/config/moxie/moxie.c31
-rw-r--r--gcc/config/moxie/moxie.h8
-rw-r--r--gcc/config/moxie/moxie.md21
-rw-r--r--gcc/config/rs6000/rs6000.md44
-rw-r--r--gcc/config/t-slibgcc-elf-ver8
-rw-r--r--gcc/config/t-slibgcc-libgcc32
-rwxr-xr-xgcc/configure22
-rw-r--r--gcc/configure.ac7
-rw-r--r--gcc/cp/ChangeLog14
-rw-r--r--gcc/cp/Make-lang.in4
-rw-r--r--gcc/cp/decl2.c21
-rw-r--r--gcc/cp/error.c6
-rw-r--r--gcc/expr.c6
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-expr.c2
-rw-r--r--gcc/gimple.h37
-rw-r--r--gcc/testsuite/ChangeLog22
-rw-r--r--gcc/testsuite/g++.dg/template/crash91.C8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41101.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr41317.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr39779.c8
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c2
-rw-r--r--gcc/tree-cfg.c56
-rw-r--r--gcc/tree-sra.c8
-rw-r--r--gcc/tree-ssa-ccp.c104
-rw-r--r--gcc/tree-ssa-pre.c75
-rw-r--r--gcc/tree.c18
-rw-r--r--libdecnumber/ChangeLog8
-rwxr-xr-xlibdecnumber/configure1112
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgomp/config.h.in102
-rwxr-xr-xlibgomp/configure1106
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc4
45 files changed, 2292 insertions, 1400 deletions
diff --git a/ChangeLog b/ChangeLog
index b4a5819771f..6b53c3de876 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-09 Joseph Myers <joseph@codesourcery.com>
+
+ * MAINTAINERS (Reviewers): Add self as driver reviewer.
+
2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: Do not use $extrasub for replacing @if/@endif
diff --git a/ChangeLog.MELT b/ChangeLog.MELT
index a2512b10ca2..c6c5ed3128d 100644
--- a/ChangeLog.MELT
+++ b/ChangeLog.MELT
@@ -1,4 +1,7 @@
+2009-09-10 Basile Starynkevitch <basile@starynkevitch.net>
+ MELT branch merged with trunk rev 151586
+
2009-09-09 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151544
diff --git a/MAINTAINERS b/MAINTAINERS
index 3a678fd6c7e..c1ac2488353 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -245,6 +245,7 @@ outside of the parts of the compiler they maintain.
dataflow Paolo Bonzini bonzini@gnu.org
dataflow Seongbae Park seongbae.park@gmail.com
dataflow Kenneth Zadeck zadeck@naturalbridge.com
+driver Joseph Myers jsm@polyomino.org.uk
Fortran Janne Blomqvist jb@gcc.gnu.org
Fortran Tobias Burnus burnus@net-b.de
Fortran Jerry DeLisle jvdelisle@gcc.gnu.org
diff --git a/config/ChangeLog b/config/ChangeLog
index d23df4cfeb9..ceea52ed782 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * stdint.m4 (GCC_HEADER_STDINT): Revert changes to this macro in
+ the previous two patches.
+
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * stdint.m4: Store temporary file in $tmp/_GCC_STDINT_H.
+
2009-09-08 Paolo Bonzini <bonzini@gnu.org>
* stdint.m4: Rewrite by using autoconf 2.64 features.
diff --git a/config/stdint.m4 b/config/stdint.m4
index ffb759d06b6..b26b4fc266d 100644
--- a/config/stdint.m4
+++ b/config/stdint.m4
@@ -12,40 +12,443 @@ AC_REQUIRE([AC_TYPE_UINT64_T])
AC_REQUIRE([AC_TYPE_UINTMAX_T])
AC_REQUIRE([AC_TYPE_UINTPTR_T])])
+dnl @synopsis GCC_HEADER_STDINT [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])]
+dnl
+dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
+dnl existence of an include file <stdint.h> that defines a set of
+dnl typedefs, especially uint8_t,int32_t,uintptr_t.
+dnl Many older installations will not provide this file, but some will
+dnl have the very same definitions in <inttypes.h>. In other enviroments
+dnl we can use the inet-types in <sys/types.h> which would define the
+dnl typedefs int8_t and u_int8_t respectivly.
+dnl
+dnl This macros will create a local "_stdint.h" or the headerfile given as
+dnl an argument. In many cases that file will pick the definition from a
+dnl "#include <stdint.h>" or "#include <inttypes.h>" statement, while
+dnl in other environments it will provide the set of basic 'stdint's defined:
+dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
+dnl int_least32_t.. int_fast32_t.. intmax_t
+dnl which may or may not rely on the definitions of other files.
+dnl
+dnl Sometimes the stdint.h or inttypes.h headers conflict with sys/types.h,
+dnl so we test the headers together with sys/types.h and always include it
+dnl into the generated header (to match the tests with the generated file).
+dnl Hopefully this is not a big annoyance.
+dnl
+dnl If your installed header files require the stdint-types you will want to
+dnl create an installable file mylib-int.h that all your other installable
+dnl header may include. So, for a library package named "mylib", just use
+dnl GCC_HEADER_STDINT(mylib-int.h)
+dnl in configure.in and install that header file in Makefile.am along with
+dnl the other headers (mylib.h). The mylib-specific headers can simply
+dnl use "#include <mylib-int.h>" to obtain the stdint-types.
+dnl
+dnl Remember, if the system already had a valid <stdint.h>, the generated
+dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
+dnl
+dnl @author Guido Draheim <guidod@gmx.de>, Paolo Bonzini <bonzini@gnu.org>
+
AC_DEFUN([GCC_HEADER_STDINT],
-[AC_REQUIRE([GCC_STDINT_TYPES])
-AC_CHECK_TYPES([int_least32_t, int_fast32_t],,,[#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif])
+[m4_define(_GCC_STDINT_H, m4_ifval($1, $1, _stdint.h))
+
+inttype_headers=`echo inttypes.h sys/inttypes.h $2 | sed -e 's/,/ /g'`
+
+acx_cv_header_stdint=stddef.h
+acx_cv_header_stdint_kind="(already complete)"
+for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uintmax_t
+ unset ac_cv_type_int_least32_t
+ unset ac_cv_type_int_fast32_t
+ unset ac_cv_type_uint64_t
+ _AS_ECHO_N([looking for a compliant stdint.h in $i, ])
+ AC_CHECK_TYPE(uintmax_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(uintptr_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(int_least32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(int_fast32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uint64_t)"], [#include <sys/types.h>
+#include <$i>])
+ break
+done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(lacks uintmax_t)"
+ for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uint32_t
+ unset ac_cv_type_uint64_t
+ _AS_ECHO_N([looking for an incomplete stdint.h in $i, ])
+ AC_CHECK_TYPE(uint32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(uint64_t,,,[#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(uintptr_t,,,[#include <sys/types.h>
+#include <$i>])
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(u_intXX_t style)"
+ for i in sys/types.h $inttype_headers; do
+ unset ac_cv_type_u_int32_t
+ unset ac_cv_type_u_int64_t
+ _AS_ECHO_N([looking for u_intXX_t types in $i, ])
+ AC_CHECK_TYPE(u_int32_t,[acx_cv_header_stdint=$i],continue,[#include <sys/types.h>
+#include <$i>])
+ AC_CHECK_TYPE(u_int64_t,,,[#include <sys/types.h>
+#include <$i>])
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(using manual detection)"
+fi
+
+test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
+test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
+test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
+test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
+test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
# ----------------- Summarize what we found so far
-m4_define([_GCC_STDINT_H], m4_ifval($1, $1, _stdint.h))
-m4_if(m4_bmatch(m4_quote(/_GCC_STDINT_H),
- /stdint\.h$, bad,
- /inttypes\.h$, bad, ok), bad,
- [m4_fatal([cannot overwrite ]m4_quote(_GCC_STDINT_H))])
+AC_MSG_CHECKING([what to include in _GCC_STDINT_H])
+
+case `AS_BASENAME(_GCC_STDINT_H)` in
+ stdint.h) AC_MSG_WARN([are you sure you want it there?]) ;;
+ inttypes.h) AC_MSG_WARN([are you sure you want it there?]) ;;
+ *) ;;
+esac
+
+AC_MSG_RESULT($acx_cv_header_stdint $acx_cv_header_stdint_kind)
+
+# ----------------- done included file, check C basic types --------
+
+# Lacking an uintptr_t? Test size of void *
+case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
+ stddef.h:* | *:no) AC_CHECK_SIZEOF(void *) ;;
+esac
+
+# Lacking an uint64_t? Test size of long
+case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
+ stddef.h:*:* | *:no:no) AC_CHECK_SIZEOF(long) ;;
+esac
+
+if test $acx_cv_header_stdint = stddef.h; then
+ # Lacking a good header? Test size of everything and deduce all types.
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(char)
+
+ AC_MSG_CHECKING(for type equivalent to int8_t)
+ case "$ac_cv_sizeof_char" in
+ 1) acx_cv_type_int8_t=char ;;
+ *) AC_MSG_ERROR(no 8-bit type, please report a bug)
+ esac
+ AC_MSG_RESULT($acx_cv_type_int8_t)
+
+ AC_MSG_CHECKING(for type equivalent to int16_t)
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
+ 2:*) acx_cv_type_int16_t=int ;;
+ *:2) acx_cv_type_int16_t=short ;;
+ *) AC_MSG_ERROR(no 16-bit type, please report a bug)
+ esac
+ AC_MSG_RESULT($acx_cv_type_int16_t)
+
+ AC_MSG_CHECKING(for type equivalent to int32_t)
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
+ 4:*) acx_cv_type_int32_t=int ;;
+ *:4) acx_cv_type_int32_t=long ;;
+ *) AC_MSG_ERROR(no 32-bit type, please report a bug)
+ esac
+ AC_MSG_RESULT($acx_cv_type_int32_t)
+fi
+
+# These tests are here to make the output prettier
+
+if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
+ case "$ac_cv_sizeof_long" in
+ 8) acx_cv_type_int64_t=long ;;
+ esac
+ AC_MSG_CHECKING(for type equivalent to int64_t)
+ AC_MSG_RESULT(${acx_cv_type_int64_t-'using preprocessor symbols'})
+fi
+
+# Now we can use the above types
+
+if test "$ac_cv_type_uintptr_t" != yes; then
+ AC_MSG_CHECKING(for type equivalent to intptr_t)
+ case $ac_cv_sizeof_void_p in
+ 2) acx_cv_type_intptr_t=int16_t ;;
+ 4) acx_cv_type_intptr_t=int32_t ;;
+ 8) acx_cv_type_intptr_t=int64_t ;;
+ *) AC_MSG_ERROR(no equivalent for intptr_t, please report a bug)
+ esac
+ AC_MSG_RESULT($acx_cv_type_intptr_t)
+fi
# ----------------- done all checks, emit header -------------
AC_CONFIG_COMMANDS(_GCC_STDINT_H, [
-cat >> tmp-stdint.h <<EOF
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
-
-#include "config.h"
-#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
+if test "$GCC" = yes; then
+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
+else
+ echo "/* generated for $CC */" > tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef GCC_GENERATED_STDINT_H
+ #define GCC_GENERATED_STDINT_H 1
+
+ #include <sys/types.h>
+EOF
+
+if test "$acx_cv_header_stdint" != stdint.h; then
+ echo "#include <stddef.h>" >> tmp-stdint.h
+fi
+if test "$acx_cv_header_stdint" != stddef.h; then
+ echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+ /* glibc uses these symbols as guards to prevent redefinitions. */
+ #ifdef __int8_t_defined
+ #define _INT8_T
+ #define _INT16_T
+ #define _INT32_T
+ #endif
+ #ifdef __uint32_t_defined
+ #define _UINT32_T
+ #endif
+
+EOF
+
+# ----------------- done header, emit basic int types -------------
+if test "$acx_cv_header_stdint" = stddef.h; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef unsigned $acx_cv_type_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef unsigned $acx_cv_type_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef unsigned $acx_cv_type_int32_t uint32_t;
+ #endif
+ #endif
+
+ #ifndef _INT8_T
+ #define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
+ typedef $acx_cv_type_int8_t int8_t;
+ #endif
+ #endif
+
+ #ifndef _INT16_T
+ #define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
+ typedef $acx_cv_type_int16_t int16_t;
+ #endif
+ #endif
+
+ #ifndef _INT32_T
+ #define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
+ typedef $acx_cv_type_int32_t int32_t;
+ #endif
+ #endif
EOF
+elif test "$ac_cv_type_u_int32_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef u_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef u_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef u_int32_t uint32_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Some systems have guard macros to prevent redefinitions, define them. */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #endif
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #endif
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #endif
+EOF
+fi
+# ------------- done basic int types, emit int64_t types ------------
+if test "$ac_cv_type_uint64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have good uint64_t and int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #endif
+EOF
+elif test "$ac_cv_type_u_int64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have an u_int64_t (and int64_t) */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef u_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+elif test -n "$acx_cv_type_int64_t"; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* architecture has a 64-bit type, $acx_cv_type_int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ typedef $acx_cv_type_int64_t int64_t;
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef unsigned $acx_cv_type_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* some common heuristics for int64_t, using compiler-specific tests */
+ #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
+ #ifndef _INT64_T
+ #define _INT64_T
+ #ifndef __int64_t_defined
+ typedef long long int64_t;
+ #endif
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ typedef unsigned long long uint64_t;
+ #endif
+
+ #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+ # define __extension__
+ # endif
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ __extension__ typedef long long int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ __extension__ typedef unsigned long long uint64_t;
+ # endif
+
+ #elif !defined __STRICT_ANSI__
+ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ typedef __int64 int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ typedef unsigned __int64 uint64_t;
+ # endif
+ # endif /* compiler */
+
+ #endif /* ANSI version */
+EOF
+fi
+
+# ------------- done int64_t types, emit intptr types ------------
+if test "$ac_cv_type_uintptr_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
+ typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
+ typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
+EOF
+fi
+
+# ------------- done intptr types, emit int_least types ------------
if test "$ac_cv_type_int_least32_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -53,15 +456,20 @@ if test "$ac_cv_type_int_least32_t" != yes; then
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
+ #ifdef _INT64_T
typedef int64_t int_least64_t;
+ #endif
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_least64_t;
+ #endif
EOF
fi
+# ------------- done intptr types, emit int_fast types ------------
if test "$ac_cv_type_int_fast32_t" != yes; then
dnl NOTE: The following code assumes that sizeof (int) > 1.
dnl Fix when strange machines are reported.
@@ -71,16 +479,40 @@ if test "$ac_cv_type_int_fast32_t" != yes; then
typedef int8_t int_fast8_t;
typedef int int_fast16_t;
typedef int32_t int_fast32_t;
+ #ifdef _INT64_T
typedef int64_t int_fast64_t;
+ #endif
typedef uint8_t uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef uint32_t uint_fast32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_fast64_t;
+ #endif
+EOF
+fi
+
+if test "$ac_cv_type_uintmax_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intmax based on what we found */
+ #ifdef _INT64_T
+ typedef int64_t intmax_t;
+ #else
+ typedef long intmax_t;
+ #endif
+ #ifdef _UINT64_T
+ typedef uint64_t uintmax_t;
+ #else
+ typedef unsigned long uintmax_t;
+ #endif
EOF
fi
-echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #endif /* GCC_GENERATED_STDINT_H */
+EOF
if test -r ]_GCC_STDINT_H[ && cmp -s tmp-stdint.h ]_GCC_STDINT_H[; then
rm -f tmp-stdint.h
@@ -89,8 +521,22 @@ else
fi
], [
+GCC="$GCC"
+CC="$CC"
+acx_cv_header_stdint="$acx_cv_header_stdint"
+acx_cv_type_int8_t="$acx_cv_type_int8_t"
+acx_cv_type_int16_t="$acx_cv_type_int16_t"
+acx_cv_type_int32_t="$acx_cv_type_int32_t"
+acx_cv_type_int64_t="$acx_cv_type_int64_t"
+acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
+ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
+ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
])
])
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0be5934a06..b47b5d5409c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,99 @@
+2009-09-09 Jason Merrill <jason@redhat.com>
+
+ * configure.ac: Check glibc version even if we have an in-tree
+ assembler.
+
+2009-09-09 Anthony Green <green@moxielogic.com>
+
+ * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
+ the constant 0 when appropriate.
+ * config/moxie/constraints.md: Add constraint O.
+
+ * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
+ to pass up to 6 32-bit argument values in registers.
+ (moxie_function_arg): Ditto.
+ (moxie_arg_partial_bytes): Ditto.
+ * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
+ (REG_PARM_STACK_SPACE): Ditto.
+ (FUNCTION_ARG_REGNO_P): Ditto.
+
+ * config/moxie/moxie.c (moxie_expand_prologue): Use dec
+ instruction to allocate stack space.
+
+2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
+ unnecessarily stringent constraints. Fix address
+ calculation in the splitters.
+
+2009-09-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/39779
+ * expr.c (convert_modes): Return when mode == oldmode after
+ CONST_INTs are processed.
+
+2009-09-09 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/41315
+ * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
+ (ix86_expand_prologue): Take frame.padding0 into logic of
+ to_allocate checks.
+ (ix86_expand_epilogue): Likewise.
+
+2009-09-09 Jakub Jelinek <jakub@redhat.com>
+
+ * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
+ New variables.
+ (SHLIB_LINK, SHLIB_INSTALL): Use them.
+ * config/t-slibgcc-libgcc: New file.
+ * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
+
+2009-09-09 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/41089
+ * tree-sra.c (find_var_candidates): Do not consider va_lists in
+ early SRA.
+
+2009-09-09 Richard Henderson <rth@redhat.com>
+
+ * gimple.h (CASE_GIMPLE_OMP): New.
+ (is_gimple_omp): Use it.
+ * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
+ (verify_gimple_debug): Likewise.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/41101
+ * tree-ssa-pre.c (maximal_set): Remove.
+ (compute_antic_aux): Treat the maximal set as implicitly all ones.
+ Defer all blocks we didn't visit at least one successor.
+ (add_to_exp_gen): Do not add to the maximal set.
+ (make_values_for_phi): Likewise.
+ (compute_avail): Likewise.
+ (init_pre): Do not allocate the maximal set.
+ (execute_pre): Do not dump it.
+
+2009-09-09 Martin Jambor <mjambor@suse.cz>
+
+ * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
+ an SSA_NAME rather than a is_gimple_variable.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41317
+ * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
+ code dealing with plain pointer bases.
+ (maybe_fold_offset_to_reference): Likewise.
+ (maybe_fold_stmt_addition): Adjust.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ * tree.c (free_lang_data_in_type): Do not free the type variant
+ chains.
+ (free_lang_data): Merge char_type_node with its properly signed
+ variant.
+ (pass_ipa_free): Collect after freeing language specific data.
+
2009-09-09 Michael Matz <matz@suse.de>
PR middle-end/41268
@@ -124,7 +220,7 @@
(insn_reservation "loadsp"): New.
(insn_reservation "load_stall1"): New.
(insn_reservation "load_stall3"): New.
- (stall): New insn.
+ (stall): New insn.
* config/bfin/predicates.md (const1_operand, const3_operand): New.
(mem_p_address_operand): Exclude stack and frame pointer based
addresses.
@@ -142,12 +238,12 @@
From Mike Frysinger <michael.frysinger@analog.com>
* config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
- * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m, bf547m,
- bf548m, and bf549m.
+ * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
+ bf547m, bf548m, and bf549m.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
- for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M, __ADSPBF547M__
- for BFIN_CPU_BF547M, __ADSPBF548M__ for BFIN_CPU_BF548M, and
- __ADSPBF549M__ for BFIN_CPU_BF549M.
+ for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
+ __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
+ BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
* config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
* config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
@@ -156,17 +252,14 @@
bf542m, bf544m, bf547m, bf548m, and bf549m.
From Jie Zhang <jie.zhang@analog.com>:
- * config/bfin/predicates.md (p_register_operand): New
- predicate.
+ * config/bfin/predicates.md (p_register_operand): New predicate.
(dp_register_operand): New predicate.
* config/bfin/bfin-protos.h (WA_05000074): Define.
(ENABLE_WA_05000074): Define.
- * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for
- all cpus.
+ * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
(bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
* config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
- (define_attr addrtype): Allow load/store register to be
- P register.
+ (define_attr addrtype): Allow load/store register to be P register.
(define_attr storereg): New.
(define_cpu_unit anomaly_05000074): New.
(define_insn_reservation dsp32shiftimm): New.
@@ -220,7 +313,7 @@
2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
+ * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
* sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
when volatile flag is set.
* doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
@@ -607,8 +700,7 @@
expand_expr_real_2): Declare.
* expr.c (emit_storent_insn, expand_expr_real_1,
expand_expr_real_2): Export.
- (store_expr): Setting and evaluating dont_return_target is
- useless.
+ (store_expr): Setting and evaluating dont_return_target is useless.
(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
* except.c (expand_resx_expr): Rename to ...
@@ -665,8 +757,7 @@
(update_register_pressure, setup_insn_max_reg_pressure,
update_reg_and_insn_max_reg_pressure,
sched_setup_bb_reg_pressure_info): New functions.
- (schedule_insn): Add code for printing and updating reg pressure
- info.
+ (schedule_insn): Add code for printing and updating reg pressure info.
(find_set_reg_weight, find_insn_reg_weight): Remove.
(ok_for_early_queue_removal): Do nothing if pressure_only_p.
(debug_ready_list): Print reg pressure info.
@@ -732,8 +823,7 @@
(common_classes): Rename to regno_cover_class.
(COST_INDEX): New.
(record_reg_classes): Set allocno attributes only if allocno_p.
- (record_address_regs): Ditto. Use COST_INDEX instead of
- ALLOCNO_NUM.
+ (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM.
(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
and COSTS_OF_ALLOCNO.
(print_costs): Rename to print_allocno_costs.
@@ -759,8 +849,7 @@
(setup_reg_classes): Add new parameter.
* sched-int.h (struct deps_reg): New member implicit_sets.
- (sched_pressure_p, sched_regno_cover_class): New external
- definitions.
+ (sched_pressure_p, sched_regno_cover_class): New external definitions.
(INCREASE_BITS): New macro.
(struct reg_pressure_data, struct reg_use_data): New.
(struct _haifa_insn_data): Remove reg_weight. Add members
@@ -772,8 +861,7 @@
(struct reg_pressure_data, struct reg_use_data): New.
(INSN_REG_WEIGHT): Remove.
(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
- INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
- macros.
+ INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros.
(sched_init_region_reg_pressure_info,
sched_setup_bb_reg_pressure_info): New prototypes.
@@ -785,8 +873,8 @@
(resize_reg_info): Use reg_info_size. Return flag of resizing.
(setup_reg_classes): Add a new parameter. Setup cover class too.
- * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
- dependencies.
+ * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to
+ the dependencies.
* sched-rgn.c (deps_join): Set up implicit_sets.
(schedule_region): Set up region and basic blocks pressure
@@ -841,8 +929,7 @@
* regrename.c (regrename_optimize): Drop last. Don't count debug
insns as uses. Don't reject change because of debug insn.
(do_replace): Reject DEBUG_INSN as chain starter. Take base_regno
- from the chain starter, and check for inexact matches in
- DEBUG_INSNS.
+ from the chain starter, and check for inexact matches in DEBUG_INSNS.
(scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
(build_def_use): Simplify and fix the marking of DEBUG_INSNs.
* sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
@@ -989,8 +1076,7 @@
(fur_orig_expr_not_found): Skip debug insns.
* rtl.def (VALUE): Move up.
(DEBUG_INSN): New.
- * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug
- stmts.
+ * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts.
(nearest_common_dominator_of_uses): Take debug_stmts argument.
Set it if debug stmts are found.
(statement_sink_location): Skip debug stmts. Propagate
@@ -1060,8 +1146,7 @@
in its expression.
* cfgbuild.c (inside_basic_block_p): Handle debug insns.
(control_flow_insn_p): Likewise.
- * tree-parloops.c (eliminate_local_variables_stmt): Handle debug
- stmt.
+ * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt.
(separate_decls_in_region_debug_bind): New.
(separate_decls_in_region): Process debug bind stmts afterwards.
* recog.c (verify_changes): Handle debug insns.
@@ -1094,8 +1179,7 @@
* function.c (instantiate_virtual_regs): Handle debug insns.
* function.h (struct emit_status): Add x_cur_debug_insn_uid.
* print-rtl.h: Include cselib.h.
- (print_rtx): Print VALUEs. Split out and recurse for
- VAR_LOCATIONs.
+ (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs.
* df.h (df_inns_rescan_debug_internal): Declare.
* gcse.c (alloc_hash_table): Estimate n_insns.
(cprop_insn): Don't regard debug insns as changes.
@@ -1196,8 +1280,7 @@
(cselib_subst_to_values): Adjust.
(cselib_log_lookup): New.
(cselib_lookup): Call it.
- (cselib_invalidate_regno): Don't count preserved values as
- useless.
+ (cselib_invalidate_regno): Don't count preserved values as useless.
(cselib_invalidate_mem): Likewise.
(cselib_record_set): Likewise.
(struct set): Renamed to cselib_set, moved to cselib.h.
@@ -1316,8 +1399,7 @@
(copy_body): Copy debug stmts at the end.
(insert_init_debug_bind): New.
(insert_init_stmt): Take id. Skip and emit debug stmts.
- (setup_one_parameter): Remap variable earlier, register debug
- mapping.
+ (setup_one_parameter): Remap variable earlier, register debug mapping.
(estimate_num_insns): Skip debug stmts.
(expand_call_inline): Preserve debug_map.
(optimize_inline_calls): Check for no debug_stmts left-overs.
@@ -1426,8 +1508,7 @@
(dataflow_set_clear_at_call): New.
(onepart_variable_different_p): New.
(variable_different_p): Use it.
- (dataflow_set_different_1): Adjust. Make detailed dump
- more verbose.
+ (dataflow_set_different_1): Adjust. Make detailed dump more verbose.
(track_expr_p): Add need_rtl parameter. Don't generate rtl
if not needed.
(track_loc_p): Pass it true.
@@ -1475,8 +1556,8 @@
(emit_notes_for_differences_1): Adjust. Handle values.
(emit_notes_for_differences_2): Likewise.
(emit_notes_for_differences): Adjust.
- (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN
- notes. Adjust. Handle new micro-ops.
+ (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes.
+ Adjust. Handle new micro-ops.
(vt_add_function_parameters): Adjust. Create and bind values.
(vt_initialize): Adjust. Initialize scratch_regs and
valvar_pool, flooded and perm.. Initialize and use cselib. Log
@@ -1526,8 +1607,7 @@
empty. Traverse changed_variables with check_changed_vars_1,
call check_changed_vars_2 on each changed_variables_stack entry.
(emit_notes_in_bb): Add SET argument. Just clear it at the
- beginning, use it instead of local &set, don't destroy it at the
- end.
+ beginning, use it instead of local &set, don't destroy it at the end.
(vt_emit_notes): Call dataflow_set_clear early on all
VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
computed set, dataflow_set_clear also VTI(bb)->in when we are
@@ -1554,12 +1634,10 @@
(print-rtl.o): Depend on cselib.h.
(cselib.o): Depend on TREE_PASS_H.
(var-tracking.o): Depend on cselib.h and TARGET_H.
- * sched-rgn.c (rgn_estimate_number_of_insns): Discount
- debug insns.
+ * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns.
(init_ready_list): Skip boundary debug insns.
(add_branch_dependences): Skip debug insns.
- (free_block_dependencies): Check for blocks with only debug
- insns.
+ (free_block_dependencies): Check for blocks with only debug insns.
(compute_priorities): Likewise.
* gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
(gimple_build_with_ops_stat): Take subcode as unsigned. Adjust
@@ -1599,13 +1677,11 @@
(verify_stmt): Likewise.
(debug_loop_num): Skip debug stmts.
(remove_edge_and_dominated_blocks): Remove dominators last.
- * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into
- debug stmts.
+ * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts.
(linearize_expr): Likewise.
* config/i386/i386.c (ix86_delegitimize_address): Call
default implementation.
- * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug
- insns.
+ * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns.
(group_barrier_needed): Skip debug insns.
(emit_insn_group_barriers): Likewise.
(emit_all_insn_group_barriers): Likewise.
@@ -1633,8 +1709,7 @@
* dce.c (deletable_insn_p): Handle VAR_LOCATION.
(mark_reg_dependencies): Skip debug insns.
* params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
- * tree-ssanames.c (release_ssa_name): Propagate def into
- debug stmts.
+ * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts): Skip debug stmts.
* regcprop.c (replace_oldest_value_addr): Skip debug insns.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index db9e6c2e1e0..16c9f7624db 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20090909
+20090910
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 52a979af60a..6a680a0b094 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1927,7 +1927,7 @@ powerpc-*-linux* | powerpc64-*-linux*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
;;
esac
- tmake_file="${tmake_file} rs6000/t-fprules-softfp soft-fp/t-softfp"
+ tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp"
case ${target} in
powerpc*-*-linux*altivec*)
tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
@@ -1943,19 +1943,19 @@ powerpc-*-linux* | powerpc64-*-linux*)
powerpc64-*-gnu*)
tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/default64.h rs6000/linux64.h rs6000/gnu.h glibc-stdint.h"
extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
- tmake_file="t-slibgcc-elf-ver t-gnu"
+ tmake_file="t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu"
;;
powerpc-*-gnu-gnualtivec*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h glibc-stdint.h"
extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
if test x$enable_threads = xyes; then
thread_file='posix'
fi
;;
powerpc-*-gnu*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/gnu.h glibc-stdint.h"
- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
+ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt"
if test x$enable_threads = xyes; then
thread_file='posix'
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ccb5e2f1459..f8d77dd6cd0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7441,7 +7441,8 @@ ix86_can_use_return_insn_p (void)
return 0;
ix86_compute_frame_layout (&frame);
- return frame.to_allocate == 0 && (frame.nregs + frame.nsseregs) == 0;
+ return frame.to_allocate == 0 && frame.padding0 == 0
+ && (frame.nregs + frame.nsseregs) == 0;
}
/* Value should be nonzero if functions must have frame pointers.
@@ -8482,7 +8483,7 @@ ix86_expand_prologue (void)
&& (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)))
{
if (!frame_pointer_needed
- || !frame.to_allocate
+ || !(frame.to_allocate + frame.padding0)
|| crtl->stack_realign_needed)
ix86_emit_save_regs_using_mov (stack_pointer_rtx,
frame.to_allocate
@@ -8492,7 +8493,7 @@ ix86_expand_prologue (void)
-frame.nregs * UNITS_PER_WORD);
}
if (!frame_pointer_needed
- || !frame.to_allocate
+ || !(frame.to_allocate + frame.padding0)
|| crtl->stack_realign_needed)
ix86_emit_save_sse_regs_using_mov (stack_pointer_rtx,
frame.to_allocate);
@@ -8804,9 +8805,10 @@ ix86_expand_epilogue (int style)
if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1)
|| (TARGET_EPILOGUE_USING_MOVE
&& cfun->machine->use_fast_prologue_epilogue
- && ((frame.nregs + frame.nsseregs) > 1 || frame.to_allocate))
+ && ((frame.nregs + frame.nsseregs) > 1
+ || (frame.to_allocate + frame.padding0) != 0))
|| (frame_pointer_needed && !(frame.nregs + frame.nsseregs)
- && frame.to_allocate)
+ && (frame.to_allocate + frame.padding0) != 0)
|| (frame_pointer_needed && TARGET_USE_LEAVE
&& cfun->machine->use_fast_prologue_epilogue
&& (frame.nregs + frame.nsseregs) == 1)
@@ -8822,7 +8824,7 @@ ix86_expand_epilogue (int style)
be addressed by bp. sp must be used instead. */
if (!frame_pointer_needed
- || (sp_valid && !frame.to_allocate)
+ || (sp_valid && !(frame.to_allocate + frame.padding0))
|| stack_realign_fp)
{
ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
@@ -8952,7 +8954,7 @@ ix86_expand_epilogue (int style)
GEN_INT (frame.nsseregs * 16 + frame.padding0),
style, false);
}
- else if (frame.to_allocate || frame.nsseregs)
+ else if (frame.to_allocate || frame.padding0 || frame.nsseregs)
{
ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
frame.to_allocate, red_offset,
diff --git a/gcc/config/moxie/constraints.md b/gcc/config/moxie/constraints.md
index 038be5d4c6e..f76726813e3 100644
--- a/gcc/config/moxie/constraints.md
+++ b/gcc/config/moxie/constraints.md
@@ -40,6 +40,11 @@
(match_test "REG_P (XEXP (op, 0))
&& REGNO_OK_FOR_BASE_P (REGNO (XEXP (op, 0)))")))
+(define_constraint "O"
+ "The constant zero"
+ (and (match_code "const_int")
+ (match_test "ival == 0")))
+
(define_constraint "I"
"An 8-bit constant (0..255)"
(and (match_code "const_int")
@@ -49,4 +54,3 @@
"A constant -(0..255)"
(and (match_code "const_int")
(match_test "ival >= -255 && ival <= 0")))
-
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index 39a5c10bb69..8b2d8b23fe3 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -273,25 +273,22 @@ moxie_expand_prologue (void)
if (cfun->machine->size_for_adjusting_sp > 0)
{
- if (cfun->machine->size_for_adjusting_sp <= 255)
+ int i = cfun->machine->size_for_adjusting_sp;
+ while (i > 255)
{
insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
stack_pointer_rtx,
- GEN_INT (cfun->machine->size_for_adjusting_sp)));
+ GEN_INT (255)));
RTX_FRAME_RELATED_P (insn) = 1;
+ i -= 255;
}
- else
+ if (i > 0)
{
- insn =
- emit_insn (gen_movsi
- (gen_rtx_REG (Pmode, MOXIE_R5),
- GEN_INT (-cfun->machine->size_for_adjusting_sp)));
- RTX_FRAME_RELATED_P (insn) = 1;
- insn = emit_insn (gen_addsi3 (stack_pointer_rtx,
+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
stack_pointer_rtx,
- gen_rtx_REG (Pmode, MOXIE_R5)));
+ GEN_INT (i)));
RTX_FRAME_RELATED_P (insn) = 1;
- }
+ }
}
}
@@ -359,14 +356,14 @@ moxie_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
int *pretend_size, int no_rtl)
{
int regno;
- int regs = 7 - *cum;
+ int regs = 8 - *cum;
*pretend_size = regs < 0 ? 0 : GET_MODE_SIZE (SImode) * regs;
if (no_rtl)
return;
- for (regno = *cum; regno < 7; regno++)
+ for (regno = *cum; regno < 8; regno++)
{
rtx reg = gen_rtx_REG (SImode, regno);
rtx slot = gen_rtx_PLUS (Pmode,
@@ -395,7 +392,7 @@ rtx
moxie_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
{
- if (cum < 7)
+ if (cum < 8)
return gen_rtx_REG (mode, cum);
else
return NULL_RTX;
@@ -420,7 +417,7 @@ moxie_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
else
size = GET_MODE_SIZE (mode);
- return size > 4*5;
+ return size > 4*6;
}
/* Some function arguments will only partially fit in the registers
@@ -434,7 +431,7 @@ moxie_arg_partial_bytes (CUMULATIVE_ARGS *cum,
{
int bytes_left, size;
- if (*cum >= 7)
+ if (*cum >= 8)
return 0;
if (moxie_pass_by_reference (cum, mode, type, named))
@@ -448,7 +445,7 @@ moxie_arg_partial_bytes (CUMULATIVE_ARGS *cum,
else
size = GET_MODE_SIZE (mode);
- bytes_left = (4 * 5) - ((*cum - 2) * 4);
+ bytes_left = (4 * 6) - ((*cum - 2) * 4);
if (size > bytes_left)
return bytes_left;
diff --git a/gcc/config/moxie/moxie.h b/gcc/config/moxie/moxie.h
index f50a6b2a27e..21792da6527 100644
--- a/gcc/config/moxie/moxie.h
+++ b/gcc/config/moxie/moxie.h
@@ -182,7 +182,7 @@ enum reg_class
/* A C expression whose value is a register class containing hard
register REGNO. */
-#define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
+#define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
(R == MOXIE_CC ? CC_REGS : SPECIAL_REGS))
/* A C expression for the number of consecutive hard registers,
@@ -263,7 +263,7 @@ enum reg_class
: (unsigned) int_size_in_bytes (TYPE))
#define FUNCTION_ARG_ADVANCE(CUM,MODE,TYPE,NAMED) \
- (CUM = (CUM < MOXIE_R5 ? \
+ (CUM = (CUM < MOXIE_R6 ? \
CUM + ((3 + MOXIE_FUNCTION_ARG_SIZE(MODE,TYPE))/4) : CUM ))
/* How Scalar Function Values Are Returned */
@@ -299,7 +299,7 @@ enum reg_class
/* Define this if it is the responsibility of the caller to allocate
the area reserved for arguments passed in registers. */
-#define REG_PARM_STACK_SPACE(FNDECL) (5 * UNITS_PER_WORD)
+#define REG_PARM_STACK_SPACE(FNDECL) (6 * UNITS_PER_WORD)
/* Offset from the argument pointer register to the first argument's
address. On some machines it may depend on the data type of the
@@ -463,7 +463,7 @@ do \
/* A C expression that is nonzero if REGNO is the number of a hard
register in which function arguments are sometimes passed. */
-#define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R4)
+#define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R5)
/* A C expression that is nonzero if REGNO is the number of a hard
register in which the values of called function may come back. */
diff --git a/gcc/config/moxie/moxie.md b/gcc/config/moxie/moxie.md
index 02072f48388..a8e68872e3f 100644
--- a/gcc/config/moxie/moxie.md
+++ b/gcc/config/moxie/moxie.md
@@ -223,11 +223,12 @@
}")
(define_insn "*movsi"
- [(set (match_operand:SI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:SI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:SI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:SI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)"
"@
+ xor %0, %0
mov %0, %1
ldi.l %0, %1
st.l %0, %1
@@ -236,7 +237,7 @@
lda.l %0, %1
sto.l %0, %1
ldo.l %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand" "")
@@ -250,11 +251,12 @@
}")
(define_insn "*movqi"
- [(set (match_operand:QI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:QI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:QI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:QI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"register_operand (operands[0], QImode)
|| register_operand (operands[1], QImode)"
"@
+ xor %0, %0
mov %0, %1
ldi.b %0, %1
st.b %0, %1
@@ -263,7 +265,7 @@
lda.b %0, %1
sto.b %0, %1
ldo.b %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
(define_expand "movhi"
[(set (match_operand:HI 0 "general_operand" "")
@@ -277,11 +279,12 @@
}")
(define_insn "*movhi"
- [(set (match_operand:HI 0 "general_operand" "=r,r,W,A,r,r,B,r")
- (match_operand:HI 1 "moxie_general_movsrc_operand" "r,i,r,r,W,A,r,B"))]
+ [(set (match_operand:HI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+ (match_operand:HI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
"(register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
"@
+ xor %0, %0
mov %0, %1
ldi.s %0, %1
st.s %0, %1
@@ -290,7 +293,7 @@
lda.s %0, %1
sto.s %0, %1
ldo.s %0, %1"
- [(set_attr "length" "2,6,2,6,2,6,6,6")])
+ [(set_attr "length" "2,2,6,2,6,2,6,6,6")])
;; -------------------------------------------------------------------------
;; Compare instructions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index ea046d3e920..d7f30f84e0d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -2421,8 +2421,8 @@
[(set (match_operand:DI 0 "reg_or_mem_operand" "=&r,Z,??&r")
(bswap:DI (match_operand:DI 1 "reg_or_mem_operand" "Z,r,r")))
(clobber (match_scratch:DI 2 "=&b,&b,&r"))
- (clobber (match_scratch:DI 3 "=&b,&r,&r"))
- (clobber (match_scratch:DI 4 "=&b,X,&r"))]
+ (clobber (match_scratch:DI 3 "=&r,&r,&r"))
+ (clobber (match_scratch:DI 4 "=&r,X,&r"))]
"TARGET_POWERPC64 && !TARGET_LDBRX
&& (REG_P (operands[0]) || REG_P (operands[1]))"
"#"
@@ -2454,12 +2454,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (DImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
@@ -2484,7 +2485,7 @@
(clobber (match_operand:DI 2 "gpc_reg_operand" ""))
(clobber (match_operand:DI 3 "gpc_reg_operand" ""))
(clobber (match_operand:DI 4 "" ""))]
- "TARGET_POWERPC64 && reload_completed && !TARGET_LDBRX"
+ "TARGET_POWERPC64 && !TARGET_LDBRX && reload_completed"
[(const_int 0)]
"
{
@@ -2503,12 +2504,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (DImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ }
emit_insn (gen_lshrdi3 (op3, src, GEN_INT (32)));
if (BYTES_BIG_ENDIAN)
@@ -2582,13 +2584,14 @@
addr1 = XEXP (src, 0);
if (GET_CODE (addr1) == PLUS)
{
- emit_insn (gen_adddi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ emit_insn (gen_addsi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
+ addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (DImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
@@ -2627,12 +2630,13 @@
if (GET_CODE (addr1) == PLUS)
{
emit_insn (gen_addsi3 (op2, XEXP (addr1, 0), GEN_INT (4)));
- addr1 = XEXP (addr1, 1);
+ addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
}
else
- emit_move_insn (op2, GEN_INT (4));
-
- addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ {
+ emit_move_insn (op2, GEN_INT (4));
+ addr2 = gen_rtx_PLUS (SImode, op2, addr1);
+ }
if (BYTES_BIG_ENDIAN)
{
diff --git a/gcc/config/t-slibgcc-elf-ver b/gcc/config/t-slibgcc-elf-ver
index 49692818476..d5ef9ca163f 100644
--- a/gcc/config/t-slibgcc-elf-ver
+++ b/gcc/config/t-slibgcc-elf-ver
@@ -28,6 +28,9 @@ SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
SHLIB_LC = -lc
+SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=$(SHLIB_SONAME) \
@@ -40,7 +43,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
else true; fi && \
mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
- $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+ $(SHLIB_MAKE_SOLINK)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
@@ -48,7 +51,6 @@ SHLIB_INSTALL = \
$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
- $(LN_S) $(SHLIB_SONAME) \
- $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+ $(SHLIB_INSTALL_SOLINK)
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
diff --git a/gcc/config/t-slibgcc-libgcc b/gcc/config/t-slibgcc-libgcc
new file mode 100644
index 00000000000..df004a5e964
--- /dev/null
+++ b/gcc/config/t-slibgcc-libgcc
@@ -0,0 +1,32 @@
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC 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, or (at your option)
+# any later version.
+#
+# GCC 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Instead of creating $(SHLIB_SOLINK) symlink create a GNU ld
+# linker script which sources in both $(SHLIB_SONAME) and libgcc.a.
+# This is needed on targets where libgcc.a contains routines that aren't in
+# $(SHLIB_SONAME) and are needed for shared libraries.
+
+SHLIB_MAKE_SOLINK = \
+ (echo "/* GNU ld script"; \
+ echo " Use the shared library, but some functions are only in"; \
+ echo " the static library. */"; \
+ echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \
+ ) > $(SHLIB_DIR)/$(SHLIB_SOLINK)
+SHLIB_INSTALL_SOLINK = \
+ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
diff --git a/gcc/configure b/gcc/configure
index cd9bc20ebb3..54cacad70c9 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23991,16 +23991,7 @@ fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
- # Also check for ld.so support, i.e. glibc 2.11 or higher.
- if test x$host = x$build -a x$host = x$target &&
- glibcver=`ldd --version 2>/dev/null`; then
- glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
- glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
- glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
- if test "$glibcnum" -ge 2011 ; then
- gcc_cv_as_gnu_unique_object=yes
- fi
- fi
+ gcc_cv_as_gnu_unique_object=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
@@ -24011,7 +24002,16 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gnu_unique_object" >&5
$as_echo "$gcc_cv_as_gnu_unique_object" >&6; }
if test $gcc_cv_as_gnu_unique_object = yes; then
- enable_gnu_unique_object=yes
+ # Also check for ld.so support, i.e. glibc 2.11 or higher.
+ if test x$host = x$build -a x$host = x$target &&
+ glibcver=`ldd --version 2>/dev/null`; then
+ glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
+ glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
+ if test "$glibcnum" -ge 2011 ; then
+ enable_gnu_unique_object=yes
+ fi
+ fi
fi
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 37d2b8af5ca..9cf2e0eba5b 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3391,7 +3391,7 @@ Valid choices are 'yes' and 'no'.]) ;;
esac],
[gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object,
[elf,2,19,52],,
- [.type foo, @gnu_unique_object],
+ [.type foo, @gnu_unique_object],,
# Also check for ld.so support, i.e. glibc 2.11 or higher.
[if test x$host = x$build -a x$host = x$target &&
glibcver=`ldd --version 2>/dev/null`; then
@@ -3399,10 +3399,9 @@ Valid choices are 'yes' and 'no'.]) ;;
glibcminor=`expr "$glibcver" : "ldd (GNU libc) [[0-9]]*\.\([[0-9]]*\)"`
glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
if test "$glibcnum" -ge 2011 ; then
- gcc_cv_as_gnu_unique_object=yes
+ enable_gnu_unique_object=yes
fi
- fi],
- [enable_gnu_unique_object=yes])])
+ fi])])
if test x$enable_gnu_unique_object = xyes; then
AC_DEFINE(HAVE_GAS_GNU_UNIQUE_OBJECT, 1,
[Define if your assembler supports @gnu_unique_object.])
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3656dbaf48b..db2a892988f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,17 @@
+2009-09-09 Jason Merrill <jason@redhat.com>
+
+ * error.c (find_typenames_r): Also add decltypes.
+
+2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/28293
+ * decl2.c (grokfield): Check for explicit template argument lists.
+
+2009-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR bootstrap/41180
+ * Make-lang.in: Remove redundant code from linkage for darwin10.
+
2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39923
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 356565f75e5..da5d8ac2b18 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -73,8 +73,8 @@ g++-cross$(exeext): g++$(exeext)
# Shared with C front end:
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
- incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
- c-gimplify.o c-omp.o tree-inline.o
+ incpath.o c-ppoutput.o c-cppbuiltin.o prefix.o \
+ c-gimplify.o c-omp.o
# Language-specific object files for C++ and Objective C++.
CXX_AND_OBJCXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index e57c825c94f..eb48c5551f2 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -764,6 +764,7 @@ grokfield (const cp_declarator *declarator,
tree value;
const char *asmspec = 0;
int flags = LOOKUP_ONLYCONVERTING;
+ tree name;
if (init
&& TREE_CODE (init) == TREE_LIST
@@ -792,11 +793,21 @@ grokfield (const cp_declarator *declarator,
&& DECL_CONTEXT (value) != current_class_type)
return value;
- if (DECL_NAME (value) != NULL_TREE
- && IDENTIFIER_POINTER (DECL_NAME (value))[0] == '_'
- && ! strcmp (IDENTIFIER_POINTER (DECL_NAME (value)), "_vptr"))
- error ("member %qD conflicts with virtual function table field name",
- value);
+ name = DECL_NAME (value);
+
+ if (name != NULL_TREE)
+ {
+ if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
+ {
+ error ("explicit template argument list not allowed");
+ return error_mark_node;
+ }
+
+ if (IDENTIFIER_POINTER (name)[0] == '_'
+ && ! strcmp (IDENTIFIER_POINTER (name), "_vptr"))
+ error ("member %qD conflicts with virtual function table field name",
+ value);
+ }
/* Stash away type declarations. */
if (TREE_CODE (value) == TYPE_DECL)
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 19649292627..5d38e026454 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1159,7 +1159,8 @@ dump_template_decl (tree t, int flags)
}
/* find_typenames looks through the type of the function template T
- and returns a VEC containing any typedefs or TYPENAME_TYPEs it finds. */
+ and returns a VEC containing any typedefs, decltypes or TYPENAME_TYPEs
+ it finds. */
struct find_typenames_t
{
@@ -1176,7 +1177,8 @@ find_typenames_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
if (TYPE_P (*tp) && is_typedef_decl (TYPE_NAME (*tp)))
/* Add the type of the typedef without any additional cv-quals. */
mv = TREE_TYPE (TYPE_NAME (*tp));
- else if (TREE_CODE (*tp) == TYPENAME_TYPE)
+ else if (TREE_CODE (*tp) == TYPENAME_TYPE
+ || TREE_CODE (*tp) == DECLTYPE_TYPE)
/* Add the typename without any cv-qualifiers. */
mv = TYPE_MAIN_VARIANT (*tp);
diff --git a/gcc/expr.c b/gcc/expr.c
index cd5eae16880..fe74280d7fe 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -761,9 +761,6 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
if (GET_MODE (x) != VOIDmode)
oldmode = GET_MODE (x);
- if (mode == oldmode)
- return x;
-
/* There is one case that we must handle specially: If we are converting
a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and
we are to interpret the constant as unsigned, gen_lowpart will do
@@ -829,6 +826,9 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
return gen_lowpart (mode, x);
}
+ if (mode == oldmode)
+ return x;
+
/* Converting from integer constant into mode is always equivalent to an
subreg operation. */
if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode)
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d2a301db2b9..c01c4b351b0 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR fortran/41297
+ * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
+ left 'tmp' unused in derived type assignment.
+
2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/41197
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 3d675eb0499..b3642c2232c 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -4460,7 +4460,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
tmp = gfc_evaluate_now (rse->expr, &block);
- tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), rse->expr);
+ tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), tmp);
gfc_add_modify (&block, lse->expr, tmp);
}
else
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 97d2c3789ac..6dce0b78357 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -4190,23 +4190,32 @@ gimple_return_set_retval (gimple gs, tree retval)
/* Returns true when the gimple statment STMT is any of the OpenMP types. */
+#define CASE_GIMPLE_OMP \
+ case GIMPLE_OMP_PARALLEL: \
+ case GIMPLE_OMP_TASK: \
+ case GIMPLE_OMP_FOR: \
+ case GIMPLE_OMP_SECTIONS: \
+ case GIMPLE_OMP_SECTIONS_SWITCH: \
+ case GIMPLE_OMP_SINGLE: \
+ case GIMPLE_OMP_SECTION: \
+ case GIMPLE_OMP_MASTER: \
+ case GIMPLE_OMP_ORDERED: \
+ case GIMPLE_OMP_CRITICAL: \
+ case GIMPLE_OMP_RETURN: \
+ case GIMPLE_OMP_ATOMIC_LOAD: \
+ case GIMPLE_OMP_ATOMIC_STORE: \
+ case GIMPLE_OMP_CONTINUE
+
static inline bool
is_gimple_omp (const_gimple stmt)
{
- return (gimple_code (stmt) == GIMPLE_OMP_PARALLEL
- || gimple_code (stmt) == GIMPLE_OMP_TASK
- || gimple_code (stmt) == GIMPLE_OMP_FOR
- || gimple_code (stmt) == GIMPLE_OMP_SECTIONS
- || gimple_code (stmt) == GIMPLE_OMP_SECTIONS_SWITCH
- || gimple_code (stmt) == GIMPLE_OMP_SINGLE
- || gimple_code (stmt) == GIMPLE_OMP_SECTION
- || gimple_code (stmt) == GIMPLE_OMP_MASTER
- || gimple_code (stmt) == GIMPLE_OMP_ORDERED
- || gimple_code (stmt) == GIMPLE_OMP_CRITICAL
- || gimple_code (stmt) == GIMPLE_OMP_RETURN
- || gimple_code (stmt) == GIMPLE_OMP_ATOMIC_LOAD
- || gimple_code (stmt) == GIMPLE_OMP_ATOMIC_STORE
- || gimple_code (stmt) == GIMPLE_OMP_CONTINUE);
+ switch (gimple_code (stmt))
+ {
+ CASE_GIMPLE_OMP:
+ return true;
+ default:
+ return false;
+ }
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 229c800ea74..8e2266b6024 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,25 @@
+2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/28293
+ * g++.dg/template/crash91.C: New.
+
+2009-09-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/39779
+ * gcc.dg/pr39979.c: New test.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/41101
+ * gcc.c-torture/compile/pr41101.c: New testcase.
+
+2009-09-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41317
+ * gcc.c-torture/execute/pr41317.c: New testcase.
+ * gcc.dg/tree-ssa/forwprop-11.c: XFAIL.
+ * gcc.dg/tree-ssa/forwprop-12.c: Likewise.
+
2009-09-08 Dodji Seketeli <dodji@redhat.com>
Fix some test breakages on Darwin
diff --git a/gcc/testsuite/g++.dg/template/crash91.C b/gcc/testsuite/g++.dg/template/crash91.C
new file mode 100644
index 00000000000..39575cd9f27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash91.C
@@ -0,0 +1,8 @@
+// PR c++/28293
+
+template<int> void foo();
+
+struct A
+{
+ typedef void foo<0>(); // { dg-error "explicit template argument list not allowed" }
+};
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41101.c b/gcc/testsuite/gcc.c-torture/compile/pr41101.c
new file mode 100644
index 00000000000..8d21a00ce8a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41101.c
@@ -0,0 +1,19 @@
+int func(int);
+
+void
+bug(int* x, int* y, unsigned long int N)
+{
+ unsigned long int i;
+ int* t;
+
+ while (1)
+ {
+ for (i=1; i<=N; i++)
+ {
+ y[i] = func(x[i] - x[1]);
+ if (y[i])
+ return;
+ }
+ t=x; x=y; y=t;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr41317.c b/gcc/testsuite/gcc.c-torture/execute/pr41317.c
new file mode 100644
index 00000000000..742068b9ad4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr41317.c
@@ -0,0 +1,28 @@
+extern void abort (void);
+
+struct A
+{
+ int i;
+};
+struct B
+{
+ struct A a;
+ int j;
+};
+
+static void
+foo (struct B *p)
+{
+ ((struct A *)p)->i = 1;
+}
+
+int main()
+{
+ struct A a;
+ a.i = 0;
+ foo ((struct B *)&a);
+ if (a.i != 1)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr39779.c b/gcc/testsuite/gcc.dg/pr39779.c
new file mode 100644
index 00000000000..7d3cef17c67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39779.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+int test (char v1)
+{
+ v1 >>= 0xdebecced;
+ return v1;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
index eaaa6dd4e24..73051ae9645 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
@@ -15,5 +15,5 @@ int g(int *p, int n)
return q[-1];
}
-/* { dg-final { scan-tree-dump-times "= \\\(\\\*a_..\\\)\\\[1\\\];" 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "= \\\(\\\*a_..\\\)\\\[1\\\];" 2 "forwprop1" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
index a74809b609e..1c5ea02ba78 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-12.c
@@ -18,5 +18,5 @@ int bar(struct X *p, int i)
/* We should have propagated the base array address through the
address arithmetic into the memory access as an array access. */
-/* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 81d95d75e6e..524422f1ec4 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2748,24 +2748,30 @@ is_ctrl_altering_stmt (gimple t)
{
gcc_assert (t);
- if (is_gimple_call (t))
+ switch (gimple_code (t))
{
- int flags = gimple_call_flags (t);
+ case GIMPLE_CALL:
+ {
+ int flags = gimple_call_flags (t);
- /* A non-pure/const call alters flow control if the current
- function has nonlocal labels. */
- if (!(flags & (ECF_CONST | ECF_PURE))
- && cfun->has_nonlocal_label)
- return true;
+ /* A non-pure/const call alters flow control if the current
+ function has nonlocal labels. */
+ if (!(flags & (ECF_CONST | ECF_PURE)) && cfun->has_nonlocal_label)
+ return true;
- /* A call also alters control flow if it does not return. */
- if (gimple_call_flags (t) & ECF_NORETURN)
- return true;
- }
+ /* A call also alters control flow if it does not return. */
+ if (gimple_call_flags (t) & ECF_NORETURN)
+ return true;
+ }
+ break;
- /* OpenMP directives alter control flow. */
- if (is_gimple_omp (t))
- return true;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives alter control flow. */
+ return true;
+
+ default:
+ break;
+ }
/* If a statement can throw, it alters control flow. */
return stmt_can_throw_internal (t);
@@ -4143,7 +4149,7 @@ verify_gimple_phi (gimple stmt)
tree type = TREE_TYPE (gimple_phi_result (stmt));
unsigned i;
- if (!is_gimple_variable (gimple_phi_result (stmt)))
+ if (TREE_CODE (gimple_phi_result (stmt)) != SSA_NAME)
{
error ("Invalid PHI result");
return true;
@@ -4196,17 +4202,6 @@ verify_gimple_debug (gimple stmt ATTRIBUTE_UNUSED)
static bool
verify_types_in_gimple_stmt (gimple stmt)
{
- if (is_gimple_omp (stmt))
- {
- /* OpenMP directives are validated by the FE and never operated
- on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
- non-gimple expressions when the main index variable has had
- its address taken. This does not affect the loop itself
- because the header of an GIMPLE_OMP_FOR is merely used to determine
- how to setup the parallel iteration. */
- return false;
- }
-
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
@@ -4244,6 +4239,15 @@ verify_types_in_gimple_stmt (gimple stmt)
case GIMPLE_PREDICT:
return false;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives are validated by the FE and never operated
+ on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
+ non-gimple expressions when the main index variable has had
+ its address taken. This does not affect the loop itself
+ because the header of an GIMPLE_OMP_FOR is merely used to determine
+ how to setup the parallel iteration. */
+ return false;
+
case GIMPLE_DEBUG:
return verify_gimple_debug (stmt);
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 431c456e206..1a0622ef8eb 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1165,7 +1165,13 @@ find_var_candidates (void)
|| !COMPLETE_TYPE_P (type)
|| !host_integerp (TYPE_SIZE (type), 1)
|| tree_low_cst (TYPE_SIZE (type), 1) == 0
- || type_internals_preclude_sra_p (type))
+ || type_internals_preclude_sra_p (type)
+ /* Fix for PR 41089. tree-stdarg.c needs to have va_lists intact but
+ we also want to schedule it rather late. Thus we ignore it in
+ the early pass. */
+ || (sra_mode == SRA_MODE_EARLY_INTRA
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (var))
+ == TYPE_MAIN_VARIANT (va_list_type_node))))
continue;
bitmap_set_bit (candidate_bitmap, DECL_UID (var));
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 14ffdfeb62b..61827a74ab4 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1818,8 +1818,7 @@ maybe_fold_offset_to_array_ref (location_t loc, tree base, tree offset,
static tree
maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
- tree base, tree offset,
- tree orig_type, bool base_is_ptr)
+ tree base, tree offset, tree orig_type)
{
tree f, t, field_type, tail_array_field, field_offset;
tree ret;
@@ -1871,8 +1870,6 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (cmp == 0
&& useless_type_conversion_p (orig_type, field_type))
{
- if (base_is_ptr)
- base = build1 (INDIRECT_REF, record_type, base);
t = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
return t;
}
@@ -1897,13 +1894,8 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
/* If we matched, then set offset to the displacement into
this field. */
- if (base_is_ptr)
- new_base = build1 (INDIRECT_REF, record_type, base);
- else
- new_base = base;
- protected_set_expr_location (new_base, loc);
- new_base = build3 (COMPONENT_REF, field_type, new_base, f, NULL_TREE);
- protected_set_expr_location (new_base, loc);
+ new_base = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
+ SET_EXPR_LOCATION (new_base, loc);
/* Recurse to possibly find the match. */
ret = maybe_fold_offset_to_array_ref (loc, new_base, t, orig_type,
@@ -1911,7 +1903,7 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (ret)
return ret;
ret = maybe_fold_offset_to_component_ref (loc, field_type, new_base, t,
- orig_type, false);
+ orig_type);
if (ret)
return ret;
}
@@ -1925,11 +1917,6 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
/* If we get here, we've got an aggregate field, and a possibly
nonzero offset into them. Recurse and hope for a valid match. */
- if (base_is_ptr)
- {
- base = build1 (INDIRECT_REF, record_type, base);
- SET_EXPR_LOCATION (base, loc);
- }
base = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
SET_EXPR_LOCATION (base, loc);
@@ -1938,7 +1925,7 @@ maybe_fold_offset_to_component_ref (location_t loc, tree record_type,
if (t)
return t;
return maybe_fold_offset_to_component_ref (loc, field_type, base, offset,
- orig_type, false);
+ orig_type);
}
/* Attempt to express (ORIG_TYPE)BASE+OFFSET as BASE->field_of_orig_type
@@ -1955,61 +1942,44 @@ maybe_fold_offset_to_reference (location_t loc, tree base, tree offset,
{
tree ret;
tree type;
- bool base_is_ptr = true;
STRIP_NOPS (base);
- if (TREE_CODE (base) == ADDR_EXPR)
- {
- base_is_ptr = false;
-
- base = TREE_OPERAND (base, 0);
+ if (TREE_CODE (base) != ADDR_EXPR)
+ return NULL_TREE;
- /* Handle case where existing COMPONENT_REF pick e.g. wrong field of union,
- so it needs to be removed and new COMPONENT_REF constructed.
- The wrong COMPONENT_REF are often constructed by folding the
- (type *)&object within the expression (type *)&object+offset */
- if (handled_component_p (base))
+ base = TREE_OPERAND (base, 0);
+
+ /* Handle case where existing COMPONENT_REF pick e.g. wrong field of union,
+ so it needs to be removed and new COMPONENT_REF constructed.
+ The wrong COMPONENT_REF are often constructed by folding the
+ (type *)&object within the expression (type *)&object+offset */
+ if (handled_component_p (base))
+ {
+ HOST_WIDE_INT sub_offset, size, maxsize;
+ tree newbase;
+ newbase = get_ref_base_and_extent (base, &sub_offset,
+ &size, &maxsize);
+ gcc_assert (newbase);
+ if (size == maxsize
+ && size != -1
+ && !(sub_offset & (BITS_PER_UNIT - 1)))
{
- HOST_WIDE_INT sub_offset, size, maxsize;
- tree newbase;
- newbase = get_ref_base_and_extent (base, &sub_offset,
- &size, &maxsize);
- gcc_assert (newbase);
- if (size == maxsize
- && size != -1
- && !(sub_offset & (BITS_PER_UNIT - 1)))
- {
- base = newbase;
- if (sub_offset)
- offset = int_const_binop (PLUS_EXPR, offset,
- build_int_cst (TREE_TYPE (offset),
- sub_offset / BITS_PER_UNIT), 1);
- }
+ base = newbase;
+ if (sub_offset)
+ offset = int_const_binop (PLUS_EXPR, offset,
+ build_int_cst (TREE_TYPE (offset),
+ sub_offset / BITS_PER_UNIT), 1);
}
- if (useless_type_conversion_p (orig_type, TREE_TYPE (base))
- && integer_zerop (offset))
- return base;
- type = TREE_TYPE (base);
}
- else
- {
- base_is_ptr = true;
- if (!POINTER_TYPE_P (TREE_TYPE (base)))
- return NULL_TREE;
- type = TREE_TYPE (TREE_TYPE (base));
- }
- ret = maybe_fold_offset_to_component_ref (loc, type, base, offset,
- orig_type, base_is_ptr);
+ if (useless_type_conversion_p (orig_type, TREE_TYPE (base))
+ && integer_zerop (offset))
+ return base;
+ type = TREE_TYPE (base);
+
+ ret = maybe_fold_offset_to_component_ref (loc, type, base, offset, orig_type);
if (!ret)
- {
- if (base_is_ptr)
- {
- base = build1 (INDIRECT_REF, type, base);
- SET_EXPR_LOCATION (base, loc);
- }
- ret = maybe_fold_offset_to_array_ref (loc,
- base, offset, orig_type, true);
- }
+ ret = maybe_fold_offset_to_array_ref (loc, base, offset, orig_type, true);
+
return ret;
}
@@ -2286,7 +2256,7 @@ maybe_fold_stmt_addition (location_t loc, tree res_type, tree op0, tree op1)
t = maybe_fold_offset_to_array_ref (loc, op0, op1, ptd_type, true);
if (!t)
t = maybe_fold_offset_to_component_ref (loc, TREE_TYPE (op0), op0, op1,
- ptd_type, false);
+ ptd_type);
if (t)
{
t = build1 (ADDR_EXPR, res_type, t);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 7a0533e4301..267aeb5e2fd 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -401,10 +401,6 @@ typedef struct bb_bitmap_sets
#define BB_DEFERRED(BB) ((bb_value_sets_t) ((BB)->aux))->deferred
-/* Maximal set of values, used to initialize the ANTIC problem, which
- is an intersection problem. */
-static bitmap_set_t maximal_set;
-
/* Basic block list in postorder. */
static int *postorder;
@@ -2201,49 +2197,45 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
{
VEC(basic_block, heap) * worklist;
size_t i;
- basic_block bprime, first;
+ basic_block bprime, first = NULL;
worklist = VEC_alloc (basic_block, heap, EDGE_COUNT (block->succs));
FOR_EACH_EDGE (e, ei, block->succs)
- VEC_quick_push (basic_block, worklist, e->dest);
- first = VEC_index (basic_block, worklist, 0);
-
- if (phi_nodes (first))
{
- bitmap_set_t from = ANTIC_IN (first);
-
- if (!BB_VISITED (first))
- from = maximal_set;
- phi_translate_set (ANTIC_OUT, from, block, first);
+ if (!first
+ && BB_VISITED (e->dest))
+ first = e->dest;
+ else if (BB_VISITED (e->dest))
+ VEC_quick_push (basic_block, worklist, e->dest);
}
- else
+
+ /* Of multiple successors we have to have visited one already. */
+ if (!first)
{
- if (!BB_VISITED (first))
- bitmap_set_copy (ANTIC_OUT, maximal_set);
- else
- bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
+ SET_BIT (changed_blocks, block->index);
+ BB_VISITED (block) = 0;
+ BB_DEFERRED (block) = 1;
+ changed = true;
+ VEC_free (basic_block, heap, worklist);
+ goto maybe_dump_sets;
}
- for (i = 1; VEC_iterate (basic_block, worklist, i, bprime); i++)
+ if (phi_nodes (first))
+ phi_translate_set (ANTIC_OUT, ANTIC_IN (first), block, first);
+ else
+ bitmap_set_copy (ANTIC_OUT, ANTIC_IN (first));
+
+ for (i = 0; VEC_iterate (basic_block, worklist, i, bprime); i++)
{
if (phi_nodes (bprime))
{
bitmap_set_t tmp = bitmap_set_new ();
- bitmap_set_t from = ANTIC_IN (bprime);
-
- if (!BB_VISITED (bprime))
- from = maximal_set;
- phi_translate_set (tmp, from, block, bprime);
+ phi_translate_set (tmp, ANTIC_IN (bprime), block, bprime);
bitmap_set_and (ANTIC_OUT, tmp);
bitmap_set_free (tmp);
}
else
- {
- if (!BB_VISITED (bprime))
- bitmap_set_and (ANTIC_OUT, maximal_set);
- else
- bitmap_set_and (ANTIC_OUT, ANTIC_IN (bprime));
- }
+ bitmap_set_and (ANTIC_OUT, ANTIC_IN (bprime));
}
VEC_free (basic_block, heap, worklist);
}
@@ -3711,7 +3703,6 @@ add_to_exp_gen (basic_block block, tree op)
return;
result = get_or_alloc_expr_for_name (op);
bitmap_value_insert_into_set (EXP_GEN (block), result);
- bitmap_value_insert_into_set (maximal_set, result);
}
}
@@ -3740,7 +3731,6 @@ make_values_for_phi (gimple phi, basic_block block)
{
e = get_or_alloc_expr_for_name (arg);
add_to_value (get_expr_value_id (e), e);
- bitmap_value_insert_into_set (maximal_set, e);
}
}
}
@@ -3781,10 +3771,7 @@ compute_avail (void)
e = get_or_alloc_expr_for_name (name);
add_to_value (get_expr_value_id (e), e);
if (!in_fre)
- {
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
- bitmap_value_insert_into_set (maximal_set, e);
- }
+ bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e);
}
@@ -3888,11 +3875,7 @@ compute_avail (void)
get_or_alloc_expression_id (result);
add_to_value (get_expr_value_id (result), result);
if (!in_fre)
- {
- bitmap_value_insert_into_set (EXP_GEN (block),
- result);
- bitmap_value_insert_into_set (maximal_set, result);
- }
+ bitmap_value_insert_into_set (EXP_GEN (block), result);
continue;
}
@@ -3974,10 +3957,7 @@ compute_avail (void)
get_or_alloc_expression_id (result);
add_to_value (get_expr_value_id (result), result);
if (!in_fre)
- {
- bitmap_value_insert_into_set (EXP_GEN (block), result);
- bitmap_value_insert_into_set (maximal_set, result);
- }
+ bitmap_value_insert_into_set (EXP_GEN (block), result);
continue;
}
@@ -4515,7 +4495,6 @@ init_pre (bool do_fre)
TMP_GEN (bb) = bitmap_set_new ();
AVAIL_OUT (bb) = bitmap_set_new ();
}
- maximal_set = in_fre ? NULL : bitmap_set_new ();
need_eh_cleanup = BITMAP_ALLOC (NULL);
}
@@ -4601,8 +4580,6 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED)
print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
}
-
- print_bitmap_set (dump_file, maximal_set, "maximal", 0);
}
/* Insert can get quite slow on an incredibly large number of basic
diff --git a/gcc/tree.c b/gcc/tree.c
index 010aeff2f57..17009c6b8e4 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4238,16 +4238,6 @@ free_lang_data_in_type (tree type)
TYPE_CONTEXT (type) = NULL_TREE;
TYPE_STUB_DECL (type) = NULL_TREE;
-
- /* Remove type variants other than the main variant. This is both
- wasteful and it may introduce infinite loops when the types are
- read from disk and merged (since the variant will be the same
- type as the main variant, traversing type variants will get into
- an infinite loop). */
- if (TYPE_MAIN_VARIANT (type))
- TYPE_NEXT_VARIANT (TYPE_MAIN_VARIANT (type)) = NULL_TREE;
-
- TYPE_NEXT_VARIANT (type) = NULL_TREE;
}
@@ -4856,6 +4846,12 @@ free_lang_data (void)
boolean_true_node = TYPE_MAX_VALUE (boolean_type_node);
}
+ /* Unify char_type_node with its properly signed variant. */
+ if (TYPE_UNSIGNED (char_type_node))
+ unsigned_char_type_node = char_type_node;
+ else
+ signed_char_type_node = char_type_node;
+
/* Reset some langhooks. */
lang_hooks.callgraph.analyze_expr = NULL;
lang_hooks.types_compatible_p = NULL;
@@ -4898,7 +4894,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0 /* todo_flags_finish */
+ TODO_ggc_collect /* todo_flags_finish */
}
};
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 52415c8727e..b64e561a0cc 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2009-09-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
diff --git a/libdecnumber/configure b/libdecnumber/configure
index c8ef76d8474..75a7b90570f 100755
--- a/libdecnumber/configure
+++ b/libdecnumber/configure
@@ -1633,123 +1633,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
-# ac_fn_c_find_intX_t LINENO BITS VAR
-# -----------------------------------
-# Finds a signed integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_intX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
-$as_echo_n "checking for int$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- for ac_type in int$2_t 'int' 'long int' \
- 'long long int' 'short int' 'signed char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
- < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- case $ac_type in #(
- int$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
-
-else
- break
-fi
- done
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_find_intX_t
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
-
-} # ac_fn_c_try_link
-
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -1804,58 +1687,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
-# ac_fn_c_find_uintX_t LINENO BITS VAR
-# ------------------------------------
-# Finds an unsigned integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_uintX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
- 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- case $ac_type in #(
- uint$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
-
-else
- break
-fi
- done
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_find_uintX_t
-
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -3922,409 +3753,410 @@ fi
done
-ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
-case $ac_cv_c_int8_t in #(
- no|yes) ;; #(
- *)
-cat >>confdefs.h <<_ACEOF
-#define int8_t $ac_cv_c_int8_t
-_ACEOF
-;;
-esac
-ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
-case $ac_cv_c_int16_t in #(
- no|yes) ;; #(
- *)
+inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
-cat >>confdefs.h <<_ACEOF
-#define int16_t $ac_cv_c_int16_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
-case $ac_cv_c_int32_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int32_t $ac_cv_c_int32_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
-case $ac_cv_c_int64_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int64_t $ac_cv_c_int64_t
-_ACEOF
-;;
-esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then :
- $as_echo_n "(cached) " >&6
+acx_cv_header_stdint=stddef.h
+acx_cv_header_stdint_kind="(already complete)"
+for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uintmax_t
+ unset ac_cv_type_int_least32_t
+ unset ac_cv_type_int_fast32_t
+ unset ac_cv_type_uint64_t
+ $as_echo_n "looking for a compliant stdint.h in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintmax_t" = x""yes; then :
+ acx_cv_header_stdint=$i
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ continue
+fi
- /* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;
-int
-main ()
-{
-/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
- ;
- return 0;
-}
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if test "$cross_compiling" = yes; then :
- ac_cv_type_long_long_int=yes
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- #ifndef LLONG_MAX
- # define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- # define LLONG_MAX (HALF - 1 + HALF)
- #endif
-int
-main ()
-{
-long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_type_long_long_int=yes
-else
- ac_cv_type_long_long_int=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ acx_cv_header_stdint_kind="(mostly complete)"
fi
+ ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_int_least32_t" = x""yes; then :
+
else
- ac_cv_type_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ acx_cv_header_stdint_kind="(mostly complete)"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
- if test $ac_cv_type_long_long_int = yes; then
-
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
-
- fi
-
+ ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_int_fast32_t" = x""yes; then :
- ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_intmax_t" = x""yes; then :
+else
+ acx_cv_header_stdint_kind="(mostly complete)"
+fi
-$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+ ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint64_t" = x""yes; then :
else
- test $ac_cv_type_long_long_int = yes \
- && ac_type='long long int' \
- || ac_type='long int'
-
-cat >>confdefs.h <<_ACEOF
-#define intmax_t $ac_type
-_ACEOF
+ acx_cv_header_stdint_kind="(lacks uint64_t)"
+fi
+ break
+done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(lacks uintmax_t)"
+ for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uint32_t
+ unset ac_cv_type_uint64_t
+ $as_echo_n "looking for an incomplete stdint.h in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint32_t" = x""yes; then :
+ acx_cv_header_stdint=$i
+else
+ continue
fi
+ ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint64_t" = x""yes; then :
+fi
- ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = x""yes; then :
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+fi
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(u_intXX_t style)"
+ for i in sys/types.h $inttype_headers; do
+ unset ac_cv_type_u_int32_t
+ unset ac_cv_type_u_int64_t
+ $as_echo_n "looking for u_intXX_t types in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_u_int32_t" = x""yes; then :
+ acx_cv_header_stdint=$i
else
- for ac_type in 'int' 'long int' 'long long int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
-test_array [0] = 0
+ continue
+fi
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+ ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_u_int64_t" = x""yes; then :
-cat >>confdefs.h <<_ACEOF
-#define intptr_t $ac_type
-_ACEOF
+fi
- ac_type=
+ break
+ done
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test -z "$ac_type" && break
- done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(using manual detection)"
fi
+test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
+test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
+test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
+test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
+test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
-ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
-case $ac_cv_c_uint8_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT8_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint8_t $ac_cv_c_uint8_t
-_ACEOF
-;;
- esac
-
-ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
-case $ac_cv_c_uint16_t in #(
- no|yes) ;; #(
- *)
+# ----------------- Summarize what we found so far
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what to include in gstdint.h" >&5
+$as_echo_n "checking what to include in gstdint.h... " >&6; }
-cat >>confdefs.h <<_ACEOF
-#define uint16_t $ac_cv_c_uint16_t
-_ACEOF
-;;
- esac
+case `$as_basename -- gstdint.h ||
+$as_expr X/gstdint.h : '.*/\([^/][^/]*\)/*$' \| \
+ Xgstdint.h : 'X\(//\)$' \| \
+ Xgstdint.h : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/gstdint.h |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'` in
+ stdint.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
+$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
+$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ *) ;;
+esac
-ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
-case $ac_cv_c_uint32_t in #(
- no|yes) ;; #(
- *)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
+$as_echo "$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6; }
-$as_echo "#define _UINT32_T 1" >>confdefs.h
+# ----------------- done included file, check C basic types --------
+# Lacking an uintptr_t? Test size of void *
+case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
+ stddef.h:* | *:no) # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
-cat >>confdefs.h <<_ACEOF
-#define uint32_t $ac_cv_c_uint32_t
-_ACEOF
-;;
- esac
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (void *)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
-ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
-case $ac_cv_c_uint64_t in #(
- no|yes) ;; #(
- *)
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
-$as_echo "#define _UINT64_T 1" >>confdefs.h
cat >>confdefs.h <<_ACEOF
-#define uint64_t $ac_cv_c_uint64_t
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF
-;;
- esac
+ ;;
+esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+# Lacking an uint64_t? Test size of long
+case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
+ stddef.h:*:* | *:no:no) # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- /* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;
-int
-main ()
-{
-/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
- ;
- return 0;
-}
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_type_unsigned_long_long_int=yes
else
- ac_cv_type_unsigned_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (long)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
- if test $ac_cv_type_unsigned_long_long_int = yes; then
-
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
-
- fi
-
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
- ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintmax_t" = x""yes; then :
-
-$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
-else
- test $ac_cv_type_unsigned_long_long_int = yes \
- && ac_type='unsigned long long int' \
- || ac_type='unsigned long int'
cat >>confdefs.h <<_ACEOF
-#define uintmax_t $ac_type
+#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF
-fi
-
+ ;;
+esac
+if test $acx_cv_header_stdint = stddef.h; then
+ # Lacking a good header? Test size of everything and deduce all types.
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
- ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = x""yes; then :
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (int)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
-$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
-else
- for ac_type in 'unsigned int' 'unsigned long int' \
- 'unsigned long long int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
-test_array [0] = 0
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
cat >>confdefs.h <<_ACEOF
-#define uintptr_t $ac_type
+#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF
- ac_type=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test -z "$ac_type" && break
- done
-fi
-
-
-
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if test "${ac_cv_sizeof_short+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (short)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if test "${ac_cv_sizeof_char+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_char" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (char)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_char=0
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
-ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-"
-if test "x$ac_cv_type_int_least32_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_INT_LEAST32_T 1
+#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF
-fi
-ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-"
-if test "x$ac_cv_type_int_fast32_t" = x""yes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT_FAST32_T 1
-_ACEOF
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int8_t" >&5
+$as_echo_n "checking for type equivalent to int8_t... " >&6; }
+ case "$ac_cv_sizeof_char" in
+ 1) acx_cv_type_int8_t=char ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 8-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int8_t" >&5
+$as_echo "$acx_cv_type_int8_t" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int16_t" >&5
+$as_echo_n "checking for type equivalent to int16_t... " >&6; }
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
+ 2:*) acx_cv_type_int16_t=int ;;
+ *:2) acx_cv_type_int16_t=short ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 16-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int16_t" >&5
+$as_echo "$acx_cv_type_int16_t" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int32_t" >&5
+$as_echo_n "checking for type equivalent to int32_t... " >&6; }
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
+ 4:*) acx_cv_type_int32_t=int ;;
+ *:4) acx_cv_type_int32_t=long ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 32-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int32_t" >&5
+$as_echo "$acx_cv_type_int32_t" >&6; }
fi
+# These tests are here to make the output prettier
-# ----------------- Summarize what we found so far
-
-
-
+if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
+ case "$ac_cv_sizeof_long" in
+ 8) acx_cv_type_int64_t=long ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int64_t" >&5
+$as_echo_n "checking for type equivalent to int64_t... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
+$as_echo "${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6; }
+fi
+
+# Now we can use the above types
+
+if test "$ac_cv_type_uintptr_t" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to intptr_t" >&5
+$as_echo_n "checking for type equivalent to intptr_t... " >&6; }
+ case $ac_cv_sizeof_void_p in
+ 2) acx_cv_type_intptr_t=int16_t ;;
+ 4) acx_cv_type_intptr_t=int32_t ;;
+ 8) acx_cv_type_intptr_t=int64_t ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no equivalent for intptr_t" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_intptr_t" >&5
+$as_echo "$acx_cv_type_intptr_t" >&6; }
+fi
# ----------------- done all checks, emit header -------------
ac_config_commands="$ac_config_commands gstdint.h"
@@ -5719,8 +5551,22 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# INIT-COMMANDS
#
+GCC="$GCC"
+CC="$CC"
+acx_cv_header_stdint="$acx_cv_header_stdint"
+acx_cv_type_int8_t="$acx_cv_type_int8_t"
+acx_cv_type_int16_t="$acx_cv_type_int16_t"
+acx_cv_type_int32_t="$acx_cv_type_int32_t"
+acx_cv_type_int64_t="$acx_cv_type_int64_t"
+acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
+ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
+ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
_ACEOF
@@ -6274,20 +6120,263 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"gstdint.h":C)
-cat >> tmp-stdint.h <<EOF
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
+if test "$GCC" = yes; then
+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
+else
+ echo "/* generated for $CC */" > tmp-stdint.h
+fi
-#include "config.h"
-#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef GCC_GENERATED_STDINT_H
+ #define GCC_GENERATED_STDINT_H 1
+
+ #include <sys/types.h>
EOF
+if test "$acx_cv_header_stdint" != stdint.h; then
+ echo "#include <stddef.h>" >> tmp-stdint.h
+fi
+if test "$acx_cv_header_stdint" != stddef.h; then
+ echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+ /* glibc uses these symbols as guards to prevent redefinitions. */
+ #ifdef __int8_t_defined
+ #define _INT8_T
+ #define _INT16_T
+ #define _INT32_T
+ #endif
+ #ifdef __uint32_t_defined
+ #define _UINT32_T
+ #endif
+
+EOF
+
+# ----------------- done header, emit basic int types -------------
+if test "$acx_cv_header_stdint" = stddef.h; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef unsigned $acx_cv_type_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef unsigned $acx_cv_type_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef unsigned $acx_cv_type_int32_t uint32_t;
+ #endif
+ #endif
+
+ #ifndef _INT8_T
+ #define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
+ typedef $acx_cv_type_int8_t int8_t;
+ #endif
+ #endif
+
+ #ifndef _INT16_T
+ #define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
+ typedef $acx_cv_type_int16_t int16_t;
+ #endif
+ #endif
+
+ #ifndef _INT32_T
+ #define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
+ typedef $acx_cv_type_int32_t int32_t;
+ #endif
+ #endif
+EOF
+elif test "$ac_cv_type_u_int32_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef u_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef u_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef u_int32_t uint32_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Some systems have guard macros to prevent redefinitions, define them. */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #endif
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #endif
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #endif
+EOF
+fi
+
+# ------------- done basic int types, emit int64_t types ------------
+if test "$ac_cv_type_uint64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have good uint64_t and int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #endif
+EOF
+elif test "$ac_cv_type_u_int64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have an u_int64_t (and int64_t) */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef u_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+elif test -n "$acx_cv_type_int64_t"; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* architecture has a 64-bit type, $acx_cv_type_int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ typedef $acx_cv_type_int64_t int64_t;
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef unsigned $acx_cv_type_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* some common heuristics for int64_t, using compiler-specific tests */
+ #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
+ #ifndef _INT64_T
+ #define _INT64_T
+ #ifndef __int64_t_defined
+ typedef long long int64_t;
+ #endif
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ typedef unsigned long long uint64_t;
+ #endif
+
+ #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+ # define __extension__
+ # endif
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ __extension__ typedef long long int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ __extension__ typedef unsigned long long uint64_t;
+ # endif
+
+ #elif !defined __STRICT_ANSI__
+ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ typedef __int64 int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ typedef unsigned __int64 uint64_t;
+ # endif
+ # endif /* compiler */
+
+ #endif /* ANSI version */
+EOF
+fi
+
+# ------------- done int64_t types, emit intptr types ------------
+if test "$ac_cv_type_uintptr_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
+ typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
+ typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
+EOF
+fi
+
+# ------------- done intptr types, emit int_least types ------------
if test "$ac_cv_type_int_least32_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -6295,15 +6384,20 @@ if test "$ac_cv_type_int_least32_t" != yes; then
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
+ #ifdef _INT64_T
typedef int64_t int_least64_t;
+ #endif
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_least64_t;
+ #endif
EOF
fi
+# ------------- done intptr types, emit int_fast types ------------
if test "$ac_cv_type_int_fast32_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -6311,16 +6405,40 @@ if test "$ac_cv_type_int_fast32_t" != yes; then
typedef int8_t int_fast8_t;
typedef int int_fast16_t;
typedef int32_t int_fast32_t;
+ #ifdef _INT64_T
typedef int64_t int_fast64_t;
+ #endif
typedef uint8_t uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef uint32_t uint_fast32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_fast64_t;
+ #endif
EOF
fi
-echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h
+if test "$ac_cv_type_uintmax_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intmax based on what we found */
+ #ifdef _INT64_T
+ typedef int64_t intmax_t;
+ #else
+ typedef long intmax_t;
+ #endif
+ #ifdef _UINT64_T
+ typedef uint64_t uintmax_t;
+ #else
+ typedef unsigned long uintmax_t;
+ #endif
+EOF
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #endif /* GCC_GENERATED_STDINT_H */
+EOF
if test -r gstdint.h && cmp -s tmp-stdint.h gstdint.h; then
rm -f tmp-stdint.h
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 262039ad53e..f46f11a861e 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2009-09-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
2009-09-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41192
diff --git a/libgomp/config.h.in b/libgomp/config.h.in
index 201d56a060e..c88660a945e 100644
--- a/libgomp/config.h.in
+++ b/libgomp/config.h.in
@@ -27,24 +27,9 @@
/* Define to 1 if you have the `getloadavg' function. */
#undef HAVE_GETLOADAVG
-/* Define to 1 if the system has the type `intmax_t'. */
-#undef HAVE_INTMAX_T
-
-/* Define to 1 if the system has the type `intptr_t'. */
-#undef HAVE_INTPTR_T
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if the system has the type `int_fast32_t'. */
-#undef HAVE_INT_FAST32_T
-
-/* Define to 1 if the system has the type `int_least32_t'. */
-#undef HAVE_INT_LEAST32_T
-
-/* Define to 1 if the system has the type `long long int'. */
-#undef HAVE_LONG_LONG_INT
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -87,18 +72,9 @@
/* Define to 1 if the target supports thread-local storage. */
#undef HAVE_TLS
-/* Define to 1 if the system has the type `uintmax_t'. */
-#undef HAVE_UINTMAX_T
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-#undef HAVE_UINTPTR_T
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if the system has the type `unsigned long long int'. */
-#undef HAVE_UNSIGNED_LONG_LONG_INT
-
/* Define to 1 if GNU symbol versioning is used for libgomp. */
#undef LIBGOMP_GNU_SYMBOL_VERSIONING
@@ -127,6 +103,21 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* The size of `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -138,66 +129,3 @@
/* Version number of package */
#undef VERSION
-
-/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
- #define below would cause a syntax error. */
-#undef _UINT32_T
-
-/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
- #define below would cause a syntax error. */
-#undef _UINT64_T
-
-/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
- #define below would cause a syntax error. */
-#undef _UINT8_T
-
-/* Define to the type of a signed integer type of width exactly 16 bits if
- such a type exists and the standard includes do not define it. */
-#undef int16_t
-
-/* Define to the type of a signed integer type of width exactly 32 bits if
- such a type exists and the standard includes do not define it. */
-#undef int32_t
-
-/* Define to the type of a signed integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-#undef int64_t
-
-/* Define to the type of a signed integer type of width exactly 8 bits if such
- a type exists and the standard includes do not define it. */
-#undef int8_t
-
-/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
- not define. */
-#undef intmax_t
-
-/* Define to the type of a signed integer type wide enough to hold a pointer,
- if such a type exists, and if the system does not define it. */
-#undef intptr_t
-
-/* Define to the type of an unsigned integer type of width exactly 16 bits if
- such a type exists and the standard includes do not define it. */
-#undef uint16_t
-
-/* Define to the type of an unsigned integer type of width exactly 32 bits if
- such a type exists and the standard includes do not define it. */
-#undef uint32_t
-
-/* Define to the type of an unsigned integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-#undef uint64_t
-
-/* Define to the type of an unsigned integer type of width exactly 8 bits if
- such a type exists and the standard includes do not define it. */
-#undef uint8_t
-
-/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
- do not define. */
-#undef uintmax_t
-
-/* Define to the type of an unsigned integer type wide enough to hold a
- pointer, if such a type exists, and if the system does not define it. */
-#undef uintptr_t
diff --git a/libgomp/configure b/libgomp/configure
index 70ca41dcc5d..6e92fe909c9 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -2090,77 +2090,6 @@ fi
} # ac_fn_c_check_header_mongrel
-# ac_fn_c_find_intX_t LINENO BITS VAR
-# -----------------------------------
-# Finds a signed integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_intX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
-$as_echo_n "checking for int$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- for ac_type in int$2_t 'int' 'long int' \
- 'long long int' 'short int' 'signed char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
- < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- case $ac_type in #(
- int$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
-
-else
- break
-fi
- done
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_find_intX_t
-
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -2215,58 +2144,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
-# ac_fn_c_find_uintX_t LINENO BITS VAR
-# ------------------------------------
-# Finds an unsigned integer type with width BITS, setting cache variable VAR
-# accordingly.
-ac_fn_c_find_uintX_t ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
- 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- case $ac_type in #(
- uint$2_t) :
- eval "$3=yes" ;; #(
- *) :
- eval "$3=\$ac_type" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
-
-else
- break
-fi
- done
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_find_uintX_t
-
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -5487,13 +5364,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5490: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5367: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5493: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5370: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5496: output\"" >&5)
+ (eval echo "\"\$as_me:5373: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6699,7 +6576,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6702 "configure"' > conftest.$ac_ext
+ echo '#line 6579 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8229,11 +8106,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8232: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8109: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8236: \$? = $ac_status" >&5
+ echo "$as_me:8113: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8568,11 +8445,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8571: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8448: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8575: \$? = $ac_status" >&5
+ echo "$as_me:8452: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8673,11 +8550,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8676: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8553: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8680: \$? = $ac_status" >&5
+ echo "$as_me:8557: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8728,11 +8605,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8731: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8608: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8735: \$? = $ac_status" >&5
+ echo "$as_me:8612: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11110,7 +10987,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11113 "configure"
+#line 10990 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11206,7 +11083,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11209 "configure"
+#line 11086 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12474,11 +12351,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12477: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12354: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12481: \$? = $ac_status" >&5
+ echo "$as_me:12358: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12573,11 +12450,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12576: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12453: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12580: \$? = $ac_status" >&5
+ echo "$as_me:12457: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12625,11 +12502,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12628: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12505: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12632: \$? = $ac_status" >&5
+ echo "$as_me:12509: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14708,409 +14585,410 @@ fi
done
-ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
-case $ac_cv_c_int8_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int8_t $ac_cv_c_int8_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
-case $ac_cv_c_int16_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int16_t $ac_cv_c_int16_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
-case $ac_cv_c_int32_t in #(
- no|yes) ;; #(
- *)
-
-cat >>confdefs.h <<_ACEOF
-#define int32_t $ac_cv_c_int32_t
-_ACEOF
-;;
-esac
-
-ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
-case $ac_cv_c_int64_t in #(
- no|yes) ;; #(
- *)
-cat >>confdefs.h <<_ACEOF
-#define int64_t $ac_cv_c_int64_t
-_ACEOF
-;;
-esac
+inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then :
- $as_echo_n "(cached) " >&6
+acx_cv_header_stdint=stddef.h
+acx_cv_header_stdint_kind="(already complete)"
+for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uintmax_t
+ unset ac_cv_type_int_least32_t
+ unset ac_cv_type_int_fast32_t
+ unset ac_cv_type_uint64_t
+ $as_echo_n "looking for a compliant stdint.h in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintmax_t" = x""yes; then :
+ acx_cv_header_stdint=$i
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ continue
+fi
- /* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;
-int
-main ()
-{
-/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
- ;
- return 0;
-}
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if test "$cross_compiling" = yes; then :
- ac_cv_type_long_long_int=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
- #ifndef LLONG_MAX
- # define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- # define LLONG_MAX (HALF - 1 + HALF)
- #endif
-int
-main ()
-{
-long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_type_long_long_int=yes
else
- ac_cv_type_long_long_int=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ acx_cv_header_stdint_kind="(mostly complete)"
fi
+ ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_int_least32_t" = x""yes; then :
+
else
- ac_cv_type_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ acx_cv_header_stdint_kind="(mostly complete)"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
- if test $ac_cv_type_long_long_int = yes; then
-
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
-
- fi
-
+ ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_int_fast32_t" = x""yes; then :
- ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_intmax_t" = x""yes; then :
+else
+ acx_cv_header_stdint_kind="(mostly complete)"
+fi
-$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+ ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint64_t" = x""yes; then :
else
- test $ac_cv_type_long_long_int = yes \
- && ac_type='long long int' \
- || ac_type='long int'
-
-cat >>confdefs.h <<_ACEOF
-#define intmax_t $ac_type
-_ACEOF
+ acx_cv_header_stdint_kind="(lacks uint64_t)"
+fi
+ break
+done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(lacks uintmax_t)"
+ for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uint32_t
+ unset ac_cv_type_uint64_t
+ $as_echo_n "looking for an incomplete stdint.h in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint32_t" = x""yes; then :
+ acx_cv_header_stdint=$i
+else
+ continue
fi
+ ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uint64_t" = x""yes; then :
+fi
- ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = x""yes; then :
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
+fi
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(u_intXX_t style)"
+ for i in sys/types.h $inttype_headers; do
+ unset ac_cv_type_u_int32_t
+ unset ac_cv_type_u_int64_t
+ $as_echo_n "looking for u_intXX_t types in $i, " >&6
+ ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_u_int32_t" = x""yes; then :
+ acx_cv_header_stdint=$i
else
- for ac_type in 'int' 'long int' 'long long int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
-test_array [0] = 0
+ continue
+fi
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+ ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include <sys/types.h>
+#include <$i>
+"
+if test "x$ac_cv_type_u_int64_t" = x""yes; then :
-cat >>confdefs.h <<_ACEOF
-#define intptr_t $ac_type
-_ACEOF
+fi
- ac_type=
+ break
+ done
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test -z "$ac_type" && break
- done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(using manual detection)"
fi
+test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
+test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
+test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
+test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
+test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
-ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
-case $ac_cv_c_uint8_t in #(
- no|yes) ;; #(
- *)
-
-$as_echo "#define _UINT8_T 1" >>confdefs.h
-
-
-cat >>confdefs.h <<_ACEOF
-#define uint8_t $ac_cv_c_uint8_t
-_ACEOF
-;;
- esac
-
-ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
-case $ac_cv_c_uint16_t in #(
- no|yes) ;; #(
- *)
+# ----------------- Summarize what we found so far
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what to include in gstdint.h" >&5
+$as_echo_n "checking what to include in gstdint.h... " >&6; }
-cat >>confdefs.h <<_ACEOF
-#define uint16_t $ac_cv_c_uint16_t
-_ACEOF
-;;
- esac
+case `$as_basename -- gstdint.h ||
+$as_expr X/gstdint.h : '.*/\([^/][^/]*\)/*$' \| \
+ Xgstdint.h : 'X\(//\)$' \| \
+ Xgstdint.h : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/gstdint.h |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'` in
+ stdint.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
+$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5
+$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ *) ;;
+esac
-ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
-case $ac_cv_c_uint32_t in #(
- no|yes) ;; #(
- *)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
+$as_echo "$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6; }
-$as_echo "#define _UINT32_T 1" >>confdefs.h
+# ----------------- done included file, check C basic types --------
+# Lacking an uintptr_t? Test size of void *
+case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
+ stddef.h:* | *:no) # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
-cat >>confdefs.h <<_ACEOF
-#define uint32_t $ac_cv_c_uint32_t
-_ACEOF
-;;
- esac
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (void *)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
-ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
-case $ac_cv_c_uint64_t in #(
- no|yes) ;; #(
- *)
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
-$as_echo "#define _UINT64_T 1" >>confdefs.h
cat >>confdefs.h <<_ACEOF
-#define uint64_t $ac_cv_c_uint64_t
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF
-;;
- esac
+ ;;
+esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+# Lacking an uint64_t? Test size of long
+case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
+ stddef.h:*:* | *:no:no) # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
- /* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;
-int
-main ()
-{
-/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_type_unsigned_long_long_int=yes
else
- ac_cv_type_unsigned_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (long)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
- if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
-
- fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
- ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintmax_t" = x""yes; then :
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
-$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+ ;;
+esac
+if test $acx_cv_header_stdint = stddef.h; then
+ # Lacking a good header? Test size of everything and deduce all types.
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- test $ac_cv_type_unsigned_long_long_int = yes \
- && ac_type='unsigned long long int' \
- || ac_type='unsigned long int'
-
-cat >>confdefs.h <<_ACEOF
-#define uintmax_t $ac_type
-_ACEOF
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (int)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
- ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = x""yes; then :
-
-$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
-
-else
- for ac_type in 'unsigned int' 'unsigned long int' \
- 'unsigned long long int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
cat >>confdefs.h <<_ACEOF
-#define uintptr_t $ac_type
+#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF
- ac_type=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test -z "$ac_type" && break
- done
-fi
-
-
-
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if test "${ac_cv_sizeof_short+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (short)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+ # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if test "${ac_cv_sizeof_char+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_char" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (char)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_char=0
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
-ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-"
-if test "x$ac_cv_type_int_least32_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_INT_LEAST32_T 1
+#define SIZEOF_CHAR $ac_cv_sizeof_char
_ACEOF
-fi
-ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-"
-if test "x$ac_cv_type_int_fast32_t" = x""yes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT_FAST32_T 1
-_ACEOF
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int8_t" >&5
+$as_echo_n "checking for type equivalent to int8_t... " >&6; }
+ case "$ac_cv_sizeof_char" in
+ 1) acx_cv_type_int8_t=char ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 8-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int8_t" >&5
+$as_echo "$acx_cv_type_int8_t" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int16_t" >&5
+$as_echo_n "checking for type equivalent to int16_t... " >&6; }
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
+ 2:*) acx_cv_type_int16_t=int ;;
+ *:2) acx_cv_type_int16_t=short ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 16-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int16_t" >&5
+$as_echo "$acx_cv_type_int16_t" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int32_t" >&5
+$as_echo_n "checking for type equivalent to int32_t... " >&6; }
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
+ 4:*) acx_cv_type_int32_t=int ;;
+ *:4) acx_cv_type_int32_t=long ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no 32-bit type" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int32_t" >&5
+$as_echo "$acx_cv_type_int32_t" >&6; }
fi
+# These tests are here to make the output prettier
-# ----------------- Summarize what we found so far
-
-
-
+if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
+ case "$ac_cv_sizeof_long" in
+ 8) acx_cv_type_int64_t=long ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int64_t" >&5
+$as_echo_n "checking for type equivalent to int64_t... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
+$as_echo "${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6; }
+fi
+
+# Now we can use the above types
+
+if test "$ac_cv_type_uintptr_t" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to intptr_t" >&5
+$as_echo_n "checking for type equivalent to intptr_t... " >&6; }
+ case $ac_cv_sizeof_void_p in
+ 2) acx_cv_type_intptr_t=int16_t ;;
+ 4) acx_cv_type_intptr_t=int32_t ;;
+ 8) acx_cv_type_intptr_t=int64_t ;;
+ *) { as_fn_set_status please report a bug
+as_fn_error "no equivalent for intptr_t" "$LINENO" 5; }
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_intptr_t" >&5
+$as_echo "$acx_cv_type_intptr_t" >&6; }
+fi
# ----------------- done all checks, emit header -------------
ac_config_commands="$ac_config_commands gstdint.h"
@@ -17400,8 +17278,22 @@ fi
+GCC="$GCC"
+CC="$CC"
+acx_cv_header_stdint="$acx_cv_header_stdint"
+acx_cv_type_int8_t="$acx_cv_type_int8_t"
+acx_cv_type_int16_t="$acx_cv_type_int16_t"
+acx_cv_type_int32_t="$acx_cv_type_int32_t"
+acx_cv_type_int64_t="$acx_cv_type_int64_t"
+acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
+ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
+ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
_ACEOF
@@ -18914,20 +18806,263 @@ _LT_EOF
;;
"gstdint.h":C)
-cat >> tmp-stdint.h <<EOF
-#ifndef GCC_GENERATED_STDINT_H
-#define GCC_GENERATED_STDINT_H 1
+if test "$GCC" = yes; then
+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
+else
+ echo "/* generated for $CC */" > tmp-stdint.h
+fi
-#include "config.h"
-#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef GCC_GENERATED_STDINT_H
+ #define GCC_GENERATED_STDINT_H 1
+
+ #include <sys/types.h>
EOF
+if test "$acx_cv_header_stdint" != stdint.h; then
+ echo "#include <stddef.h>" >> tmp-stdint.h
+fi
+if test "$acx_cv_header_stdint" != stddef.h; then
+ echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+ /* glibc uses these symbols as guards to prevent redefinitions. */
+ #ifdef __int8_t_defined
+ #define _INT8_T
+ #define _INT16_T
+ #define _INT32_T
+ #endif
+ #ifdef __uint32_t_defined
+ #define _UINT32_T
+ #endif
+
+EOF
+
+# ----------------- done header, emit basic int types -------------
+if test "$acx_cv_header_stdint" = stddef.h; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef unsigned $acx_cv_type_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef unsigned $acx_cv_type_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef unsigned $acx_cv_type_int32_t uint32_t;
+ #endif
+ #endif
+
+ #ifndef _INT8_T
+ #define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
+ typedef $acx_cv_type_int8_t int8_t;
+ #endif
+ #endif
+
+ #ifndef _INT16_T
+ #define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
+ typedef $acx_cv_type_int16_t int16_t;
+ #endif
+ #endif
+
+ #ifndef _INT32_T
+ #define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
+ typedef $acx_cv_type_int32_t int32_t;
+ #endif
+ #endif
+EOF
+elif test "$ac_cv_type_u_int32_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef u_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef u_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef u_int32_t uint32_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Some systems have guard macros to prevent redefinitions, define them. */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #endif
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #endif
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #endif
+EOF
+fi
+
+# ------------- done basic int types, emit int64_t types ------------
+if test "$ac_cv_type_uint64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have good uint64_t and int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #endif
+EOF
+elif test "$ac_cv_type_u_int64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have an u_int64_t (and int64_t) */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef u_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+elif test -n "$acx_cv_type_int64_t"; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* architecture has a 64-bit type, $acx_cv_type_int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ typedef $acx_cv_type_int64_t int64_t;
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef unsigned $acx_cv_type_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* some common heuristics for int64_t, using compiler-specific tests */
+ #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
+ #ifndef _INT64_T
+ #define _INT64_T
+ #ifndef __int64_t_defined
+ typedef long long int64_t;
+ #endif
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ typedef unsigned long long uint64_t;
+ #endif
+
+ #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+ # define __extension__
+ # endif
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ __extension__ typedef long long int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ __extension__ typedef unsigned long long uint64_t;
+ # endif
+
+ #elif !defined __STRICT_ANSI__
+ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ typedef __int64 int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ typedef unsigned __int64 uint64_t;
+ # endif
+ # endif /* compiler */
+
+ #endif /* ANSI version */
+EOF
+fi
+
+# ------------- done int64_t types, emit intptr types ------------
+if test "$ac_cv_type_uintptr_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
+ typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
+ typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
+EOF
+fi
+
+# ------------- done intptr types, emit int_least types ------------
if test "$ac_cv_type_int_least32_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -18935,15 +19070,20 @@ if test "$ac_cv_type_int_least32_t" != yes; then
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
+ #ifdef _INT64_T
typedef int64_t int_least64_t;
+ #endif
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_least64_t;
+ #endif
EOF
fi
+# ------------- done intptr types, emit int_fast types ------------
if test "$ac_cv_type_int_fast32_t" != yes; then
sed 's/^ *//' >> tmp-stdint.h <<EOF
@@ -18951,16 +19091,40 @@ if test "$ac_cv_type_int_fast32_t" != yes; then
typedef int8_t int_fast8_t;
typedef int int_fast16_t;
typedef int32_t int_fast32_t;
+ #ifdef _INT64_T
typedef int64_t int_fast64_t;
+ #endif
typedef uint8_t uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef uint32_t uint_fast32_t;
+ #ifdef _UINT64_T
typedef uint64_t uint_fast64_t;
+ #endif
+EOF
+fi
+
+if test "$ac_cv_type_uintmax_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intmax based on what we found */
+ #ifdef _INT64_T
+ typedef int64_t intmax_t;
+ #else
+ typedef long intmax_t;
+ #endif
+ #ifdef _UINT64_T
+ typedef uint64_t uintmax_t;
+ #else
+ typedef unsigned long uintmax_t;
+ #endif
EOF
fi
-echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #endif /* GCC_GENERATED_STDINT_H */
+EOF
if test -r gstdint.h && cmp -s tmp-stdint.h gstdint.h; then
rm -f tmp-stdint.h
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5e03fe922d2..7f646a97526 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-09 Loren J. Rittle <ljrittle@acm.org>
+
+ * testsuite/30_threads/thread/native_handle/typesizes.cc: Remove
+ *-*-freebsd* from both dg-do and dg-options.
+
2009-09-08 Alexandre Oliva <aoliva@redhat.com>
* configure: Rebuilt with modified libtool.m4.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
index 8f9b1933bfc..ffc0e40f630 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
@@ -1,5 +1,5 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-do run { target *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
// { dg-require-cstdint "" }