diff options
100 files changed, 2668 insertions, 2215 deletions
diff --git a/ChangeLog b/ChangeLog index 57c1c7eec46..b4a5819771f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * configure.ac: Do not use $extrasub for replacing @if/@endif + parts in Makefile; instead, use additional arguments to + AC_CONFIG_COMMANDS to do the replacement manually, with several + sed invocations, to avoid HP-UX sed command limits. + * configure: Regenerate. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * libtool.m4 (output_verbose_link_cmd): Require leading blank, and + blank before -L. + 2009-09-04 Alexandre Oliva <aoliva@redhat.com> * configure.ac (with-build-config): Document. Handle without. diff --git a/ChangeLog.MELT b/ChangeLog.MELT index a714631c3bb..a2512b10ca2 100644 --- a/ChangeLog.MELT +++ b/ChangeLog.MELT @@ -1,4 +1,7 @@ +2009-09-09 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk rev 151544 + 2009-09-08 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk rev 151500 diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 8bd2012ba34..f5d7e2e5fc1 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,7 @@ +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * configure: Rebuilt with modified libtool.m4. + 2009-09-03 Loren J. Rittle <ljrittle@acm.org> * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use. diff --git a/boehm-gc/configure b/boehm-gc/configure index 1c615a6a732..101f2b468ab 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -12407,7 +12407,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else GXX=no @@ -12744,7 +12744,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -12809,7 +12809,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -13153,7 +13153,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # FIXME: insert proper C++ library support @@ -13237,7 +13237,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -13248,7 +13248,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' diff --git a/config/ChangeLog b/config/ChangeLog index ba8fd0011e6..d23df4cfeb9 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2009-09-08 Paolo Bonzini <bonzini@gnu.org> + + * stdint.m4: Rewrite by using autoconf 2.64 features. + 2009-09-03 Alexandre Oliva <aoliva@redhat.com> * bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle. diff --git a/config/stdint.m4 b/config/stdint.m4 index 025ffad9ea2..ffb759d06b6 100644 --- a/config/stdint.m4 +++ b/config/stdint.m4 @@ -1,440 +1,51 @@ -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_STDINT_TYPES], +[AC_REQUIRE([AC_TYPE_INT8_T]) +AC_REQUIRE([AC_TYPE_INT16_T]) +AC_REQUIRE([AC_TYPE_INT32_T]) +AC_REQUIRE([AC_TYPE_INT64_T]) +AC_REQUIRE([AC_TYPE_INTMAX_T]) +AC_REQUIRE([AC_TYPE_INTPTR_T]) +AC_REQUIRE([AC_TYPE_UINT8_T]) +AC_REQUIRE([AC_TYPE_UINT16_T]) +AC_REQUIRE([AC_TYPE_UINT32_T]) +AC_REQUIRE([AC_TYPE_UINT64_T]) +AC_REQUIRE([AC_TYPE_UINTMAX_T]) +AC_REQUIRE([AC_TYPE_UINTPTR_T])]) AC_DEFUN([GCC_HEADER_STDINT], -[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 +[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]) # ----------------- Summarize what we found so far -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 +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))]) # ----------------- done all checks, emit header ------------- AC_CONFIG_COMMANDS(_GCC_STDINT_H, [ -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 - +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 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 @@ -442,20 +53,15 @@ 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. @@ -465,40 +71,16 @@ 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 -sed 's/^ *//' >> tmp-stdint.h <<EOF - - #endif /* GCC_GENERATED_STDINT_H */ -EOF +echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h if test -r ]_GCC_STDINT_H[ && cmp -s tmp-stdint.h ]_GCC_STDINT_H[; then rm -f tmp-stdint.h @@ -507,22 +89,8 @@ 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/configure b/configure index 5564eac274a..080c5fedfe6 100755 --- a/configure +++ b/configure @@ -6579,12 +6579,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` # configuration, so that the top-level Makefile reconfigures them, # like we used to do when configure itself was recursive. -# Loop over modules. $extrasub must be used with care, limiting as -# much as possible the usage of range addresses. That's because autoconf -# splits the sed script to overcome limits in the number of commands, -# and relying on carefully-timed sed passes may turn out to be very hard -# to maintain later. In this particular case, you just have to be careful -# not to nest @if/@endif pairs, because configure will not warn you at all. +# Loop over modules. We used to use the "$extrasub" feature from Autoconf +# but now we're fixing up the Makefile ourselves with the additional +# commands passed to AC_CONFIG_FILES. Use separate variables +# extrasub-{build,host,target} not because there is any reason to split +# the substitutions up that way, but only to remain below the limit of +# 99 commands in a script, for HP-UX sed. +# Do not nest @if/@endif pairs, because configure will not warn you at all. # Check whether --enable-bootstrap was given. if test "${enable_bootstrap+set}" = set; then : @@ -6680,18 +6681,20 @@ fi $as_echo "$BUILD_CONFIG" >&6; } +extrasub_build= for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${build_subdir}/${module}/Makefile; then echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" rm -f ${build_subdir}/${module}/Makefile fi - extrasub="$extrasub + extrasub_build="$extrasub_build /^@if build-$module\$/d /^@endif build-$module\$/d /^@if build-$module-$bootstrap_suffix\$/d /^@endif build-$module-$bootstrap_suffix\$/d" done +extrasub_host= for module in ${configdirs} ; do if test -z "${no_recursion}"; then for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do @@ -6701,12 +6704,13 @@ for module in ${configdirs} ; do fi done fi - extrasub="$extrasub + extrasub_host="$extrasub_host /^@if $module\$/d /^@endif $module\$/d /^@if $module-$bootstrap_suffix\$/d /^@endif $module-$bootstrap_suffix\$/d" done +extrasub_target= for module in ${target_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${target_subdir}/${module}/Makefile; then @@ -6720,14 +6724,15 @@ for module in ${target_configdirs} ; do *) target_bootstrap_suffix=no-bootstrap ;; esac - extrasub="$extrasub + extrasub_target="$extrasub_target /^@if target-$module\$/d /^@endif target-$module\$/d /^@if target-$module-$target_bootstrap_suffix\$/d /^@endif target-$module-$target_bootstrap_suffix\$/d" done -extrasub="$extrasub +# Do the final fixup along with target modules. +extrasub_target="$extrasub_target /^@if /,/^@endif /d" # Create the serialization dependencies. This uses a temporary file. @@ -14096,6 +14101,13 @@ _ASBOX _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +extrasub_build="$extrasub_build" + extrasub_host="$extrasub_host" + extrasub_target="$extrasub_target" + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -14551,6 +14563,14 @@ which seems to be undefined. Please make sure it is defined." >&2;} esac + + case $ac_file$ac_mode in + "Makefile":F) sed "$extrasub_build" Makefile | + sed "$extrasub_host" | + sed "$extrasub_target" > mf$$ + mv -f mf$$ Makefile ;; + + esac done # for ac_tag diff --git a/configure.ac b/configure.ac index ef966ce3674..f271b9579b6 100644 --- a/configure.ac +++ b/configure.ac @@ -2436,12 +2436,13 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` # configuration, so that the top-level Makefile reconfigures them, # like we used to do when configure itself was recursive. -# Loop over modules. $extrasub must be used with care, limiting as -# much as possible the usage of range addresses. That's because autoconf -# splits the sed script to overcome limits in the number of commands, -# and relying on carefully-timed sed passes may turn out to be very hard -# to maintain later. In this particular case, you just have to be careful -# not to nest @if/@endif pairs, because configure will not warn you at all. +# Loop over modules. We used to use the "$extrasub" feature from Autoconf +# but now we're fixing up the Makefile ourselves with the additional +# commands passed to AC_CONFIG_FILES. Use separate variables +# extrasub-{build,host,target} not because there is any reason to split +# the substitutions up that way, but only to remain below the limit of +# 99 commands in a script, for HP-UX sed. +# Do not nest @if/@endif pairs, because configure will not warn you at all. AC_ARG_ENABLE([bootstrap], [ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],, @@ -2528,18 +2529,20 @@ fi AC_MSG_RESULT($BUILD_CONFIG) AC_SUBST(BUILD_CONFIG) +extrasub_build= for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${build_subdir}/${module}/Makefile; then echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" rm -f ${build_subdir}/${module}/Makefile fi - extrasub="$extrasub + extrasub_build="$extrasub_build /^@if build-$module\$/d /^@endif build-$module\$/d /^@if build-$module-$bootstrap_suffix\$/d /^@endif build-$module-$bootstrap_suffix\$/d" done +extrasub_host= for module in ${configdirs} ; do if test -z "${no_recursion}"; then for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do @@ -2549,12 +2552,13 @@ for module in ${configdirs} ; do fi done fi - extrasub="$extrasub + extrasub_host="$extrasub_host /^@if $module\$/d /^@endif $module\$/d /^@if $module-$bootstrap_suffix\$/d /^@endif $module-$bootstrap_suffix\$/d" done +extrasub_target= for module in ${target_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${target_subdir}/${module}/Makefile; then @@ -2568,14 +2572,15 @@ for module in ${target_configdirs} ; do *) target_bootstrap_suffix=no-bootstrap ;; esac - extrasub="$extrasub + extrasub_target="$extrasub_target /^@if target-$module\$/d /^@endif target-$module\$/d /^@if target-$module-$target_bootstrap_suffix\$/d /^@endif target-$module-$target_bootstrap_suffix\$/d" done -extrasub="$extrasub +# Do the final fixup along with target modules. +extrasub_target="$extrasub_target /^@if /,/^@endif /d" # Create the serialization dependencies. This uses a temporary file. @@ -3193,4 +3198,12 @@ case "$target" in esac AC_SUBST(compare_exclusions) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile], + [sed "$extrasub_build" Makefile | + sed "$extrasub_host" | + sed "$extrasub_target" > mf$$ + mv -f mf$$ Makefile], + [extrasub_build="$extrasub_build" + extrasub_host="$extrasub_host" + extrasub_target="$extrasub_target"]) +AC_OUTPUT diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 2bf7bf90555..43c1e7cacb3 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,29 @@ +2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR testsuite/29737 + PR bootstrap/35938 + PR testsuite/39655 + * check.tpl: Fix typos. + * README: Likewise. Also, document that 'select' uses ERE. + * mkheaders.in: Update copyright years in --version output. + * inclhack.def (sco_math): Add missing final newline in sed + script 'a', 'c', or 'i' commands, for BSD sed. + (sco_math): In the text of 'a', 'c', or 'i' sed + commands, prepend leading white space with a backslash to avoid + the whitespace to be removed by BSD sed. + (sco_math): Match plain 'C++' instead of 'C\+\+' in sed regex. + (x11_new): Fix sed expression, for BSD sed. + (glibc_mutex_init): Fix newlines in sed 's' command replacement + part, for GNU sed 3.02 and Solaris sed. + (glibc_mutex_init): Replace unportable \+ sed regex operator + with \{1,\}. + (glibc_c99_inline_2, glibc_mutex_init): Avoid unportable sed + alternation \| regex operator. + (solaris_complex): Remove superfluous backslashes from + replacement string. Replace \+ operator with \{1,\}. + * tests/base/Xm/Traversal.h: This is fixed for BSD sed now. + * fixincl.x: Regenerate. + 2009-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR libfortran/41169 diff --git a/fixincludes/README b/fixincludes/README index e9e46546636..5536a34ec98 100644 --- a/fixincludes/README +++ b/fixincludes/README @@ -51,7 +51,7 @@ To make your fix, you will need to do several things: the proper functioning of a different fix. Make sure your fix is properly tested and it does what it is supposed to do. -6. Now that you have the right things happening, syncronize the +6. Now that you have the right things happening, synchronize the $(srcdir)/tests/base directory with the $(builddir)/tests/res directory. The output of "make check" will be some diffs that should give you some hints about what to do. @@ -82,22 +82,23 @@ MAKING CHANGES TO INCLHACK.DEF and "c-test" because they are performed internally: * select - Run a regex on the contents of the file being considered. - All such regex-es must match. + All such regex-es must match. Matching is done with + extended regular expressions. * bypass - Run a regex on the contents of the file being considered. No such regex may match. - * c-test - call a function in fixtests.c. See that file. + * c_test - call a function in fixtests.c. See that file. * files - the "fnmatch" pattern of the file(s) to examine for the issue. There may be several copies of this attribute. If the header lives in a /usr/include subdirectory, be sure to include that subdirectory in the name. e.g. net/if.h - * mach - Match the output of config.conf against a series of fnmatch + * mach - Match the output of config.guess against a series of fnmatch patterns. It must match at least one of the patterns, unless "not-machine" has also been specified. In that case, the - config.conf output must not match any of the patterns. + config.guess output must not match any of the patterns. The next test is relatively slow because it must be handled in a separate shell process. Some platforms do not support server shells, @@ -113,7 +114,7 @@ MAKING CHANGES TO INCLHACK.DEF 1. Be positive for all header files that require the fix. - It is desireable to: + It is desirable to: 2. Be negative as often as possible whenever the fix is not required, avoiding the process overhead. diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl index bb93bcc3eee..b239d8b5598 100644 --- a/fixincludes/check.tpl +++ b/fixincludes/check.tpl @@ -1,7 +1,7 @@ [= autogen5 template sh=check.sh =] [= # -# This file contanes the shell template to run tests on the fixes +# This file contains the shell template to run tests on the fixes # =]#!/bin/sh diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 6a059aba8cf..3ef8907e9bc 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed September 3, 2009 at 09:03:23 AM by AutoGen 5.9.9 + * It has been AutoGen-ed September 9, 2009 at 07:50:53 AM by AutoGen 5.9.9 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Sep 3 09:03:23 MEST 2009 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Sep 9 07:50:53 MEST 2009 * * You must regenerate it. Use the ./genfixes script. * @@ -2644,11 +2644,23 @@ static tTestDesc aGlibc_C99_Inline_2Tests[] = { * Fix Command Arguments for Glibc_C99_Inline_2 */ static const char* apzGlibc_C99_Inline_2Patch[] = { sed_cmd_z, - "-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ + "-e", "s/extern int \\(stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ extern\\\n\ #endif\\\n\ __inline__ int \\1/", - "-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ + "-e", "s/extern int \\([lf]stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ +extern\\\n\ +#endif\\\n\ +__inline__ int \\1/", + "-e", "s/extern int \\(mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ +extern\\\n\ +#endif\\\n\ +__inline__ int \\1/", + "-e", "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ +extern\\\n\ +#endif\\\n\ +__inline__ int __REDIRECT\\1 (\\2/", + "-e", "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\ extern\\\n\ #endif\\\n\ __inline__ int __REDIRECT\\1 (\\2/", @@ -2774,15 +2786,25 @@ static tTestDesc aGlibc_Mutex_InitTests[] = { * Fix Command Arguments for Glibc_Mutex_Init */ static const char* apzGlibc_Mutex_InitPatch[] = { sed_cmd_z, - "-e", "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n\ + "-e", "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n\ N\n\ s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n\ }", - "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/", - "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/", - "-e", "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/N;s/^[ \t]*#[ \t]*\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# else\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# endif/", + "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/", + "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/", + "-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/", + "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/", + "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/", + "-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/", + "-e", "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/N;s/^[ \t]*#[ \t]*\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n\ +# \\1\\\n\ + { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n\ +# else\\\n\ +# \\1\\\n\ + { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n\ +# endif/", "-e", "s/{ \\(0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/", - "-e", "/define[ \t]\\+PTHREAD_COND_INITIALIZER/s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/", + "-e", "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -6165,15 +6187,15 @@ static const char* apzSco_MathPatch[] = { sed_cmd_z, "-e", "/.*__builtin_generic/a\\\n\ #else\\\n\ #define __fp_class(a) \\\\\\\n\ - __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\ - __fpclassifyl(a), \\\\\\\n\ - __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\ - __fpclassifyf(a),__fpclassify(a)))\\\n\ -#endif", - "-e", "/extern \"C\\+\\+\"/N;/inline double abs/i\\\n\ +\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\ +\\ __fpclassifyl(a), \\\\\\\n\ +\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\ +\\ __fpclassifyf(a),__fpclassify(a)))\\\n\ +#endif\n", + "-e", "/extern \"C++\"/N;/inline double abs/i\\\n\ #ifndef __GNUC__\n", - "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n\ -#endif /* ! __GNUC__ */", + "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C++\"/a\\\n\ +#endif /* ! __GNUC__ */\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -6209,10 +6231,10 @@ static tTestDesc aSolaris_ComplexTests[] = { * Fix Command Arguments for Solaris_Complex */ static const char* apzSolaris_ComplexPatch[] = { sed_cmd_z, - "-e", "s/#define[ \t]_Complex_I[ \t]_Complex_I/#define\t_Complex_I\t\\(__extension__ 1.0iF\\)/", + "-e", "s/#define[ \t]_Complex_I[ \t]_Complex_I/#define\t_Complex_I\t(__extension__ 1.0iF)/", "-e", "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d", "-e", "/#define[ \t]imaginary[ \t]_Imaginary/d", - "-e", "s/#define[ \t]I[ \t]\\+_Imaginary_I/#define\tI\t\t_Complex_I/", + "-e", "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -8331,7 +8353,7 @@ static tTestDesc aX11_NewTests[] = { static const char* apzX11_NewPatch[] = { sed_cmd_z, "-e", "/Widget\told, new;/i\\\n\ #ifdef __cplusplus\\\n\ -\tWidget\told, c_new;\\\n\ +\\\tWidget\told, c_new;\\\n\ #else\n", "-e", "/Widget\told, new;/a\\\n\ #endif\n", diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index f7ad8773e2a..0d2602df6f9 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1451,10 +1451,19 @@ fix = { hackname = glibc_c99_inline_2; files = sys/stat.h, '*/sys/stat.h'; select = "extern __inline__ int"; - sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/" + sed = "s/extern int \\(stat\\)/" "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n" "__inline__ int \\1/"; - sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/" + sed = "s/extern int \\([lf]stat\\)/" + "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n" + "__inline__ int \\1/"; + sed = "s/extern int \\(mknod\\)/" + "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n" + "__inline__ int \\1/"; + sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/" + "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n" + "__inline__ int __REDIRECT\\1 (\\2/"; + sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/" "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n" "__inline__ int __REDIRECT\\1 (\\2/"; sed = "s/^extern __inline__ int/" @@ -1509,25 +1518,33 @@ fix = { hackname = glibc_mutex_init; files = pthread.h; select = '\{ *\{ *0, *\} *\}'; - sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n" + sed = "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n" "N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}"; sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_" - "\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/"; + "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/"; + sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_" + "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/"; + sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_" + "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/"; + sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_" + "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/"; + sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_" + "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/"; sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_" - "\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/"; - sed = "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/" + "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/"; + sed = "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/" "N;s/^[ \t]*#[ \t]*" - "\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n" - "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\n" - "# \\1\\n" - " { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\n" - "# else\\n" - "# \\1\\n" - " { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n" + "\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n" + "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n" + "# \\1\\\n" + " { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n" + "# else\\\n" + "# \\1\\\n" + " { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n" "# endif/"; sed = "s/{ \\(0, 0, 0, 0, 0, 0, " "PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/"; - sed = "/define[ \t]\\+PTHREAD_COND_INITIALIZER/" + sed = "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/" "s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/"; test_text = <<- _EOText_ @@ -3222,18 +3239,18 @@ fix = { "/.*__builtin_generic/a\\\n" "#else\\\n" "#define __fp_class(a) \\\\\\\n" -" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n" -" __fpclassifyl(a), \\\\\\\n" -" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n" -" __fpclassifyf(a),__fpclassify(a)))\\\n" -"#endif"; +"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n" +"\\ __fpclassifyl(a), \\\\\\\n" +"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n" +"\\ __fpclassifyf(a),__fpclassify(a)))\\\n" +"#endif\n"; - sed = "/extern \"C\\+\\+\"/N;" + sed = "/extern \"C++\"/N;" "/inline double abs/i\\\n" "#ifndef __GNUC__\n"; sed = "/inline long double trunc/N;" - "/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n" - "#endif /* ! __GNUC__ */"; + "/inline long double trunc.*}.*extern \"C++\"/a\\\n" + "#endif /* ! __GNUC__ */\n"; test_text = "#define __fp_class(a) \\\\\n" @@ -3253,10 +3270,10 @@ fix = { files = complex.h; select = "#define[ \t]_Complex_I[ \t]_Complex_I"; sed = "s/#define[ \t]_Complex_I[ \t]_Complex_I/" - "#define\t_Complex_I\t\\(__extension__ 1.0iF\\)/"; + "#define\t_Complex_I\t(__extension__ 1.0iF)/"; sed = "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d"; sed = "/#define[ \t]imaginary[ \t]_Imaginary/d"; - sed = "s/#define[ \t]I[ \t]\\+_Imaginary_I/#define\tI\t\t_Complex_I/"; + sed = "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/"; test_text = "#define _Complex_I _Complex_I\n" "#define complex _Complex\n" "#define _Imaginary_I _Imaginary_I\n" @@ -4438,7 +4455,7 @@ fix = { sed = "/Widget\told, new;/i\\\n" "#ifdef __cplusplus\\\n" - "\tWidget\told, c_new;\\\n" + "\\\tWidget\told, c_new;\\\n" "#else\n"; sed = "/Widget\told, new;/a\\\n" @@ -4447,7 +4464,7 @@ fix = { sed = "s/Widget new,/Widget c_new,/g"; test_text = "struct wedge {\n" - " Widget\told, new; /* fixinc check FAILS ON BSD */\n" + " Widget\told, new;\n" "};\nextern Wedged( Widget new, Widget old );"; }; diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in index 33a7a524835..9109b057c53 100644 --- a/fixincludes/mkheaders.in +++ b/fixincludes/mkheaders.in @@ -41,7 +41,7 @@ fi if [ x$1 = x--version ] ; then echo "mkheaders (GCC) version $version" - echo "Copyright 2002, 2007 Free Software Foundation, Inc." + echo "Copyright 2002, 2007, 2009 Free Software Foundation, Inc." echo "This program is free software; you may redistribute it under the" echo "terms of the GNU General Public License. This program has" echo "absolutely no warranty." diff --git a/fixincludes/tests/base/Xm/Traversal.h b/fixincludes/tests/base/Xm/Traversal.h index 61e6df1164e..2b3cba73fa1 100644 --- a/fixincludes/tests/base/Xm/Traversal.h +++ b/fixincludes/tests/base/Xm/Traversal.h @@ -14,7 +14,7 @@ struct wedge { #ifdef __cplusplus Widget old, c_new; #else - Widget old, new; /* fixinc check FAILS ON BSD */ + Widget old, new; #endif }; extern Wedged( Widget c_new, Widget old ); diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb965df4b39..f0be5934a06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,98 @@ +2009-09-09 Michael Matz <matz@suse.de> + + PR middle-end/41268 + * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing + SUBREG_PROMOTED_UNSIGNED_P, instead of a bool. + * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments + to reflect reality. + +2009-09-08 DJ Delorie <dj@redhat.com> + + * config/mep/mep.c (conversions[]): Add "ml" pattern. + +2009-09-04 Jason Merrill <jason@redhat.com> + + * tree.c (tree_find_value): Remove. + * tree.h: Remove prototype. + * varasm.c (assemble_external): Use value_member instead. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * toplev.c (process_options): Choose default debugging type when + gtoggle enables debug info and type is unset. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + PR debug/41276 + PR debug/41307 + * cselib.c (cselib_expand_value_rtx_1): Don't return copy of + invalid subreg. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * configure: Rebuilt with modified libtool.m4. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + PR debug/41229 + PR debug/41291 + PR debug/41300 + * tree-ssa.c (execute_update_addresses_taken): Update debug insns. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove. + (remove_statement): Likewise. + (rewrite_use_nonlinear_expr): Adjust. + (remove_unused_ivs): Collect SSA NAMEs to remove and call... + * tree-ssa.c (release_defs_bitset): ... this. New. + * tree-flow.h (release_defs_bitset): Declare. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + PR debug/41232 + * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts + in the middle block. + +2009-09-08 Kai Tietz <kai.tietz@onevision.com> + + * tree-ssa-reassoc.c (find_operand_rank): Cast pointer + via intptr_t to long type. + (insert_operand_rank): Cast long type via intptr_t to + pointer type. + * genattrtab.c (RTL_HASH): Use intptr_t to cast from + pointer to scalar. + * c-pretty-print.c (pp_c_tree_decl_identifier): Cast + from pointer to unsigned via uintptr_t. + + * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t, + uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T, + and HAVE_INTPTR_T. + * configure: Regenerated. + * config.in: Regenerated + * system.h (stdint.h): Add include. + (inttypes.h): Likewise. + * Makefile.in (aclocal): Add config/stdint.m4. + * aclocal.m4: Regenerated. + +2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com> + + * config/bfin/bfin.c (np_check_regno, np_after_branch): New static + variables. + (note_np_check_stores): New function. + (harmless_null_pointer_p): New function. + (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH. Callers + changed. Take into account whether we're in the shadow of a condjump + that tested NP_REG for NULL. + Lose all code that tested for SEQUENCEs. + (workaround_speculation): Avoid inserting NOPs for loads that are + either always executed or a NULL pointer. + +2009-09-08 Jan Hubicka <jh@suse.cz> + + * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8. + * params.def (early-inlining-insns): Likewise. + 2009-09-08 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/41239 @@ -12,6 +107,11 @@ (remove_from_deps): Also remove calls from last_function_call_may_noreturn list. +2009-09-07 Richard Henderson <rth@redhat.com> + + * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are + more VR->OPERANDS than LHS operands. Free LHS before returning. + 2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index c9c9779233b..db9e6c2e1e0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20090908 +20090909 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 4890aa5d849..a5b85e339a3 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1644,6 +1644,7 @@ aclocal_deps = \ $(srcdir)/../config/lib-prefix.m4 \ $(srcdir)/../config/override.m4 \ $(srcdir)/../config/progtest.m4 \ + $(srcdir)/../config/stdint.m4 \ $(srcdir)/../config/unwind_ipinfo.m4 \ $(srcdir)/../config/warnings.m4 \ $(srcdir)/acinclude.m4 diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index b351de25465..81108ded7e4 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -114,6 +114,7 @@ m4_include([../config/lib-link.m4]) m4_include([../config/lib-prefix.m4]) m4_include([../config/override.m4]) m4_include([../config/progtest.m4]) +m4_include([../config/stdint.m4]) m4_include([../config/unwind_ipinfo.m4]) m4_include([../config/warnings.m4]) m4_include([acinclude.m4]) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8c1add19249..9ebc3d22edf 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2009-09-08 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Tidy + flow of control. + Avoid useless work when processing the Treat_As_Volatile flag. + +2009-09-08 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/targtyps.c: Reorder include directives. 2009-09-07 Laurent GUERBY <laurent@guerby.net> diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 9d385302c6b..255821e49c8 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2093,7 +2093,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* This is the actual data type for array variables. Multidimensional arrays are implemented as arrays of arrays. Note that arrays which - have sparse enumeration subtypes as index components create sparse + have sparse enumeration subtypes as index components create sparse arrays, which is obviously space inefficient but so much easier to code for now. @@ -2105,7 +2105,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_type = gnat_to_gnu_type (Etype (gnat_entity)); if (!Is_Constrained (gnat_entity)) - break; + ; else { Entity_Id gnat_index, gnat_base_index; @@ -2538,105 +2538,104 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Set our alias set to that of our base type. This gives all array subtypes the same alias set. */ relate_alias_sets (gnu_type, gnu_base_type, ALIAS_SET_COPY); - } - - /* If this is a packed type, make this type the same as the packed - array type, but do some adjusting in the type first. */ - if (Present (Packed_Array_Type (gnat_entity))) - { - Entity_Id gnat_index; - tree gnu_inner_type; - /* First finish the type we had been making so that we output - debugging information for it. */ - gnu_type - = build_qualified_type (gnu_type, - (TYPE_QUALS (gnu_type) - | (TYPE_QUAL_VOLATILE - * Treat_As_Volatile (gnat_entity)))); - - /* Make it artificial only if the base type was artificial as well. - That's sort of "morally" true and will make it possible for the - debugger to look it up by name in DWARF, which is necessary in - order to decode the packed array type. */ - gnu_decl - = create_type_decl (gnu_entity_name, gnu_type, attr_list, - !Comes_From_Source (gnat_entity) - && !Comes_From_Source (Etype (gnat_entity)), - debug_info_p, gnat_entity); - - /* Save it as our equivalent in case the call below elaborates - this type again. */ - save_gnu_tree (gnat_entity, gnu_decl, false); - - gnu_decl = gnat_to_gnu_entity (Packed_Array_Type (gnat_entity), - NULL_TREE, 0); - this_made_decl = true; - gnu_type = TREE_TYPE (gnu_decl); - save_gnu_tree (gnat_entity, NULL_TREE, false); - - gnu_inner_type = gnu_type; - while (TREE_CODE (gnu_inner_type) == RECORD_TYPE - && (TYPE_JUSTIFIED_MODULAR_P (gnu_inner_type) - || TYPE_IS_PADDING_P (gnu_inner_type))) - gnu_inner_type = TREE_TYPE (TYPE_FIELDS (gnu_inner_type)); - - /* We need to attach the index type to the type we just made so - that the actual bounds can later be put into a template. */ - if ((TREE_CODE (gnu_inner_type) == ARRAY_TYPE - && !TYPE_ACTUAL_BOUNDS (gnu_inner_type)) - || (TREE_CODE (gnu_inner_type) == INTEGER_TYPE - && !TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner_type))) + /* If this is a packed type, make this type the same as the packed + array type, but do some adjusting in the type first. */ + if (Present (Packed_Array_Type (gnat_entity))) { - if (TREE_CODE (gnu_inner_type) == INTEGER_TYPE) + Entity_Id gnat_index; + tree gnu_inner; + + /* First finish the type we had been making so that we output + debugging information for it. */ + if (Treat_As_Volatile (gnat_entity)) + gnu_type + = build_qualified_type (gnu_type, + TYPE_QUALS (gnu_type) + | TYPE_QUAL_VOLATILE); + + /* Make it artificial only if the base type was artificial too. + That's sort of "morally" true and will make it possible for + the debugger to look it up by name in DWARF, which is needed + in order to decode the packed array type. */ + gnu_decl + = create_type_decl (gnu_entity_name, gnu_type, attr_list, + !Comes_From_Source (Etype (gnat_entity)) + && !Comes_From_Source (gnat_entity), + debug_info_p, gnat_entity); + + /* Save it as our equivalent in case the call below elaborates + this type again. */ + save_gnu_tree (gnat_entity, gnu_decl, false); + + gnu_decl = gnat_to_gnu_entity (Packed_Array_Type (gnat_entity), + NULL_TREE, 0); + this_made_decl = true; + gnu_type = TREE_TYPE (gnu_decl); + save_gnu_tree (gnat_entity, NULL_TREE, false); + + gnu_inner = gnu_type; + while (TREE_CODE (gnu_inner) == RECORD_TYPE + && (TYPE_JUSTIFIED_MODULAR_P (gnu_inner) + || TYPE_IS_PADDING_P (gnu_inner))) + gnu_inner = TREE_TYPE (TYPE_FIELDS (gnu_inner)); + + /* We need to attach the index type to the type we just made so + that the actual bounds can later be put into a template. */ + if ((TREE_CODE (gnu_inner) == ARRAY_TYPE + && !TYPE_ACTUAL_BOUNDS (gnu_inner)) + || (TREE_CODE (gnu_inner) == INTEGER_TYPE + && !TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner))) { - /* The TYPE_ACTUAL_BOUNDS field is overloaded with the - TYPE_MODULUS for modular types so we make an extra - subtype if necessary. */ - if (TYPE_MODULAR_P (gnu_inner_type)) + if (TREE_CODE (gnu_inner) == INTEGER_TYPE) { - tree gnu_subtype - = make_unsigned_type (TYPE_PRECISION (gnu_inner_type)); - TREE_TYPE (gnu_subtype) = gnu_inner_type; - TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1; - SET_TYPE_RM_MIN_VALUE (gnu_subtype, - TYPE_MIN_VALUE (gnu_inner_type)); - SET_TYPE_RM_MAX_VALUE (gnu_subtype, - TYPE_MAX_VALUE (gnu_inner_type)); - gnu_inner_type = gnu_subtype; - } - - TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner_type) = 1; + /* The TYPE_ACTUAL_BOUNDS field is overloaded with the + TYPE_MODULUS for modular types so we make an extra + subtype if necessary. */ + if (TYPE_MODULAR_P (gnu_inner)) + { + tree gnu_subtype + = make_unsigned_type (TYPE_PRECISION (gnu_inner)); + TREE_TYPE (gnu_subtype) = gnu_inner; + TYPE_EXTRA_SUBTYPE_P (gnu_subtype) = 1; + SET_TYPE_RM_MIN_VALUE (gnu_subtype, + TYPE_MIN_VALUE (gnu_inner)); + SET_TYPE_RM_MAX_VALUE (gnu_subtype, + TYPE_MAX_VALUE (gnu_inner)); + gnu_inner = gnu_subtype; + } + + TYPE_HAS_ACTUAL_BOUNDS_P (gnu_inner) = 1; #ifdef ENABLE_CHECKING - /* Check for other cases of overloading. */ - gcc_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner_type)); + /* Check for other cases of overloading. */ + gcc_assert (!TYPE_ACTUAL_BOUNDS (gnu_inner)); #endif - } + } - for (gnat_index = First_Index (gnat_entity); - Present (gnat_index); gnat_index = Next_Index (gnat_index)) - SET_TYPE_ACTUAL_BOUNDS - (gnu_inner_type, - tree_cons (NULL_TREE, - get_unpadded_type (Etype (gnat_index)), - TYPE_ACTUAL_BOUNDS (gnu_inner_type))); - - if (Convention (gnat_entity) != Convention_Fortran) - SET_TYPE_ACTUAL_BOUNDS - (gnu_inner_type, - nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner_type))); - - if (TREE_CODE (gnu_type) == RECORD_TYPE - && TYPE_JUSTIFIED_MODULAR_P (gnu_type)) - TREE_TYPE (TYPE_FIELDS (gnu_type)) = gnu_inner_type; + for (gnat_index = First_Index (gnat_entity); + Present (gnat_index); + gnat_index = Next_Index (gnat_index)) + SET_TYPE_ACTUAL_BOUNDS + (gnu_inner, + tree_cons (NULL_TREE, + get_unpadded_type (Etype (gnat_index)), + TYPE_ACTUAL_BOUNDS (gnu_inner))); + + if (Convention (gnat_entity) != Convention_Fortran) + SET_TYPE_ACTUAL_BOUNDS + (gnu_inner, nreverse (TYPE_ACTUAL_BOUNDS (gnu_inner))); + + if (TREE_CODE (gnu_type) == RECORD_TYPE + && TYPE_JUSTIFIED_MODULAR_P (gnu_type)) + TREE_TYPE (TYPE_FIELDS (gnu_type)) = gnu_inner; + } } - } - - /* Abort if packed array with no packed array type field set. */ - else - gcc_assert (!Is_Packed (gnat_entity)); + else + /* Abort if packed array with no Packed_Array_Type field set. */ + gcc_assert (!Is_Packed (gnat_entity)); + } break; case E_String_Literal_Subtype: @@ -4634,10 +4633,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) } } - gnu_type = build_qualified_type (gnu_type, - (TYPE_QUALS (gnu_type) - | (TYPE_QUAL_VOLATILE - * Treat_As_Volatile (gnat_entity)))); + if (Treat_As_Volatile (gnat_entity)) + gnu_type + = build_qualified_type (gnu_type, + TYPE_QUALS (gnu_type) | TYPE_QUAL_VOLATILE); if (Is_Atomic (gnat_entity)) check_ok_for_atomic (gnu_type, gnat_entity, false); diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index f9694bfc080..c4e6e96c296 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -2235,7 +2235,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp, tree t) else { static char xname[8]; - sprintf (xname, "<U%4x>", ((unsigned)((unsigned long)(t) & 0xffff))); + sprintf (xname, "<U%4x>", ((unsigned)((uintptr_t)(t) & 0xffff))); name = xname; } diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e840da88bcf..d1c2be29b32 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1920,19 +1920,19 @@ expand_gimple_stmt_1 (gimple stmt) ; else if (promoted) { - bool unsigndp = SUBREG_PROMOTED_UNSIGNED_P (target); + int unsignedp = SUBREG_PROMOTED_UNSIGNED_P (target); /* If TEMP is a VOIDmode constant, use convert_modes to make sure that we properly convert it. */ if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode) { temp = convert_modes (GET_MODE (target), TYPE_MODE (ops.type), - temp, unsigndp); + temp, unsignedp); temp = convert_modes (GET_MODE (SUBREG_REG (target)), - GET_MODE (target), temp, unsigndp); + GET_MODE (target), temp, unsignedp); } - convert_move (SUBREG_REG (target), temp, unsigndp); + convert_move (SUBREG_REG (target), temp, unsignedp); } else if (nontemporal && emit_storent_insn (target, temp)) ; diff --git a/gcc/config.in b/gcc/config.in index 050c0578521..40d7e4d24b6 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1026,6 +1026,18 @@ #endif +/* Define to 1 if the system has the type `intmax_t'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_INTMAX_T +#endif + + +/* Define to 1 if the system has the type `intptr_t'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_INTPTR_T +#endif + + /* Define if you have a working <inttypes.h> header file. */ #ifndef USED_FOR_TARGET #undef HAVE_INTTYPES_H @@ -1139,6 +1151,12 @@ #endif +/* Define to 1 if the system has the type `long long int'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_LONG_LONG_INT +#endif + + /* Define to 1 if you have the <malloc.h> header file. */ #ifndef USED_FOR_TARGET #undef HAVE_MALLOC_H @@ -1337,12 +1355,30 @@ #endif +/* Define to 1 if the system has the type `uintmax_t'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_UINTMAX_T +#endif + + +/* Define to 1 if the system has the type `uintptr_t'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_UINTPTR_T +#endif + + /* Define to 1 if you have the <unistd.h> header file. */ #ifndef USED_FOR_TARGET #undef HAVE_UNISTD_H #endif +/* Define to 1 if the system has the type `unsigned long long int'. */ +#ifndef USED_FOR_TARGET +#undef HAVE_UNSIGNED_LONG_LONG_INT +#endif + + /* Define if valgrind's valgrind/memcheck.h header is installed. */ #ifndef USED_FOR_TARGET #undef HAVE_VALGRIND_MEMCHECK_H @@ -1624,6 +1660,30 @@ #endif +/* 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. */ +#ifndef USED_FOR_TARGET +#undef _UINT32_T +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef _UINT64_T +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef _UINT8_T +#endif + + /* Define to `char *' if <sys/types.h> does not define. */ #ifndef USED_FOR_TARGET #undef caddr_t @@ -1636,6 +1696,48 @@ #undef inline #endif +/* 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. */ +#ifndef USED_FOR_TARGET +#undef int16_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef int32_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef int64_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef int8_t +#endif + + +/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do + not define. */ +#ifndef USED_FOR_TARGET +#undef intmax_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef intptr_t +#endif + + /* Define to `int' if <sys/types.h> does not define. */ #ifndef USED_FOR_TARGET #undef pid_t @@ -1654,6 +1756,48 @@ #endif +/* 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. */ +#ifndef USED_FOR_TARGET +#undef uint16_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef uint32_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef uint64_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef uint8_t +#endif + + +/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h> + do not define. */ +#ifndef USED_FOR_TARGET +#undef uintmax_t +#endif + + +/* 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. */ +#ifndef USED_FOR_TARGET +#undef uintptr_t +#endif + + /* Define as `fork' if `vfork' does not work. */ #ifndef USED_FOR_TARGET #undef vfork diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index e5236801566..28406150eea 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -5039,28 +5039,38 @@ type_for_anomaly (rtx insn) return get_attr_type (insn); } -/* Return nonzero if INSN contains any loads that may trap. It handles - SEQUENCEs correctly. */ - +/* Return true iff the address found in MEM is based on the register + NP_REG and optionally has a positive offset. */ static bool -trapping_loads_p (rtx insn) +harmless_null_pointer_p (rtx mem, int np_reg) { - rtx pat = PATTERN (insn); - if (GET_CODE (pat) == SEQUENCE) + mem = XEXP (mem, 0); + if (GET_CODE (mem) == POST_INC || GET_CODE (mem) == POST_DEC) + mem = XEXP (mem, 0); + if (REG_P (mem) && REGNO (mem) == np_reg) + return true; + if (GET_CODE (mem) == PLUS + && REG_P (XEXP (mem, 0)) && REGNO (XEXP (mem, 0)) == np_reg) { - enum attr_type t; - t = get_attr_type (XVECEXP (pat, 0, 1)); - if (t == TYPE_MCLD - && may_trap_p (SET_SRC (PATTERN (XVECEXP (pat, 0, 1))))) + mem = XEXP (mem, 1); + if (GET_CODE (mem) == CONST_INT && INTVAL (mem) > 0) return true; - t = get_attr_type (XVECEXP (pat, 0, 2)); - if (t == TYPE_MCLD - && may_trap_p (SET_SRC (PATTERN (XVECEXP (pat, 0, 2))))) - return true; - return false; } - else - return may_trap_p (SET_SRC (single_set (insn))); + return false; +} + +/* Return nonzero if INSN contains any loads that may trap. */ + +static bool +trapping_loads_p (rtx insn, int np_reg, bool after_np_branch) +{ + rtx pat = PATTERN (insn); + rtx mem = SET_SRC (single_set (insn)); + + if (!after_np_branch) + np_reg = -1; + return ((np_reg == -1 || !harmless_null_pointer_p (mem, np_reg)) + && may_trap_p (mem)); } /* Return INSN if it is of TYPE_MCLD. Alternatively, if INSN is the start of @@ -5098,6 +5108,24 @@ indirect_call_p (rtx pat) return REG_P (pat); } +/* During workaround_speculation, track whether we're in the shadow of a + conditional branch that tests a P register for NULL. If so, we can omit + emitting NOPs if we see a load from that P register, since a speculative + access at address 0 isn't a problem, and the load is executed in all other + cases anyway. + Global for communication with note_np_check_stores through note_stores. + */ +int np_check_regno = -1; +bool np_after_branch = false; + +/* Subroutine of workaround_speculation, called through note_stores. */ +static void +note_np_check_stores (rtx x, const_rtx pat, void *data ATTRIBUTE_UNUSED) +{ + if (REG_P (x) && (REGNO (x) == REG_CC || REGNO (x) == np_check_regno)) + np_check_regno = -1; +} + static void workaround_speculation (void) { @@ -5119,17 +5147,38 @@ workaround_speculation (void) next = find_next_insn_start (insn); - if (NOTE_P (insn) || BARRIER_P (insn) || LABEL_P (insn)) + if (NOTE_P (insn) || BARRIER_P (insn)) continue; + if (LABEL_P (insn)) + { + np_check_regno = -1; + continue; + } + pat = PATTERN (insn); if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER - || GET_CODE (pat) == ASM_INPUT || GET_CODE (pat) == ADDR_VEC - || GET_CODE (pat) == ADDR_DIFF_VEC || asm_noperands (pat) >= 0) + || GET_CODE (pat) == ADDR_VEC || GET_CODE (pat) == ADDR_DIFF_VEC) continue; + + if (GET_CODE (pat) == ASM_INPUT || asm_noperands (pat) >= 0) + { + np_check_regno = -1; + continue; + } if (JUMP_P (insn)) { + /* Is this a condjump based on a null pointer comparison we saw + earlier? */ + if (np_check_regno != -1 + && recog_memoized (insn) == CODE_FOR_cbranchbi4) + { + rtx op = XEXP (SET_SRC (PATTERN (insn)), 0); + gcc_assert (GET_CODE (op) == EQ || GET_CODE (op) == NE); + if (GET_CODE (op) == NE) + np_after_branch = true; + } if (any_condjump_p (insn) && ! cbranch_predicted_taken_p (insn)) { @@ -5142,6 +5191,7 @@ workaround_speculation (void) } else if (CALL_P (insn)) { + np_check_regno = -1; if (cycles_since_jump < INT_MAX) cycles_since_jump++; if (indirect_call_p (pat) && ENABLE_WA_INDIRECT_CALLS) @@ -5157,13 +5207,44 @@ workaround_speculation (void) if (cycles_since_jump < INT_MAX) cycles_since_jump++; + /* Detect a comparison of a P register with zero. If we later + see a condjump based on it, we have found a null pointer + check. */ + if (recog_memoized (insn) == CODE_FOR_compare_eq) + { + rtx src = SET_SRC (PATTERN (insn)); + if (REG_P (XEXP (src, 0)) + && P_REGNO_P (REGNO (XEXP (src, 0))) + && XEXP (src, 1) == const0_rtx) + { + np_check_regno = REGNO (XEXP (src, 0)); + np_after_branch = false; + } + else + np_check_regno = -1; + } + if (load_insn && ENABLE_WA_SPECULATIVE_LOADS) { - if (trapping_loads_p (load_insn)) + if (trapping_loads_p (load_insn, np_check_regno, + np_after_branch)) delay_needed = 4; } else if (type == TYPE_SYNC && ENABLE_WA_SPECULATIVE_SYNCS) delay_needed = 3; + + /* See if we need to forget about a null pointer comparison + we found earlier. */ + if (recog_memoized (insn) != CODE_FOR_compare_eq) + { + note_stores (PATTERN (insn), note_np_check_stores, NULL); + if (np_check_regno != -1) + { + if (find_regno_note (insn, REG_INC, np_check_regno)) + np_check_regno = -1; + } + } + } if (delay_needed > cycles_since_jump @@ -5241,7 +5322,7 @@ workaround_speculation (void) if (load_insn && ENABLE_WA_SPECULATIVE_LOADS) { - if (trapping_loads_p (load_insn)) + if (trapping_loads_p (load_insn, -1, false)) delay_needed = 2; } else if (type == TYPE_SYNC && ENABLE_WA_SPECULATIVE_SYNCS) diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index a473328254d..efed4b6caf6 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -3297,6 +3297,7 @@ const conversions[] = { 0, "m+ri", "3(2)" }, { 0, "mr", "(1)" }, { 0, "ms", "(1)" }, + { 0, "ml", "(1)" }, { 0, "mLrs", "%lo(3)(2)" }, { 0, "mLr+si", "%lo(4+5)(2)" }, { 0, "m+ru2s", "%tpoff(5)(2)" }, diff --git a/gcc/configure b/gcc/configure index 1c391bf6ddf..cd9bc20ebb3 100755 --- a/gcc/configure +++ b/gcc/configure @@ -2391,34 +2391,76 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_check_header_preproc LINENO HEADER VAR -# ---------------------------------------------- -# Tests whether HEADER is present, setting the cache variable VAR accordingly. -ac_fn_c_check_header_preproc () +# 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 $2" >&5 -$as_echo_n "checking for $2... " >&6; } + { $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. */ -#include <$2> +$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_cpp "$LINENO"; then : - eval "$3=yes" +if ac_fn_c_try_compile "$LINENO"; then : + else - eval "$3=no" + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac fi -rm -f conftest.err conftest.$ac_ext +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_check_header_preproc +} # ac_fn_c_find_intX_t # ac_fn_c_try_link LINENO # ----------------------- @@ -2466,6 +2508,87 @@ fi } # ac_fn_c_try_link +# 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_check_header_preproc LINENO HEADER VAR +# ---------------------------------------------- +# Tests whether HEADER is present, setting the cache variable VAR accordingly. +ac_fn_c_check_header_preproc () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f conftest.err conftest.$ac_ext +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_check_header_preproc + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -5704,6 +5827,370 @@ _ACEOF fi +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 + + + { $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 +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; +} + +_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 +fi + +else + ac_cv_type_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +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" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" +if test "x$ac_cv_type_intmax_t" = x""yes; then : + +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h + +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 + +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 : + +$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h + +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 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define intptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + +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) ;; #( + *) + + +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + 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 "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT64_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + 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 : + $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; +} + +_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 +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 + + + + 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 +_ACEOF + +fi + + + + 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 +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + + + + + + + + + + + + # --------------------- # Warnings and checking @@ -11084,13 +11571,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:11087: $ac_compile\"" >&5) + (eval echo "\"\$as_me:11574: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:11090: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:11577: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:11093: output\"" >&5) + (eval echo "\"\$as_me:11580: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -12295,7 +12782,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 12298 "configure"' > conftest.$ac_ext + echo '#line 12785 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13955,11 +14442,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:13958: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14445: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13962: \$? = $ac_status" >&5 + echo "$as_me:14449: \$? = $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. @@ -14294,11 +14781,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:14297: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14784: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14301: \$? = $ac_status" >&5 + echo "$as_me:14788: \$? = $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. @@ -14399,11 +14886,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:14402: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14889: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14406: \$? = $ac_status" >&5 + echo "$as_me:14893: \$? = $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 @@ -14454,11 +14941,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:14457: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14944: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14461: \$? = $ac_status" >&5 + echo "$as_me:14948: \$? = $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 @@ -16836,7 +17323,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 16839 "configure" +#line 17326 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16932,7 +17419,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 16935 "configure" +#line 17422 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17409,7 +17896,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else GXX=no @@ -17740,7 +18227,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -17805,7 +18292,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -18149,7 +18636,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # FIXME: insert proper C++ library support @@ -18233,7 +18720,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -18244,7 +18731,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' @@ -18888,11 +19375,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:18891: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19378: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18895: \$? = $ac_status" >&5 + echo "$as_me:19382: \$? = $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. @@ -18987,11 +19474,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:18990: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19477: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18994: \$? = $ac_status" >&5 + echo "$as_me:19481: \$? = $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 @@ -19039,11 +19526,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:19042: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19529: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19046: \$? = $ac_status" >&5 + echo "$as_me:19533: \$? = $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 diff --git a/gcc/configure.ac b/gcc/configure.ac index 0621da36a5a..37d2b8af5ca 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -311,6 +311,7 @@ AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)]) AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)]) +GCC_STDINT_TYPES # --------------------- # Warnings and checking diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bac7098db72..3656dbaf48b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,27 @@ +2009-09-08 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/39923 + * decl.c (build_init_list_var_init): Check return value of + perform_implicit_conversion. + +2009-09-03 Jason Merrill <jason@redhat.com> + + * class.c (currently_open_class): Make sure we're dealing with the + main variant. + + * cp-tree.h (enum overload_flags): Remove OP_FLAG. + * method.c (lazily_declare_fn): Check for dtorness in ABI warning. + + * name-lookup.c (is_class_level): Remove. + (push_binding_level, leave_scope, resume_scope): Adjust. + (pushlevel_class): Adjust. + (poplevel_class): Make sure we're on class_binding_level. + + * decl.c (grokmethod): Rename from start_method. + (finish_method): Remove. + * cp-tree.h: Adjust. + * parser.c (cp_parser_save_member_function_body): Adjust. + 2009-09-03 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 2c308cfb5c9..9938a3d84d1 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5846,6 +5846,8 @@ currently_open_class (tree t) if (!CLASS_TYPE_P (t)) return false; + t = TYPE_MAIN_VARIANT (t); + /* We start looking from 1 because entry 0 is from global scope, and has no type. */ for (i = current_class_depth; i > 0; --i) diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 23b41d3b62b..ea3b4bf3d14 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3804,7 +3804,7 @@ extern int at_eof; TREE_PURPOSE slot. */ extern GTY(()) tree static_aggregates; -enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; +enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG }; /* These are uses as bits in flags passed to various functions to control their behavior. Despite the LOOKUP_ prefix, many of these @@ -4418,8 +4418,7 @@ extern tree begin_function_body (void); extern void finish_function_body (tree); extern tree outer_curly_brace_block (tree); extern tree finish_function (int); -extern tree start_method (cp_decl_specifier_seq *, const cp_declarator *, tree); -extern tree finish_method (tree); +extern tree grokmethod (cp_decl_specifier_seq *, const cp_declarator *, tree); extern void maybe_register_incomplete_var (tree); extern void maybe_commonize_var (tree); extern void complete_vars (tree); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index cad0fc5b2e6..0cfcb4f29ec 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4415,6 +4415,9 @@ build_init_list_var_init (tree decl, tree type, tree init, tree *cleanup) { tree aggr_init, array, arrtype; init = perform_implicit_conversion (type, init, tf_warning_or_error); + if (error_operand_p (init)) + return error_mark_node; + aggr_init = TARGET_EXPR_INITIAL (init); init = build2 (INIT_EXPR, type, decl, init); @@ -12444,8 +12447,8 @@ finish_function (int flags) CHANGES TO CODE IN `grokfield'. */ tree -start_method (cp_decl_specifier_seq *declspecs, - const cp_declarator *declarator, tree attrlist) +grokmethod (cp_decl_specifier_seq *declspecs, + const cp_declarator *declarator, tree attrlist) { tree fndecl = grokdeclarator (declarator, declspecs, MEMFUNCDEF, 0, &attrlist); @@ -12499,62 +12502,9 @@ start_method (cp_decl_specifier_seq *declspecs, cp_finish_decl (fndecl, NULL_TREE, false, NULL_TREE, 0); - /* Make a place for the parms. */ - begin_scope (sk_function_parms, fndecl); - DECL_IN_AGGR_P (fndecl) = 1; return fndecl; } - -/* Go through the motions of finishing a function definition. - We don't compile this method until after the whole class has - been processed. - - FINISH_METHOD must return something that looks as though it - came from GROKFIELD (since we are defining a method, after all). - - This is called after parsing the body of the function definition. - STMTS is the chain of statements that makes up the function body. - - DECL is the ..._DECL that `start_method' provided. */ - -tree -finish_method (tree decl) -{ - tree fndecl = decl; - tree old_initial; - - tree link; - - if (decl == void_type_node) - return decl; - - old_initial = DECL_INITIAL (fndecl); - - /* Undo the level for the parms (from start_method). - This is like poplevel, but it causes nothing to be - saved. Saving information here confuses symbol-table - output routines. Besides, this information will - be correctly output when this method is actually - compiled. */ - - /* Clear out the meanings of the local variables of this level; - also record in each decl which block it belongs to. */ - - for (link = current_binding_level->names; link; link = TREE_CHAIN (link)) - { - if (DECL_NAME (link) != NULL_TREE) - pop_binding (DECL_NAME (link), link); - gcc_assert (TREE_CODE (link) != FUNCTION_DECL); - DECL_CONTEXT (link) = NULL_TREE; - } - - poplevel (0, 0, 0); - - DECL_INITIAL (fndecl) = old_initial; - - return decl; -} /* VAR is a VAR_DECL. If its type is incomplete, remember VAR so that diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index cc4317aa7b4..e57c825c94f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -254,7 +254,7 @@ maybe_retrofit_in_chrg (tree fn) FUNCTION is a FUNCTION_DECL. It was created by `grokdeclarator'. FLAGS contains bits saying what's special about today's - arguments. 1 == DESTRUCTOR. 2 == OPERATOR. + arguments. DTOR_FLAG == DESTRUCTOR. If FUNCTION is a destructor, then we must add the `auto-delete' field as a second parameter. There is some hair associated with the fact diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 4563e8f6b5c..6acf1bb4b71 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1161,7 +1161,7 @@ lazily_declare_fn (special_function_kind sfk, tree type) /* G++ 3.2 put the implicit destructor at the *beginning* of the TYPE_METHODS list, which cause the destructor to be emitted in an incorrect location in the vtable. */ - if (warn_abi && DECL_VIRTUAL_P (fn)) + if (warn_abi && sfk == sfk_destructor && DECL_VIRTUAL_P (fn)) warning (OPT_Wabi, "vtable layout for class %qT may not be ABI-compliant" "and may change in a future version of GCC due to " "implicit virtual destructor", diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index feb2cf280d1..492850648b0 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -1257,7 +1257,6 @@ check_for_out_of_scope_variable (tree decl) static bool keep_next_level_flag; static int binding_depth = 0; -static int is_class_level = 0; static void indent (int depth) @@ -1339,7 +1338,6 @@ push_binding_level (struct cp_binding_level *scope) scope->binding_depth = binding_depth; indent (binding_depth); cxx_scope_debug (scope, input_line, "push"); - is_class_level = 0; binding_depth++; } } @@ -1427,12 +1425,6 @@ leave_scope (void) { indent (--binding_depth); cxx_scope_debug (scope, input_line, "leave"); - if (is_class_level != (scope == class_binding_level)) - { - indent (binding_depth); - verbatim ("XXX is_class_level != (current_scope == class_scope)\n"); - } - is_class_level = 0; } /* Move one nesting level up. */ @@ -1482,7 +1474,6 @@ resume_scope (struct cp_binding_level* b) b->binding_depth = binding_depth; indent (binding_depth); cxx_scope_debug (b, input_line, "resume"); - is_class_level = 0; binding_depth++; } } @@ -2562,9 +2553,6 @@ pop_inner_scope (tree outer, tree inner) void pushlevel_class (void) { - if (ENABLE_SCOPE_CHECKING) - is_class_level = 1; - class_binding_level = begin_scope (sk_class, current_class_type); } @@ -2602,9 +2590,7 @@ poplevel_class (void) /* Now, pop out of the binding level which we created up in the `pushlevel_class' routine. */ - if (ENABLE_SCOPE_CHECKING) - is_class_level = 1; - + gcc_assert (current_binding_level == level); leave_scope (); timevar_pop (TV_NAME_LOOKUP); } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 64869cd8476..14733b835bd 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -18172,8 +18172,8 @@ cp_parser_save_member_function_body (cp_parser* parser, cp_token *last; tree fn; - /* Create the function-declaration. */ - fn = start_method (decl_specifiers, declarator, attributes); + /* Create the FUNCTION_DECL. */ + fn = grokmethod (decl_specifiers, declarator, attributes); /* If something went badly wrong, bail out now. */ if (fn == error_mark_node) { @@ -18221,9 +18221,6 @@ cp_parser_save_member_function_body (cp_parser* parser, friend templates are handled correctly. */ DECL_INITIALIZED_IN_CLASS_P (fn) = 1; - /* We're done with the inline definition. */ - finish_method (fn); - /* Add FN to the queue of functions to be parsed later. */ TREE_VALUE (parser->unparsed_functions_queues) = tree_cons (NULL_TREE, fn, diff --git a/gcc/cselib.c b/gcc/cselib.c index 8d52c519ff3..927f93cbb79 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1165,12 +1165,12 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd, scopy = simplify_gen_subreg (GET_MODE (orig), subreg, GET_MODE (SUBREG_REG (orig)), SUBREG_BYTE (orig)); - if (scopy == NULL - || (GET_CODE (scopy) == SUBREG - && !REG_P (SUBREG_REG (scopy)) - && !MEM_P (SUBREG_REG (scopy)) - && (REG_P (SUBREG_REG (orig)) - || MEM_P (SUBREG_REG (orig))))) + if ((scopy == NULL + || (GET_CODE (scopy) == SUBREG + && !REG_P (SUBREG_REG (scopy)) + && !MEM_P (SUBREG_REG (scopy)))) + && (REG_P (SUBREG_REG (orig)) + || MEM_P (SUBREG_REG (orig)))) return shallow_copy_rtx (orig); return scopy; } diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7bf81679305..1f9244abf01 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7719,7 +7719,7 @@ whose probability exceeds given threshold (in percents). The default value is @item early-inlining-insns Specify growth that early inliner can make. In effect it increases amount of -inlining for code having large abstraction penalty. The default value is 12. +inlining for code having large abstraction penalty. The default value is 8. @item max-early-inliner-iterations @itemx max-early-inliner-iterations diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index def9a694a0e..4d6295af604 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -319,7 +319,7 @@ static struct attr_hash *attr_hash_table[RTL_HASH_SIZE]; /* Here is how primitive or already-shared RTL's hash codes are made. */ -#define RTL_HASH(RTL) ((long) (RTL) & 0777777) +#define RTL_HASH(RTL) ((intptr_t) (RTL) & 0777777) /* Add an entry to the hash table for RTL with hash code HASHCODE. */ diff --git a/gcc/params.def b/gcc/params.def index e451b60a963..f8b87db00f6 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -185,7 +185,7 @@ DEFPARAM(PARAM_IPCP_UNIT_GROWTH, DEFPARAM(PARAM_EARLY_INLINING_INSNS, "early-inlining-insns", "maximal estimated growth of function body caused by early inlining of single call", - 12, 0, 0) + 8, 0, 0) DEFPARAM(PARAM_LARGE_STACK_FRAME, "large-stack-frame", "The size of stack frame to be considered large", diff --git a/gcc/rtl.h b/gcc/rtl.h index 88b93f19fb0..3427347225d 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -255,8 +255,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"), ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */ unsigned int call : 1; /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere. - 1 in a SUBREG if it references an unsigned object whose mode has been - from a promoted to a wider mode. + 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P. 1 in a SYMBOL_REF if it addresses something in the per-function constants pool. 1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY. @@ -268,7 +267,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"), if it has been deleted. 1 in a REG expression if corresponds to a variable declared by the user, 0 for an internally generated temporary. - 1 in a SUBREG with a negative value. + 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P. 1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a non-local label. In a SYMBOL_REF, this flag is used for machine-specific purposes. @@ -1161,6 +1160,15 @@ do { \ _rtx->unchanging = (VAL); \ } \ } while (0) + +/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case + this gives the necessary extensions: + 0 - signed + 1 - normal unsigned + -1 - pointer unsigned, which most often can be handled like unsigned + extension, except for generating instructions where we need to + emit special code (ptr_extend insns) on some architectures. */ + #define SUBREG_PROMOTED_UNSIGNED_P(RTX) \ ((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \ ? -1 : (int) (RTX)->unchanging) diff --git a/gcc/system.h b/gcc/system.h index b74e0e5df2f..1b36ddf389a 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -414,6 +414,14 @@ extern void *calloc (size_t, size_t); extern void *realloc (void *, size_t); #endif +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#endif + /* If the system doesn't provide strsignal, we get it defined in libiberty but no declaration is supplied. */ #if !defined (HAVE_STRSIGNAL) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 026f8a95d58..229c800ea74 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,67 @@ +2009-09-08 Dodji Seketeli <dodji@redhat.com> + + Fix some test breakages on Darwin + * g++.dg/debug/dwarf2/namespace-1.C: Use -fno-merge-debug-string + and adjust. + * g++.dg/debug/dwarf2/template-func-params-6.C: Likewise. + * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise. + * g++.dg/debug/dwarf2/template-params-6.C: Likewise. + * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. Also, adjust to + take darwin specifics in account. + +2009-09-08 Joseph Myers <joseph@codesourcery.com> + + * gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c, + gcc.dg/profile-dir-3.c: Disable for remote-host testing. + +2009-09-08 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/39923 + * g++.dg/cpp0x/initlist24.C: New. + +2009-09-08 Ozkan Sezer <sezeroz@gmail.com> + + * gcc.dg/large-size-array-2.c: Fix target requirement. + * gcc.dg/large-size-array-4.c: Likewise. + * gcc.dg/c90-const-expr-2.c: Define ZERO as 0LL for _WIN64. + * gcc.dg/c99-const-expr-2.c: Likewise. + * gcc.dg/c90-const-expr-6.c: Typedef ptrdiff_t with __extension__. + * gcc.dg/c90-const-expr-9.c: Typedef size_t with __extension__. + * gcc.dg/c90-const-expr-10.c: Likewise. + * gcc.dg/torture/pr39074.c: Use intptr_t typedef'ed as __PTRDIFF_TYPE__ + instead of long. + * gcc.dg/tree-ssa/pr33920.c: Likewise. + * gcc.dg/vect/pr33846.c: Likewise. + * gcc.dg/vect/pr33833.c: Use uintptr_t, typedef'ed as unsigned + __PTRDIFF_TYPE__, instead of unsigned long. + * gcc.dg/vect/O1-pr33854.c: Use __SIZE_TYPE__ instead of unsigned long. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + PR debug/41229 + PR debug/41291 + PR debug/41300 + * gfortran.dg/pr41229.f90: New. + +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + PR debug/41232 + * gcc.dg/pr41232.c: New. + +2009-09-08 Joseph Myers <joseph@codesourcery.com> + + * gcc.misc-tests/i386-prefetch.exp: Skip tests when multilib flags + contain -march. + * gcc.dg/tree-ssa/prefetch-7.c, gcc.target/i386/387-1.c, + gcc.target/i386/387-5.c, gcc.target/i386/cmov7.c, + gcc.target/i386/funcspec-1.c, gcc.target/i386/funcspec-8.c, + gcc.target/i386/gcc-have-sync-compare-and-swap-1.c, + gcc.target/i386/gcc-have-sync-compare-and-swap-2.c, + gcc.target/i386/isa-6.c, gcc.target/i386/lea.c, + gcc.target/i386/pentium4-not-mull.c, gcc.target/i386/sse-5.c, + gcc.target/i386/ssefn-1.c: Skip when multilib flags contain -march + options other than that used in dg-options. + 2009-09-07 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/41239 diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist24.C b/gcc/testsuite/g++.dg/cpp0x/initlist24.C new file mode 100644 index 00000000000..33e97c7dfb4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist24.C @@ -0,0 +1,9 @@ +// PR c++/39923 +// { dg-options "-std=c++0x" } + +#include <initializer_list> + +void test3() +{ + std::initializer_list<int> list{move}; // { dg-error "not declared|could not convert" } +} diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C index 59b608fc7ec..d3f26f11222 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C @@ -1,12 +1,12 @@ // Contributed by Dodji Seketeli <dodji@redhat.com> // Origin PR debug/41170 -// { dg-options "-g -dA" } +// { dg-options "-g -dA -fno-merge-debug-strings" } // // We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set // to "not_emitted". That namespace die has a child DW_TAG_typedef DIE // which DW_AT_name is the null terminated string "T". // { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } } -// { dg-final { scan-assembler-times "DW_AT_name: \"not_emitted\"" 1 } } +// { dg-final { scan-assembler-times "\"not_emitted.0\".*?DW_AT_name" 1 } } // { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } } // { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C index b2f67036e24..543439da323 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C @@ -1,9 +1,18 @@ // Contributed by Dodji Seketeli <dodji@redhat.com> // Origin PR debug/39706 -// { dg-options "-g -dA" } +// { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-do compile } -// { dg-final { scan-assembler-times ".debug_pubnames" 1 } } -// { dg-final { scan-assembler-times "\"main\".*external name" 1 } } +// +// There should be one debug_pubnames section generated. +// On Darwin though, there is also a label pointing at the begining of the +// debug_pubnames section. The assembly code of that label adds an occurence +// of section declaration assembly. So on Darwin, we need to check for two +// occurences of the debug_pubnames section declaration. +// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 1 { target { ! *-*-darwin* } } } } +// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 2 { target { *-*-darwin* } } } } +// +// Then check of the presence of the names we are interested in. +// { dg-final { scan-assembler-times "\"main.0\".*external name" 1 } } // { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } } // { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C index 155add48ef4..99bbba3da8d 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C @@ -1,8 +1,8 @@ // Contributed by Dodji Seketeli <dodji@redhat.com> // Origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } } -// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } } +// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } } template <class T> diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C index 07aece6917f..dc6ac990313 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C @@ -1,6 +1,6 @@ // Contributed by Dodji Seketeli <dodji@redhat.com> // Origin PR debug/30161 -// { dg-options "-g -dA -std=c++0x" } +// { dg-options "-g -dA -std=c++0x -fno-merge-debug-strings" } // { dg-do compile } // There must be 5 subprograms generated: @@ -10,10 +10,10 @@ // That makes 6 template type parameters. // { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 6 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int, char, int>\"" 1 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"printf<char, int>\"" 1 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int>\"" 1 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"printf\"" 1 } } +// { dg-final {scan-assembler-times "\"printf<int, char, int>.0\".*?DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf<char, int>.0\".*?DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf<int>.0\".*?DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } } // printf<int, char, int> and printf<char, int> have a pack expansion as // function parameters. In the former, the elements of the parameter pack @@ -21,9 +21,9 @@ // args#1. In the later, the element of the parameter pack expansion // is PackTypes#0 and the argument is args#0. // { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#0\"" 2 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"args#0\"" 2 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#1\"" 1 } } -// { dg-final {scan-assembler-times "DW_AT_name: \"args#1\"" 1 } } +// { dg-final {scan-assembler-times "\"args#0.0\".*?DW_AT_name" 2 } } +// { dg-final {scan-assembler-times "\"PackTypes#1.0\".*?DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"args#1.0\".*?DW_AT_name" 1 } } // { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C index dc401fa06e7..184a90f98aa 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C @@ -1,8 +1,8 @@ // Contributed by Dodji Seketeli <dodji@redhat.com> // Origin PR debug/30161 -// { dg-options "-g -dA" } +// { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } } -// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } } +// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } } // { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } } template <class T> diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-10.c b/gcc/testsuite/gcc.dg/c90-const-expr-10.c index 6159390bb94..bad388c90b1 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-10.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-10.c @@ -5,24 +5,26 @@ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ -void *p = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */ -struct s { void *a; } q = { (__SIZE_TYPE__)(void *)0 }; /* { dg-error "without a cast" } */ +__extension__ typedef __SIZE_TYPE__ size_t; + +void *p = (size_t)(void *)0; /* { dg-error "without a cast" } */ +struct s { void *a; } q = { (size_t)(void *)0 }; /* { dg-error "without a cast" } */ void * f (void) { void *r; - r = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */ - return (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */ + r = (size_t)(void *)0; /* { dg-error "without a cast" } */ + return (size_t)(void *)0; /* { dg-error "without a cast" } */ } void g (void *); /* { dg-message "but argument is of type" } */ void h (void) { - g ((__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */ + g ((size_t)(void *)0); /* { dg-error "without a cast" } */ } void g2 (int, void *); /* { dg-message "but argument is of type" } */ void h2 (void) { - g2 (0, (__SIZE_TYPE__)(void *)0); /* { dg-error "without a cast" } */ + g2 (0, (size_t)(void *)0); /* { dg-error "without a cast" } */ } diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c index 662d8e790dc..ee57d550372 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c @@ -14,8 +14,10 @@ int *a; int b; long *c; -#if defined(_LP64) || defined(_WIN64) +#if defined(_LP64) #define ZERO 0L +#elif defined(_WIN64) +#define ZERO 0LL #else #define ZERO 0 #endif diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-6.c b/gcc/testsuite/gcc.dg/c90-const-expr-6.c index 50de3a9525f..c432cca6343 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-6.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-6.c @@ -4,11 +4,13 @@ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ +__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t; + /* PR 29116. */ int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */ /* PR 31871. */ -extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */ +extern int c[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */ /* Implicit conversions from floating-point constants are not OK, although explicit ones are. */ @@ -32,7 +34,7 @@ struct s { }; enum e { - E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */ + E = (1 + ((ptrdiff_t) (void *) 0)), /* { dg-error "constant" } */ E2 = 0 }; @@ -44,7 +46,7 @@ enum f { void f (int a) { - int v[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */ + int v[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */ switch (a) { case (n * 0 + 1): /* { dg-error "constant" } */ diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-9.c b/gcc/testsuite/gcc.dg/c90-const-expr-9.c index d9ab3756599..a06cdd951b2 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-9.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-9.c @@ -14,7 +14,9 @@ struct t { int b[2]; }; -#define old_offsetof(TYPE, MEMBER) ((__SIZE_TYPE__) &((TYPE *)0)->MEMBER) +__extension__ typedef __SIZE_TYPE__ size_t; + +#define old_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) enum e { E1 = old_offsetof (struct s, a), /* { dg-error "constant" } */ diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-2.c b/gcc/testsuite/gcc.dg/c99-const-expr-2.c index 8e5a600185f..a78e412d35a 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-2.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-2.c @@ -14,8 +14,10 @@ int *a; int b; long *c; -#if defined(_LP64) || defined(_WIN64) +#if defined(_LP64) #define ZERO 0L +#elif defined(_WIN64) +#define ZERO 0LL #else #define ZERO 0 #endif diff --git a/gcc/testsuite/gcc.dg/large-size-array-2.c b/gcc/testsuite/gcc.dg/large-size-array-2.c index a1da14b1f72..bff2f8250fb 100644 --- a/gcc/testsuite/gcc.dg/large-size-array-2.c +++ b/gcc/testsuite/gcc.dg/large-size-array-2.c @@ -4,4 +4,4 @@ static char * name[] = { [0x80000000] = "bar" }; -/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */ +/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */ diff --git a/gcc/testsuite/gcc.dg/large-size-array-4.c b/gcc/testsuite/gcc.dg/large-size-array-4.c index 4f88f2c93ed..f6099b9152b 100644 --- a/gcc/testsuite/gcc.dg/large-size-array-4.c +++ b/gcc/testsuite/gcc.dg/large-size-array-4.c @@ -4,4 +4,4 @@ static char * name[] = { [0x80000000] = "bar" }; -/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */ +/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */ diff --git a/gcc/testsuite/gcc.dg/pr41232.c b/gcc/testsuite/gcc.dg/pr41232.c new file mode 100644 index 00000000000..17ec54899d7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr41232.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -g" } */ +extern int atoi (const char *); +extern int sprintf (char *, const char *, ...); +void malloc_init() { + char *cptr; + char buf[1]; + int tmbd = atoi(cptr); + if (tmbd > 0) + tmbd = (tmbd <= 124) ? tmbd : 124; + else + tmbd = 0; + sprintf(buf, "%d\n", tmbd); +} diff --git a/gcc/testsuite/gcc.dg/profile-dir-1.c b/gcc/testsuite/gcc.dg/profile-dir-1.c index a0a22ffb0b0..6745c3b0daa 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-1.c +++ b/gcc/testsuite/gcc.dg/profile-dir-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fprofile-generate=. -fdump-tree-tree_profile" } */ +/* { dg-require-host-local "" } */ /* { dg-final { scan-tree-dump " ./profile-dir-1.gcda" "tree_profile" } } */ int diff --git a/gcc/testsuite/gcc.dg/profile-dir-2.c b/gcc/testsuite/gcc.dg/profile-dir-2.c index 454f0641aa2..2bfbee3f408 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-2.c +++ b/gcc/testsuite/gcc.dg/profile-dir-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fprofile-generate -fdump-tree-tree_profile" } */ +/* { dg-require-host-local "" } */ /* { dg-final { scan-tree-dump "/profile-dir-2.gcda" "tree_profile" } } */ int diff --git a/gcc/testsuite/gcc.dg/profile-dir-3.c b/gcc/testsuite/gcc.dg/profile-dir-3.c index 29b0a558712..8de891f03b8 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-3.c +++ b/gcc/testsuite/gcc.dg/profile-dir-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-tree-tree_profile" } */ +/* { dg-require-host-local "" } */ /* { dg-final { scan-tree-dump " ./profile-dir-3.gcda" "tree_profile" } } */ int diff --git a/gcc/testsuite/gcc.dg/torture/pr39074.c b/gcc/testsuite/gcc.dg/torture/pr39074.c index 7be7e227b25..fe35cd908ae 100644 --- a/gcc/testsuite/gcc.dg/torture/pr39074.c +++ b/gcc/testsuite/gcc.dg/torture/pr39074.c @@ -2,9 +2,11 @@ /* { dg-options "-fdump-tree-alias" } */ /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ +typedef __PTRDIFF_TYPE__ intptr_t; + int i; void __attribute__((noinline)) -foo(long b, long q) +foo(long b, intptr_t q) { int *y; int **a = &y, **x; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c index 7ddcb21921f..0b91dae3840 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ +typedef __PTRDIFF_TYPE__ intptr_t; typedef union lispunion *object; struct character { @@ -22,14 +23,14 @@ void init_code () object V659; object _x, _y; object V643; - long V648; + intptr_t V648; unsigned char V653; object V651; object V654; object V658; T1240: -if (V648 >= (long)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */ +if (V648 >= (intptr_t)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */ goto T1243; V653 = ((char *) V654->v.v_self)[V648]; V659 = (object) V654 + V653; @@ -41,7 +42,7 @@ T1261: goto T1249; goto T1224; T1249: - V648 = (long) V648 + 1; + V648 = (intptr_t) V648 + 1; goto T1240; T1243: V643 = (object) & Cnil_body; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c index 3024bed1b71..856df0a4a8f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c @@ -1,5 +1,6 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=athlon" } } */ /* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon -msse2 -mfpmath=sse --param simultaneous-prefetches=100 --param max-unrolled-insns=1 -fdump-tree-aprefetch-details -fdump-tree-optimized" } */ #define K 1000000 diff --git a/gcc/testsuite/gcc.dg/vect/O1-pr33854.c b/gcc/testsuite/gcc.dg/vect/O1-pr33854.c index 346da6b60bd..4d4171fc449 100644 --- a/gcc/testsuite/gcc.dg/vect/O1-pr33854.c +++ b/gcc/testsuite/gcc.dg/vect/O1-pr33854.c @@ -1,7 +1,7 @@ /* Testcase by Martin Michlmayr <tbm@cyrius.com> */ /* { dg-do compile } */ -extern void *malloc (long unsigned int __size); +extern void *malloc (__SIZE_TYPE__ __size); typedef struct VMatrix_ VMatrix; struct VMatrix_ { diff --git a/gcc/testsuite/gcc.dg/vect/pr33833.c b/gcc/testsuite/gcc.dg/vect/pr33833.c index f862a915cb6..ebdfcb1f818 100644 --- a/gcc/testsuite/gcc.dg/vect/pr33833.c +++ b/gcc/testsuite/gcc.dg/vect/pr33833.c @@ -1,6 +1,10 @@ /* Testcase by Martin Michlmayr <tbm@cyrius.com> */ /* { dg-do compile } */ +#define signed +typedef unsigned __PTRDIFF_TYPE__ uintptr_t; +#undef signed + struct list_head { struct list_head *prev; @@ -14,7 +18,7 @@ struct rq struct prio_array *active, arrays[2]; } per_cpu__runqueues; -void sched_init (unsigned long __ptr) +void sched_init (uintptr_t __ptr) { int j, k; struct prio_array *array; diff --git a/gcc/testsuite/gcc.dg/vect/pr33846.c b/gcc/testsuite/gcc.dg/vect/pr33846.c index f31e207bdef..3f421c9b75d 100644 --- a/gcc/testsuite/gcc.dg/vect/pr33846.c +++ b/gcc/testsuite/gcc.dg/vect/pr33846.c @@ -7,7 +7,9 @@ int clamp_val (int i) return ~i >> 31; } -void _mix_some_samples (long buf, int *mix_buffer, int mix_size) +typedef __PTRDIFF_TYPE__ intptr_t; + +void _mix_some_samples (intptr_t buf, int *mix_buffer, int mix_size) { int i; signed int *p = mix_buffer; diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp index e9909845c44..a9f767cde0a 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp +++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp @@ -90,6 +90,13 @@ load_lib torture-options.exp dg-init torture-init +if { [board_info target exists multilib_flags] + && [string match "* -march=*" " [board_info target multilib_flags] "] } { + # Multilib flags come after the -march flags we pass and override + # them, so skip these tests when such flags are passed. + return +} + set-torture-options $PREFETCH_NONE gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" diff --git a/gcc/testsuite/gcc.target/i386/387-1.c b/gcc/testsuite/gcc.target/i386/387-1.c index 2b3ca0b0610..83af71f9647 100644 --- a/gcc/testsuite/gcc.target/i386/387-1.c +++ b/gcc/testsuite/gcc.target/i386/387-1.c @@ -1,6 +1,7 @@ /* Verify that -mno-fancy-math-387 works. */ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */ /* { dg-final { scan-assembler "call\t(.*)sin" } } */ /* { dg-final { scan-assembler "call\t(.*)cos" } } */ diff --git a/gcc/testsuite/gcc.target/i386/387-5.c b/gcc/testsuite/gcc.target/i386/387-5.c index 0a050081780..027799a878a 100644 --- a/gcc/testsuite/gcc.target/i386/387-5.c +++ b/gcc/testsuite/gcc.target/i386/387-5.c @@ -1,6 +1,7 @@ /* Verify that -mno-fancy-math-387 works. */ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */ /* { dg-final { scan-assembler "call\t(.*)atan" } } */ /* { dg-final { scan-assembler "call\t(.*)log1p" } } */ diff --git a/gcc/testsuite/gcc.target/i386/cmov7.c b/gcc/testsuite/gcc.target/i386/cmov7.c index 31b48165432..433bf57f8e7 100644 --- a/gcc/testsuite/gcc.target/i386/cmov7.c +++ b/gcc/testsuite/gcc.target/i386/cmov7.c @@ -1,6 +1,7 @@ /* PR middle-end/33187 */ /* { dg-do compile } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */ /* { dg-options "-O2 -ffast-math -march=k8 -mbranch-cost=5 -mfpmath=387" } */ /* { dg-final { scan-assembler "fcmov" } } */ diff --git a/gcc/testsuite/gcc.target/i386/funcspec-1.c b/gcc/testsuite/gcc.target/i386/funcspec-1.c index 1416c75f357..52420ec93e9 100644 --- a/gcc/testsuite/gcc.target/i386/funcspec-1.c +++ b/gcc/testsuite/gcc.target/i386/funcspec-1.c @@ -3,6 +3,7 @@ for a function that doesn't use attribute((option)). */ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-O3 -ftree-vectorize -march=i386" } */ /* { dg-final { scan-assembler "addps\[ \t\]" } } */ /* { dg-final { scan-assembler "fsubs\[ \t\]" } } */ diff --git a/gcc/testsuite/gcc.target/i386/funcspec-8.c b/gcc/testsuite/gcc.target/i386/funcspec-8.c index 2b8bb6f4af6..c370733a01b 100644 --- a/gcc/testsuite/gcc.target/i386/funcspec-8.c +++ b/gcc/testsuite/gcc.target/i386/funcspec-8.c @@ -1,6 +1,7 @@ /* Test whether using target specific options, we can use the x86 builtin functions in functions with the appropriate function specific options. */ /* { dg-do compile } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */ /* { dg-options "-O2 -march=k8 -mfpmath=sse" } */ typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); diff --git a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c index 598f2ddbc31..d20a7176038 100644 --- a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c +++ b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-1.c @@ -1,5 +1,6 @@ /* { dg-do preprocess } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-march=i386" } */ #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 diff --git a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c index fa6e7c654ef..01a49b64a83 100644 --- a/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c +++ b/gcc/testsuite/gcc.target/i386/gcc-have-sync-compare-and-swap-2.c @@ -1,5 +1,6 @@ /* { dg-do preprocess } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i486" } } */ /* { dg-options "-march=i486" } */ #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 diff --git a/gcc/testsuite/gcc.target/i386/isa-6.c b/gcc/testsuite/gcc.target/i386/isa-6.c index ec1fbeaa4d4..7f01a884ea6 100644 --- a/gcc/testsuite/gcc.target/i386/isa-6.c +++ b/gcc/testsuite/gcc.target/i386/isa-6.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=amdfam10" } } */ /* { dg-options "-march=amdfam10 -mno-sse4" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.target/i386/lea.c b/gcc/testsuite/gcc.target/i386/lea.c index afbbfa4fbc0..f8f967e00f1 100644 --- a/gcc/testsuite/gcc.target/i386/lea.c +++ b/gcc/testsuite/gcc.target/i386/lea.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=pentiumpro" } } */ /* { dg-options "-O2 -march=pentiumpro" } */ /* { dg-final { scan-assembler "leal" } } */ typedef struct { diff --git a/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c b/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c index be48185a86c..a846aae61b0 100644 --- a/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c +++ b/gcc/testsuite/gcc.target/i386/pentium4-not-mull.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=pentium4" } } */ /* { dg-options "-O2 -march=pentium4" } */ /* { dg-final { scan-assembler-not "imull" } } */ diff --git a/gcc/testsuite/gcc.target/i386/sse-5.c b/gcc/testsuite/gcc.target/i386/sse-5.c index c3ed8f2672b..bdbd5012e48 100644 --- a/gcc/testsuite/gcc.target/i386/sse-5.c +++ b/gcc/testsuite/gcc.target/i386/sse-5.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-Winline -O2 -march=i386" } */ typedef double v2df __attribute__ ((vector_size (16))); diff --git a/gcc/testsuite/gcc.target/i386/ssefn-1.c b/gcc/testsuite/gcc.target/i386/ssefn-1.c index 0279a553346..bea6cb2bf0b 100644 --- a/gcc/testsuite/gcc.target/i386/ssefn-1.c +++ b/gcc/testsuite/gcc.target/i386/ssefn-1.c @@ -7,6 +7,7 @@ /* { dg-final { scan-assembler "mulss" } } */ /* { dg-final { scan-assembler-not "movsd" } } */ /* { dg-final { scan-assembler-not "mulsd" } } */ +/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=i386" } } */ /* { dg-options "-O2 -march=i386 -msse -mfpmath=sse -fno-inline" } */ static float xs (void) diff --git a/gcc/testsuite/gfortran.dg/pr41229.f90 b/gcc/testsuite/gfortran.dg/pr41229.f90 new file mode 100644 index 00000000000..9f6e566fc9b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr41229.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! { dg-options "-O2 -g" } +SUBROUTINE cp_fm_triangular_multiply() + INTEGER, PARAMETER :: dp=KIND(0.0D0) + REAL(dp), ALLOCATABLE, DIMENSION(:) :: tau, work + REAL(KIND=dp), DIMENSION(:, :), POINTER :: a + ndim = SIZE(a,2) + ALLOCATE(tau(ndim),STAT=istat) + ALLOCATE(work(2*ndim),STAT=istat) +END SUBROUTINE diff --git a/gcc/toplev.c b/gcc/toplev.c index 3343d2e097b..8b4bc10085a 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1902,7 +1902,12 @@ process_options (void) if (flag_gtoggle) { if (debug_info_level == DINFO_LEVEL_NONE) - debug_info_level = DINFO_LEVEL_NORMAL; + { + debug_info_level = DINFO_LEVEL_NORMAL; + + if (write_symbols == NO_DEBUG) + write_symbols = PREFERRED_DEBUGGING_TYPE; + } else debug_info_level = DINFO_LEVEL_NONE; } diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 11b67120e39..9af6cbd4e32 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -637,9 +637,10 @@ typedef bool (*walk_use_def_chains_fn) (tree, gimple, void *); extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool); void propagate_defs_into_debug_stmts (gimple, basic_block, - const gimple_stmt_iterator *); + const gimple_stmt_iterator *); void propagate_var_def_into_debug_stmts (tree, basic_block, - const gimple_stmt_iterator *); + const gimple_stmt_iterator *); +void release_defs_bitset (bitmap toremove); /* In tree-into-ssa.c */ void update_ssa (unsigned); diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 05988636489..42b2ef36252 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -5297,42 +5297,6 @@ create_new_ivs (struct ivopts_data *data, struct iv_ca *set) } } -/* Returns the phi-node in BB with result RESULT. */ - -static gimple -get_phi_with_result (basic_block bb, tree result) -{ - gimple_stmt_iterator i = gsi_start_phis (bb); - - for (; !gsi_end_p (i); gsi_next (&i)) - if (gimple_phi_result (gsi_stmt (i)) == result) - return gsi_stmt (i); - - gcc_unreachable (); - return NULL; -} - - -/* Removes statement STMT (real or a phi node). If INCLUDING_DEFINED_NAME - is true, remove also the ssa name defined by the statement. */ - -static void -remove_statement (gimple stmt, bool including_defined_name) -{ - if (gimple_code (stmt) == GIMPLE_PHI) - { - gimple bb_phi = get_phi_with_result (gimple_bb (stmt), - gimple_phi_result (stmt)); - gimple_stmt_iterator bsi = gsi_for_stmt (bb_phi); - remove_phi_node (&bsi, including_defined_name); - } - else - { - gimple_stmt_iterator bsi = gsi_for_stmt (stmt); - gsi_remove (&bsi, true); - release_defs (stmt); - } -} /* Rewrites USE (definition of iv used in a nonlinear expression) using candidate CAND. */ @@ -5435,7 +5399,9 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data, { ass = gimple_build_assign (tgt, op); gsi_insert_before (&bsi, ass, GSI_SAME_STMT); - remove_statement (use->stmt, false); + + bsi = gsi_for_stmt (use->stmt); + remove_phi_node (&bsi, false); } else { @@ -5611,7 +5577,11 @@ remove_unused_ivs (struct ivopts_data *data) { unsigned j; bitmap_iterator bi; + bitmap toremove = BITMAP_ALLOC (NULL); + /* Figure out an order in which to release SSA DEFs so that we don't + release something that we'd have to propagate into a debug stmt + afterwards. */ EXECUTE_IF_SET_IN_BITMAP (data->relevant, 0, j, bi) { struct version_info *info; @@ -5622,25 +5592,12 @@ remove_unused_ivs (struct ivopts_data *data) && !info->inv_id && !info->iv->have_use_for && !info->preserve_biv) - { - if (MAY_HAVE_DEBUG_STMTS) - { - gimple stmt; - imm_use_iterator iter; - - FOR_EACH_IMM_USE_STMT (stmt, iter, info->iv->ssa_name) - { - if (!gimple_debug_bind_p (stmt)) - continue; - - /* ??? We can probably do better than this. */ - gimple_debug_bind_reset_value (stmt); - update_stmt (stmt); - } - } - remove_statement (SSA_NAME_DEF_STMT (info->iv->ssa_name), true); - } + bitmap_set_bit (toremove, SSA_NAME_VERSION (info->iv->ssa_name)); } + + release_defs_bitset (toremove); + + BITMAP_FREE (toremove); } /* Frees data allocated by the optimization of a single loop. */ diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index b809ab30f8d..3accbbc2bb1 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -857,7 +857,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, /* Move the statement from the middle block. */ gsi = gsi_last_bb (cond_bb); - gsi_from = gsi_last_bb (middle_bb); + gsi_from = gsi_last_nondebug_bb (middle_bb); gsi_move_before (&gsi_from, &gsi); } diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index d97f51367e2..55ce2f65a4f 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -192,7 +192,7 @@ static inline long find_operand_rank (tree e) { void **slot = pointer_map_contains (operand_rank, e); - return slot ? (long) *slot : -1; + return slot ? (long) (intptr_t) *slot : -1; } /* Insert {E,RANK} into the operand rank hashtable. */ @@ -204,7 +204,7 @@ insert_operand_rank (tree e, long rank) gcc_assert (rank > 0); slot = pointer_map_insert (operand_rank, e); gcc_assert (!*slot); - *slot = (void *) rank; + *slot = (void *) (intptr_t) rank; } /* Given an expression E, return the rank of the expression. */ diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 3d814fc2e0b..255e8a533b8 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1120,7 +1120,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_) copy_reference_ops_from_ref (gimple_assign_lhs (def_stmt), &lhs); i = VEC_length (vn_reference_op_s, vr->operands) - 1; j = VEC_length (vn_reference_op_s, lhs) - 1; - while (j >= 0 + while (j >= 0 && i >= 0 && vn_reference_op_eq (VEC_index (vn_reference_op_s, vr->operands, i), VEC_index (vn_reference_op_s, lhs, j))) @@ -1128,13 +1128,14 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_) i--; j--; } + + VEC_free (vn_reference_op_s, heap, lhs); /* i now points to the first additional op. ??? LHS may not be completely contained in VR, one or more VIEW_CONVERT_EXPRs could be in its way. We could at least try handling outermost VIEW_CONVERT_EXPRs. */ if (j != -1) return (void *)-1; - VEC_free (vn_reference_op_s, heap, lhs); /* Now re-write REF to be based on the rhs of the assignment. */ copy_reference_ops_from_ref (gimple_assign_rhs1 (def_stmt), &rhs); diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 0ff4733f545..9015d19c189 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -444,6 +444,74 @@ propagate_defs_into_debug_stmts (gimple def, basic_block tobb, } } +/* Delete SSA DEFs for SSA versions in the TOREMOVE bitmap, removing + dominated stmts before their dominators, so that release_ssa_defs + stands a chance of propagating DEFs into debug bind stmts. */ + +void +release_defs_bitset (bitmap toremove) +{ + unsigned j; + bitmap_iterator bi; + + /* Performing a topological sort is probably overkill, this will + most likely run in slightly superlinear time, rather than the + pathological quadratic worst case. */ + while (!bitmap_empty_p (toremove)) + EXECUTE_IF_SET_IN_BITMAP (toremove, 0, j, bi) + { + bool remove_now = true; + tree var = ssa_name (j); + gimple stmt; + imm_use_iterator uit; + + FOR_EACH_IMM_USE_STMT (stmt, uit, var) + { + ssa_op_iter dit; + def_operand_p def_p; + + /* We can't propagate PHI nodes into debug stmts. */ + if (gimple_code (stmt) == GIMPLE_PHI + || is_gimple_debug (stmt)) + continue; + + /* If we find another definition to remove that uses + the one we're looking at, defer the removal of this + one, so that it can be propagated into debug stmts + after the other is. */ + FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, dit, SSA_OP_DEF) + { + tree odef = DEF_FROM_PTR (def_p); + + if (bitmap_bit_p (toremove, SSA_NAME_VERSION (odef))) + { + remove_now = false; + break; + } + } + + if (!remove_now) + BREAK_FROM_IMM_USE_STMT (uit); + } + + if (remove_now) + { + gimple def = SSA_NAME_DEF_STMT (var); + gimple_stmt_iterator gsi = gsi_for_stmt (def); + + if (gimple_code (def) == GIMPLE_PHI) + remove_phi_node (&gsi, true); + else + { + gsi_remove (&gsi, true); + release_defs (def); + } + + bitmap_clear_bit (toremove, j); + } + } +} + /* Return true if SSA_NAME is malformed and mark it visited. IS_VIRTUAL is true if this SSA_NAME was found inside a virtual @@ -1895,7 +1963,8 @@ execute_update_addresses_taken (bool do_optimize) { gimple stmt = gsi_stmt (gsi); - if (gimple_references_memory_p (stmt)) + if (gimple_references_memory_p (stmt) + || is_gimple_debug (stmt)) update_stmt (stmt); } diff --git a/gcc/tree.c b/gcc/tree.c index a036439cc3f..010aeff2f57 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2003,18 +2003,6 @@ tree_last (tree chain) return chain; } -/* Return the node in a chain of nodes whose value is x, NULL if not found. */ - -tree -tree_find_value (tree chain, tree x) -{ - tree list; - for (list = chain; list; list = TREE_CHAIN (list)) - if (TREE_VALUE (list) == x) - return list; - return NULL; -} - /* Reverse the order of elements in the chain T, and return the new head of the chain (old last element). */ diff --git a/gcc/tree.h b/gcc/tree.h index 880f71d9f17..59251b58d14 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4278,10 +4278,6 @@ extern tree tree_cons_stat (tree, tree, tree MEM_STAT_DECL); extern tree tree_last (tree); -/* Return the node in a chain whose TREE_VALUE is x, NULL if not found. */ - -extern tree tree_find_value (tree, tree); - /* Reverse the order of elements in a chain, and return the new head. */ extern tree nreverse (tree); diff --git a/gcc/varasm.c b/gcc/varasm.c index 864ab16671f..a7fa83fc107 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2328,11 +2328,11 @@ assemble_external (tree decl ATTRIBUTE_UNUSED) for declarations that can be weak, it happens to be match. */ && !TREE_STATIC (decl) - && tree_find_value (weak_decls, decl) == NULL_TREE) - weak_decls = tree_cons (NULL, decl, weak_decls); + && value_member (decl, weak_decls) == NULL_TREE) + weak_decls = tree_cons (NULL, decl, weak_decls); #ifdef ASM_OUTPUT_EXTERNAL - if (tree_find_value (pending_assemble_externals, decl) == NULL_TREE) + if (value_member (decl, pending_assemble_externals) == NULL_TREE) pending_assemble_externals = tree_cons (NULL, decl, pending_assemble_externals); #endif diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog index 03e5017bd02..179a1c6d523 100644 --- a/libcpp/po/ChangeLog +++ b/libcpp/po/ChangeLog @@ -1,3 +1,7 @@ +2009-09-08 Joseph Myers <joseph@codesourcery.com> + + * id.po: Update. + 2009-09-02 Joseph Myers <joseph@codesourcery.com> * es.po: Update. diff --git a/libcpp/po/id.po b/libcpp/po/id.po index da4c89cb9d3..ba92679d03b 100644 --- a/libcpp/po/id.po +++ b/libcpp/po/id.po @@ -1,14 +1,14 @@ # Pesan bahasa indonesia untuk cpplib # Copyright (C) 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the gcc package. -# Arif E. Nugroho <arif_endro@yahoo.com>, 2008. +# Arif E. Nugroho <arif_endro@yahoo.com>, 2008, 2009. # msgid "" msgstr "" -"Project-Id-Version: cpplib 4.4-b20081121\n" +"Project-Id-Version: cpplib 4.4.1\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" "POT-Creation-Date: 2009-04-22 16:32+0000\n" -"PO-Revision-Date: 2008-11-26 07:30+0700\n" +"PO-Revision-Date: 2009-09-08 18:00+0700\n" "Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n" "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n" "MIME-Version: 1.0\n" @@ -900,9 +900,9 @@ msgid "while writing precompiled header" msgstr "ketika menulis precompiled header" #: pch.c:484 -#, fuzzy, c-format +#, c-format msgid "%s: not used because `%.*s' is poisoned" -msgstr "%s: tidak digunakan karena `%s' didefinisikan" +msgstr "%s: tidak digunakan karena `%.*s' teracuni" #: pch.c:506 #, c-format diff --git a/libdecnumber/configure b/libdecnumber/configure index 75a7b90570f..c8ef76d8474 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -1633,6 +1633,123 @@ $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 @@ -1687,6 +1804,58 @@ $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 @@ -3753,411 +3922,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 -inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) -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 - continue -fi +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF +;; +esac - 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 : +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) -else - acx_cv_header_stdint_kind="(mostly complete)" -fi +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; +esac - 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 : +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -else - acx_cv_header_stdint_kind="(mostly complete)" -fi +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; +esac - 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 : + { $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 else - acx_cv_header_stdint_kind="(mostly complete)" -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end 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 : + /* 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 : + if test "$cross_compiling" = yes; then : + ac_cv_type_long_long_int=yes else - acx_cv_header_stdint_kind="(lacks uint64_t)" + 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 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 + ac_cv_type_long_long_int=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +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 - 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 : +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h -fi + fi - 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 : -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 - continue -fi + 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 : - 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 : +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h -fi +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 - 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 -{ $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; } + 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 : -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 +$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h -{ $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; } +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 -# ----------------- done included file, check C basic types -------- + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : -# 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 intptr_t $ac_type +_ACEOF -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 + ac_type= fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } +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 SIZEOF_VOID_P $ac_cv_sizeof_void_p +#define uint8_t $ac_cv_c_uint8_t _ACEOF +;; + esac - ;; -esac +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) -# 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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : -else - 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 +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) +$as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define uint32_t $ac_cv_c_uint32_t _ACEOF +;; + esac - ;; -esac +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) -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 "#define _UINT64_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + 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 : $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 : + 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; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_type_unsigned_long_long_int=yes 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 + ac_cv_type_unsigned_long_long_int=no fi - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ $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 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_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 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 : + 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 - 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 + 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 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 + 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 - # 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 : + 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 -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 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + ac_type= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + + + + + + + + + + +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 SIZEOF_CHAR $ac_cv_sizeof_char +#define HAVE_INT_LEAST32_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 +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 -# 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 - { $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 + +# ----------------- Summarize what we found so far + + + + # ----------------- done all checks, emit header ------------- ac_config_commands="$ac_config_commands gstdint.h" @@ -5551,22 +5719,8 @@ 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 @@ -6120,263 +6274,20 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "gstdint.h":C) -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 +cat >> tmp-stdint.h <<EOF +#ifndef GCC_GENERATED_STDINT_H +#define GCC_GENERATED_STDINT_H 1 - /* 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 +#include "config.h" +#include <sys/types.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#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 @@ -6384,20 +6295,15 @@ 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 @@ -6405,40 +6311,16 @@ 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 - -sed 's/^ *//' >> tmp-stdint.h <<EOF - - #endif /* GCC_GENERATED_STDINT_H */ -EOF +echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h if test -r gstdint.h && cmp -s tmp-stdint.h gstdint.h; then rm -f tmp-stdint.h diff --git a/libgomp/config.h.in b/libgomp/config.h.in index c88660a945e..201d56a060e 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -27,9 +27,24 @@ /* 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 @@ -72,9 +87,18 @@ /* 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 @@ -103,21 +127,6 @@ /* 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 @@ -129,3 +138,66 @@ /* 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 6e92fe909c9..70ca41dcc5d 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -2090,6 +2090,77 @@ 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 @@ -2144,6 +2215,58 @@ $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 @@ -5364,13 +5487,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:5367: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5490: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5370: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5493: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5373: output\"" >&5) + (eval echo "\"\$as_me:5496: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6576,7 +6699,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6579 "configure"' > conftest.$ac_ext + echo '#line 6702 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8106,11 +8229,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:8109: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8232: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8113: \$? = $ac_status" >&5 + echo "$as_me:8236: \$? = $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. @@ -8445,11 +8568,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:8448: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8571: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8452: \$? = $ac_status" >&5 + echo "$as_me:8575: \$? = $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. @@ -8550,11 +8673,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:8553: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8676: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8557: \$? = $ac_status" >&5 + echo "$as_me:8680: \$? = $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 @@ -8605,11 +8728,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:8608: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8731: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8612: \$? = $ac_status" >&5 + echo "$as_me:8735: \$? = $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 @@ -10987,7 +11110,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10990 "configure" +#line 11113 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11083,7 +11206,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11086 "configure" +#line 11209 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12351,11 +12474,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:12354: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12477: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12358: \$? = $ac_status" >&5 + echo "$as_me:12481: \$? = $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. @@ -12450,11 +12573,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:12453: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12576: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12457: \$? = $ac_status" >&5 + echo "$as_me:12580: \$? = $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 @@ -12502,11 +12625,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:12505: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12628: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12509: \$? = $ac_status" >&5 + echo "$as_me:12632: \$? = $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 @@ -14585,411 +14708,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 -inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) -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 - continue -fi +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF +;; +esac - 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 : +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) -else - acx_cv_header_stdint_kind="(mostly complete)" -fi +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; +esac - 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 : +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -else - acx_cv_header_stdint_kind="(mostly complete)" -fi +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; +esac - 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 : + { $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 else - acx_cv_header_stdint_kind="(mostly complete)" -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end 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 : + /* 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 : + if test "$cross_compiling" = yes; then : + ac_cv_type_long_long_int=yes else - acx_cv_header_stdint_kind="(lacks uint64_t)" + 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 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 + ac_cv_type_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext 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 - 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 : +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h -fi + fi - 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 : -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 + 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 : + +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h + else - continue -fi + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long int' \ + || ac_type='long int' - 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 intmax_t $ac_type +_ACEOF fi - 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 + 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 : -{ $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; } +$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h -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 - -{ $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; } +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 -# ----------------- done included file, check C basic types -------- + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : -# 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 intptr_t $ac_type +_ACEOF -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 + ac_type= fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } +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 SIZEOF_VOID_P $ac_cv_sizeof_void_p +#define uint8_t $ac_cv_c_uint8_t _ACEOF +;; + esac - ;; -esac +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) -# 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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : -else - 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 +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) +$as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define uint32_t $ac_cv_c_uint32_t _ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT64_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 : +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + 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 : $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 : + 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; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_type_unsigned_long_long_int=yes 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 + ac_cv_type_unsigned_long_long_int=no fi - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } +{ $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 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_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 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 : + 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 - 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 + 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 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 + 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 - # 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 : + 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 -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 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + ac_type= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + + + + + + + + + + +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 SIZEOF_CHAR $ac_cv_sizeof_char +#define HAVE_INT_LEAST32_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 +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 -# 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 - { $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 + +# ----------------- Summarize what we found so far + + + + # ----------------- done all checks, emit header ------------- ac_config_commands="$ac_config_commands gstdint.h" @@ -17278,22 +17400,8 @@ 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 @@ -18806,263 +18914,20 @@ _LT_EOF ;; "gstdint.h":C) -if test "$GCC" = yes; then - echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h -else - echo "/* generated for $CC */" > tmp-stdint.h -fi +cat >> tmp-stdint.h <<EOF +#ifndef GCC_GENERATED_STDINT_H +#define GCC_GENERATED_STDINT_H 1 -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 +#include "config.h" +#include <sys/types.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#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 @@ -19070,20 +18935,15 @@ 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 @@ -19091,40 +18951,16 @@ 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 -sed 's/^ *//' >> tmp-stdint.h <<EOF - - #endif /* GCC_GENERATED_STDINT_H */ -EOF +echo '#endif /* GCC_GENERATED_STDINT_H */' >> tmp-stdint.h if test -r gstdint.h && cmp -s tmp-stdint.h gstdint.h; then rm -f tmp-stdint.h diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2498fc742b2..be89f186885 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * configure: Rebuilt with modified libtool.m4. + 2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure.ac (AC_PREREQ): Bump to 2.64. diff --git a/libjava/configure b/libjava/configure index 63a238fbd14..a7c464a0bdb 100755 --- a/libjava/configure +++ b/libjava/configure @@ -14080,7 +14080,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else GXX=no @@ -14417,7 +14417,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -14482,7 +14482,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -14826,7 +14826,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # FIXME: insert proper C++ library support @@ -14910,7 +14910,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -14921,7 +14921,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bfd0e999bc0..5e03fe922d2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2009-09-08 Alexandre Oliva <aoliva@redhat.com> + + * configure: Rebuilt with modified libtool.m4. + 2009-09-07 H.J. Lu <hongjiu.lu@intel.com> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 122b46a4307..1430a8b0307 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -12336,7 +12336,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else GXX=no @@ -12673,7 +12673,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -12738,7 +12738,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -13082,7 +13082,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # FIXME: insert proper C++ library support @@ -13166,7 +13166,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -13177,7 +13177,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' diff --git a/libtool.m4 b/libtool.m4 index c17514b9260..12d45a5a8a5 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -5471,7 +5471,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else GXX=no @@ -5716,7 +5716,7 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -5781,7 +5781,7 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "^ .* -L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then @@ -6125,7 +6125,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # FIXME: insert proper C++ library support @@ -6209,7 +6209,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6220,7 +6220,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "^ .* -L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |