Index: configure
===================================================================
---- configure (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ configure (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -4769,12 +4769,14 @@
- else
- CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
- fi
-
- if test -n "$with_build_time_tools"; then
- for ncn_progname in c++ g++ cxx gxx; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:4778: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:4780: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -4791,7 +4793,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4795: checking for $ac_word" >&5
-+echo "configure:4797: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4822,7 +4824,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4826: checking for $ac_word" >&5
-+echo "configure:4828: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+--- configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -5117,7 +5117,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
+ $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
+
+-if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
++if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
+ have_gnat=yes
else
-@@ -4860,12 +4862,14 @@
+ have_gnat=no
+@@ -6944,10 +6944,6 @@
+ extra_arflags_for_target=" -X32_64"
+ extra_nmflags_for_target=" -B -X32_64"
+ ;;
+- *-*-darwin[3-9]*)
+- # ranlib before Darwin10 requires the -c flag to look at common symbols.
+- extra_ranlibflags_for_target=" -c"
+- ;;
+ mips*-*-pe | sh*-*-pe | *arm-wince-pe)
+ target_makefile_frag="config/mt-wince"
+ ;;
+Index: Makefile.in
+===================================================================
+--- Makefile.in (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ Makefile.in (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -60017,6 +60017,7 @@
+ install-gcc: maybe-install-fixincludes
+ install-gcc: maybe-install-lto-plugin
+ install-strip-gcc: maybe-install-strip-fixincludes
++install-strip-gcc: maybe-install-strip-lto-plugin
+ configure-libcpp: configure-libiberty
+
+ configure-stage1-libcpp: configure-stage1-libiberty
+Index: libgcc/config.host
+===================================================================
+--- libgcc/config.host (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgcc/config.host (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -145,15 +145,6 @@
+ asm_hidden_op=.private_extern
+ tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
+ ;;
+-*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
+- # This is the place-holder for the generic a.out configuration
+- # of FreeBSD. No actual configuration resides here since
+- # there was only ever a bare-bones ix86 configuration for
+- # a.out and it exists solely in the machine-specific section.
+- # This place-holder must exist to avoid dropping into
+- # the generic ELF configuration of FreeBSD (i.e. it must be
+- # ordered before that section).
+- ;;
+ *-*-freebsd*)
+ # This is the generic ELF configuration of FreeBSD. Later
+ # machine-specific sections may refine and add to this
+Index: libgcc/generic-morestack.c
+===================================================================
+--- libgcc/generic-morestack.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgcc/generic-morestack.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -459,8 +459,8 @@
+ sigemptyset (&__morestack_initial_sp.mask);
+
+ sigfillset (&__morestack_fullmask);
+-#ifdef __linux__
+- /* On Linux, the first two real time signals are used by the NPTL
++#ifdef __GLIBC__
++ /* In glibc, the first two real time signals are used by the NPTL
+ threading library. By taking them out of the set of signals, we
+ avoiding copying the signal mask in pthread_sigmask. More
+ importantly, pthread_sigmask uses less stack space on x86_64. */
+Index: libgcc/ChangeLog
+===================================================================
+--- libgcc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,16 @@
++2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
++
++ Backport from mainline
++ 2011-12-14 H.J. Lu <hongjiu.lu@intel.com>
++
++ * generic-morestack.c (__generic_morestack_set_initial_sp): Check
++ __GLIBC__ instead of __linux__ when using __SIGRTMIN.
++
++2011-11-23 Gerald Pfeifer <gerald@pfeifer.com>
++
++ * config.host (*-*-freebsd[12], *-*-freebsd[12].*,
++ *-*-freebsd*aout*): Remove.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: libtool.m4
+===================================================================
+--- libtool.m4 (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libtool.m4 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2273,7 +2273,7 @@
+ objformat=`/usr/bin/objformat`
else
- CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ case $host_os in
+- freebsd[[123]]*) objformat=aout ;;
++ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
-+else
-+ CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
- fi
-
- if test -n "$with_build_time_tools"; then
- for ncn_progname in gcc; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:4869: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:4873: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -4882,7 +4886,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4886: checking for $ac_word" >&5
-+echo "configure:4890: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4913,7 +4917,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4917: checking for $ac_word" >&5
-+echo "configure:4921: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4946,12 +4950,14 @@
-
- if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
- GCC_FOR_TARGET="${CC_FOR_TARGET}"
-+else
-+ GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
- fi
+@@ -2291,7 +2291,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+@@ -4804,7 +4804,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+@@ -5751,7 +5751,7 @@
+ esac
+ ;;
- if test -n "$with_build_time_tools"; then
- for ncn_progname in gcj; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:4955: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:4961: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -4968,7 +4974,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4972: checking for $ac_word" >&5
-+echo "configure:4978: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4999,7 +5005,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5003: checking for $ac_word" >&5
-+echo "configure:5009: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5037,12 +5043,14 @@
+- freebsd[[12]]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+Index: libgomp/configure
+===================================================================
+--- libgomp/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgomp/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -9317,7 +9317,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -10230,7 +10230,7 @@
+ objformat=`/usr/bin/objformat`
else
- GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
-+else
-+ GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
- fi
-
- if test -n "$with_build_time_tools"; then
- for ncn_progname in gfortran; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5046: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5054: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5059,7 +5067,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5063: checking for $ac_word" >&5
-+echo "configure:5071: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5090,7 +5098,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5094: checking for $ac_word" >&5
-+echo "configure:5102: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5128,6 +5136,8 @@
+@@ -10248,7 +10248,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -13164,7 +13164,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_FC=yes
+ hardcode_minus_L_FC=yes
+@@ -13869,7 +13869,7 @@
+ objformat=`/usr/bin/objformat`
else
- GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
-+else
-+ GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
- fi
+@@ -13887,7 +13887,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libgomp/ChangeLog
+===================================================================
+--- libgomp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgomp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
++
++ * configure: Regenerate.
++
+ 2011-10-26 Release Manager
+ * GCC 4.6.2 released.
+Index: libquadmath/configure
+===================================================================
+--- libquadmath/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libquadmath/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8727,7 +8727,7 @@
+ ;;
-@@ -5197,7 +5207,7 @@
- if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5201: checking for ar in $with_build_time_tools" >&5
-+echo "configure:5211: checking for ar in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/ar; then
- AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
- ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
-@@ -5208,14 +5218,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
- test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
-- ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
-+ test -n "$AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
- # Extract the first word of "ar", so it can be a program name with args.
- set dummy ar; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5219: checking for $ac_word" >&5
-+echo "configure:5229: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5252,7 +5262,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in ar; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5256: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5266: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5269,7 +5279,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5273: checking for $ac_word" >&5
-+echo "configure:5283: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5300,7 +5310,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5304: checking for $ac_word" >&5
-+echo "configure:5314: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5338,6 +5348,8 @@
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9643,7 +9643,7 @@
+ objformat=`/usr/bin/objformat`
else
- AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
-+else
-+ AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
- fi
+@@ -9661,7 +9661,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libquadmath/ChangeLog
+===================================================================
+--- libquadmath/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libquadmath/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
++
++ * configure: Regenerate.
++
+ 2011-10-26 Release Manager
- else
-@@ -5350,7 +5362,7 @@
- if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5354: checking for as in $with_build_time_tools" >&5
-+echo "configure:5366: checking for as in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/as; then
- AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
- ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
-@@ -5361,14 +5373,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
- test $AS_FOR_TARGET=as && AS_FOR_TARGET=
-- ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
-+ test -n "$AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
- # Extract the first word of "as", so it can be a program name with args.
- set dummy as; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5372: checking for $ac_word" >&5
-+echo "configure:5384: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5405,7 +5417,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in as; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5409: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5421: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5422,7 +5434,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5426: checking for $ac_word" >&5
-+echo "configure:5438: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5453,7 +5465,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5457: checking for $ac_word" >&5
-+echo "configure:5469: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5491,6 +5503,8 @@
- else
- AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
- fi
+ * GCC 4.6.2 released.
+Index: gcc/doc/invoke.texi
+===================================================================
+--- gcc/doc/invoke.texi (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/doc/invoke.texi (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -7527,8 +7527,8 @@
+ bodies are read from these ELF sections and instantiated as if they
+ had been part of the same translation unit.
- else
-@@ -5503,7 +5517,7 @@
- if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5507: checking for dlltool in $with_build_time_tools" >&5
-+echo "configure:5521: checking for dlltool in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/dlltool; then
- DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
- ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
-@@ -5514,14 +5528,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
- test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
-- ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
-+ test -n "$DLLTOOL_FOR_TARGET" && ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
- # Extract the first word of "dlltool", so it can be a program name with args.
- set dummy dlltool; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5525: checking for $ac_word" >&5
-+echo "configure:5539: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5558,7 +5572,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in dlltool; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5562: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5576: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5575,7 +5589,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5579: checking for $ac_word" >&5
-+echo "configure:5593: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5606,7 +5620,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5610: checking for $ac_word" >&5
-+echo "configure:5624: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5644,6 +5658,8 @@
- else
- DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
- fi
+-To use the link-timer optimizer, @option{-flto} needs to be specified at
+-compile time and during the final link. For example,
++To use the link-time optimizer, @option{-flto} needs to be specified at
++compile time and during the final link. For example:
- else
-@@ -5656,7 +5672,7 @@
- if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5660: checking for ld in $with_build_time_tools" >&5
-+echo "configure:5676: checking for ld in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/ld; then
- LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
- ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
-@@ -5667,14 +5683,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
- test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
-- ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
-+ test -n "$LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
- # Extract the first word of "ld", so it can be a program name with args.
- set dummy ld; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5678: checking for $ac_word" >&5
-+echo "configure:5694: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5711,7 +5727,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in ld; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5715: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5731: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5728,7 +5744,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5732: checking for $ac_word" >&5
-+echo "configure:5748: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5759,7 +5775,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5763: checking for $ac_word" >&5
-+echo "configure:5779: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5797,6 +5813,8 @@
- else
- LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
- fi
+ @smallexample
+ gcc -c -O2 -flto foo.c
+@@ -7536,25 +7536,25 @@
+ gcc -o myprog -flto -O2 foo.o bar.o
+ @end smallexample
+
+-The first two invocations to GCC will save a bytecode representation
++The first two invocations to GCC save a bytecode representation
+ of GIMPLE into special ELF sections inside @file{foo.o} and
+-@file{bar.o}. The final invocation will read the GIMPLE bytecode from
+-@file{foo.o} and @file{bar.o}, merge the two files into a single
+-internal image, and compile the result as usual. Since both
++@file{bar.o}. The final invocation reads the GIMPLE bytecode from
++@file{foo.o} and @file{bar.o}, merges the two files into a single
++internal image, and compiles the result as usual. Since both
+ @file{foo.o} and @file{bar.o} are merged into a single image, this
+-causes all the inter-procedural analyses and optimizations in GCC to
++causes all the interprocedural analyses and optimizations in GCC to
+ work across the two files as if they were a single one. This means,
+-for example, that the inliner will be able to inline functions in
++for example, that the inliner is able to inline functions in
+ @file{bar.o} into functions in @file{foo.o} and vice-versa.
+
+-Another (simpler) way to enable link-time optimization is,
++Another (simpler) way to enable link-time optimization is:
- else
-@@ -5809,7 +5827,7 @@
- if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5813: checking for lipo in $with_build_time_tools" >&5
-+echo "configure:5831: checking for lipo in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/lipo; then
- LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
- ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
-@@ -5820,14 +5838,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
- test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
-- ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
-+ test -n "$LIPO_FOR_TARGET" && ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
- # Extract the first word of "lipo", so it can be a program name with args.
- set dummy lipo; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5831: checking for $ac_word" >&5
-+echo "configure:5849: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5864,7 +5882,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in lipo; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5868: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:5886: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -5881,7 +5899,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5885: checking for $ac_word" >&5
-+echo "configure:5903: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5912,7 +5930,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5916: checking for $ac_word" >&5
-+echo "configure:5934: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -5950,6 +5968,8 @@
- else
- LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
- fi
+ @smallexample
+ gcc -o myprog -flto -O2 foo.c bar.c
+ @end smallexample
+
+-The above will generate bytecode for @file{foo.c} and @file{bar.c},
+-merge them together into a single GIMPLE representation and optimize
++The above generates bytecode for @file{foo.c} and @file{bar.c},
++merges them together into a single GIMPLE representation and optimizes
+ them as usual to produce @file{myprog}.
+
+ The only important thing to keep in mind is that to enable link-time
+@@ -7564,30 +7564,22 @@
+ To make whole program optimization effective, it is necessary to make
+ certain whole program assumptions. The compiler needs to know
+ what functions and variables can be accessed by libraries and runtime
+-outside of the link time optimized unit. When supported by the linker,
+-the linker plugin (see @option{-fuse-linker-plugin}) passes to the
+-compiler information about used and externally visible symbols. When
++outside of the link-time optimized unit. When supported by the linker,
++the linker plugin (see @option{-fuse-linker-plugin}) passes information
++to the compiler about used and externally visible symbols. When
+ the linker plugin is not available, @option{-fwhole-program} should be
+-used to allow the compiler to make these assumptions, which will lead
++used to allow the compiler to make these assumptions, which leads
+ to more aggressive optimization decisions.
+
+ Note that when a file is compiled with @option{-flto}, the generated
+-object file will be larger than a regular object file because it will
+-contain GIMPLE bytecodes and the usual final code. This means that
+-object files with LTO information can be linked as a normal object
+-file. So, in the previous example, if the final link is done with
++object file is larger than a regular object file because it
++contains GIMPLE bytecodes and the usual final code. This means that
++object files with LTO information can be linked as normal object
++files; if @option{-flto} is not passed to the linker, no
++interprocedural optimizations are applied.
+
+-@smallexample
+-gcc -o myprog foo.o bar.o
+-@end smallexample
+-
+-The only difference will be that no inter-procedural optimizations
+-will be applied to produce @file{myprog}. The two object files
+-@file{foo.o} and @file{bar.o} will be simply sent to the regular
+-linker.
+-
+ Additionally, the optimization flags used to compile individual files
+-are not necessarily related to those used at link-time. For instance,
++are not necessarily related to those used at link time. For instance,
- else
-@@ -5962,7 +5982,7 @@
- if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:5966: checking for nm in $with_build_time_tools" >&5
-+echo "configure:5986: checking for nm in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/nm; then
- NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
- ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
-@@ -5973,14 +5993,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
- test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
-- ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
-+ test -n "$NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
- # Extract the first word of "nm", so it can be a program name with args.
- set dummy nm; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:5984: checking for $ac_word" >&5
-+echo "configure:6004: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6017,7 +6037,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in nm; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6021: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:6041: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -6034,7 +6054,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6038: checking for $ac_word" >&5
-+echo "configure:6058: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6065,7 +6085,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6069: checking for $ac_word" >&5
-+echo "configure:6089: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6103,6 +6123,8 @@
- else
- NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
- fi
+ @smallexample
+ gcc -c -O0 -flto foo.c
+@@ -7595,37 +7587,42 @@
+ gcc -o myprog -flto -O3 foo.o bar.o
+ @end smallexample
+
+-This will produce individual object files with unoptimized assembler
+-code, but the resulting binary @file{myprog} will be optimized at
+-@option{-O3}. Now, if the final binary is generated without
+-@option{-flto}, then @file{myprog} will not be optimized.
++This produces individual object files with unoptimized assembler
++code, but the resulting binary @file{myprog} is optimized at
++@option{-O3}. If, instead, the final binary is generated without
++@option{-flto}, then @file{myprog} is not optimized.
+
+-When producing the final binary with @option{-flto}, GCC will only
+-apply link-time optimizations to those files that contain bytecode.
++When producing the final binary with @option{-flto}, GCC only
++applies link-time optimizations to those files that contain bytecode.
+ Therefore, you can mix and match object files and libraries with
+-GIMPLE bytecodes and final object code. GCC will automatically select
++GIMPLE bytecodes and final object code. GCC automatically selects
+ which files to optimize in LTO mode and which files to link without
+ further processing.
+
+-There are some code generation flags that GCC will preserve when
++There are some code generation flags that GCC preserves when
+ generating bytecodes, as they need to be used during the final link
+ stage. Currently, the following options are saved into the GIMPLE
+ bytecode files: @option{-fPIC}, @option{-fcommon} and all the
+ @option{-m} target flags.
+
+-At link time, these options are read-in and reapplied. Note that the
+-current implementation makes no attempt at recognizing conflicting
+-values for these options. If two or more files have a conflicting
+-value (e.g., one file is compiled with @option{-fPIC} and another
+-isn't), the compiler will simply use the last value read from the
+-bytecode files. It is recommended, then, that all the files
+-participating in the same link be compiled with the same options.
++At link time, these options are read in and reapplied. Note that the
++current implementation makes no attempt to recognize conflicting
++values for these options. If different files have conflicting option
++values (e.g., one file is compiled with @option{-fPIC} and another
++isn't), the compiler simply uses the last value read from the
++bytecode files. It is recommended, then, that you compile all the files
++participating in the same link with the same options.
+
++If LTO encounters objects with C linkage declared with incompatible
++types in separate translation units to be linked together (undefined
++behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
++issued. The behavior is still undefined at runtime.
++
+ Another feature of LTO is that it is possible to apply interprocedural
+ optimizations on files written in different languages. This requires
+-some support in the language front end. Currently, the C, C++ and
++support in the language front end. Currently, the C, C++ and
+ Fortran front ends are capable of emitting GIMPLE bytecodes, so
+-something like this should work
++something like this should work:
- else
-@@ -6115,7 +6137,7 @@
- if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6119: checking for objdump in $with_build_time_tools" >&5
-+echo "configure:6141: checking for objdump in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/objdump; then
- OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
- ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
-@@ -6126,14 +6148,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
- test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
-- ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
-+ test -n "$OBJDUMP_FOR_TARGET" && ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
- # Extract the first word of "objdump", so it can be a program name with args.
- set dummy objdump; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6137: checking for $ac_word" >&5
-+echo "configure:6159: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6170,7 +6192,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in objdump; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6174: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:6196: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -6187,7 +6209,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6191: checking for $ac_word" >&5
-+echo "configure:6213: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6218,7 +6240,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6222: checking for $ac_word" >&5
-+echo "configure:6244: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6256,6 +6278,8 @@
- else
- OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
- fi
+ @smallexample
+ gcc -c -flto foo.c
+@@ -7637,49 +7634,43 @@
+ Notice that the final link is done with @command{g++} to get the C++
+ runtime libraries and @option{-lgfortran} is added to get the Fortran
+ runtime libraries. In general, when mixing languages in LTO mode, you
+-should use the same link command used when mixing languages in a
+-regular (non-LTO) compilation. This means that if your build process
+-was mixing languages before, all you need to add is @option{-flto} to
++should use the same link command options as when mixing languages in a
++regular (non-LTO) compilation; all you need to add is @option{-flto} to
+ all the compile and link commands.
+
+-If LTO encounters objects with C linkage declared with incompatible
+-types in separate translation units to be linked together (undefined
+-behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
+-issued. The behavior is still undefined at runtime.
+-
+ If object files containing GIMPLE bytecode are stored in a library archive, say
+ @file{libfoo.a}, it is possible to extract and use them in an LTO link if you
+-are using a linker with linker plugin support. To enable this feature, use
+-the flag @option{-fuse-linker-plugin} at link-time:
++are using a linker with plugin support. To enable this feature, use
++the flag @option{-fuse-linker-plugin} at link time:
- else
-@@ -6268,7 +6292,7 @@
- if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6272: checking for ranlib in $with_build_time_tools" >&5
-+echo "configure:6296: checking for ranlib in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/ranlib; then
- RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
- ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
-@@ -6279,14 +6303,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
- test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
-- ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
-+ test -n "$RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
- # Extract the first word of "ranlib", so it can be a program name with args.
- set dummy ranlib; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6290: checking for $ac_word" >&5
-+echo "configure:6314: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6323,7 +6347,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in ranlib; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6327: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:6351: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -6340,7 +6364,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6344: checking for $ac_word" >&5
-+echo "configure:6368: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6371,7 +6395,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6375: checking for $ac_word" >&5
-+echo "configure:6399: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6409,6 +6433,8 @@
- else
- RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
- fi
+ @smallexample
+ gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
+ @end smallexample
+
+-With the linker plugin enabled, the linker will extract the needed
+-GIMPLE files from @file{libfoo.a} and pass them on to the running GCC
++With the linker plugin enabled, the linker extracts the needed
++GIMPLE files from @file{libfoo.a} and passes them on to the running GCC
+ to make them part of the aggregated GIMPLE image to be optimized.
+
+-If you are not using a linker with linker plugin support and/or do not
+-enable linker plugin then the objects inside @file{libfoo.a}
+-will be extracted and linked as usual, but they will not participate
++If you are not using a linker with plugin support and/or do not
++enable the linker plugin, then the objects inside @file{libfoo.a}
++are extracted and linked as usual, but they do not participate
+ in the LTO optimization process.
+
+-Link time optimizations do not require the presence of the whole program to
++Link-time optimizations do not require the presence of the whole program to
+ operate. If the program does not require any symbols to be exported, it is
+-possible to combine @option{-flto} and with @option{-fwhole-program} to allow
++possible to combine @option{-flto} and @option{-fwhole-program} to allow
+ the interprocedural optimizers to use more aggressive assumptions which may
+ lead to improved optimization opportunities.
+ Use of @option{-fwhole-program} is not needed when linker plugin is
+ active (see @option{-fuse-linker-plugin}).
+
+-Regarding portability: the current implementation of LTO makes no
+-attempt at generating bytecode that can be ported between different
++The current implementation of LTO makes no
++attempt to generate bytecode that is portable between different
+ types of hosts. The bytecode files are versioned and there is a
+ strict version check, so bytecode files generated in one version of
+ GCC will not work with an older/newer version of GCC.
+
+-Link time optimization does not play well with generating debugging
++Link-time optimization does not work well with generation of debugging
+ information. Combining @option{-flto} with
+ @option{-g} is currently experimental and expected to produce wrong
+ results.
+@@ -7693,15 +7684,15 @@
+ You can also specify @option{-flto=jobserver} to use GNU make's
+ job server mode to determine the number of parallel jobs. This
+ is useful when the Makefile calling GCC is already executing in parallel.
+-The parent Makefile will need a @samp{+} prepended to the command recipe
+-for this to work. This will likely only work if @env{MAKE} is
++You must prepend a @samp{+} to the command recipe in the parent Makefile
++for this to work. This option likely only works if @env{MAKE} is
+ GNU make.
+
+ This option is disabled by default.
+
+ @item -flto-partition=@var{alg}
+ @opindex flto-partition
+-Specify the partitioning algorithm used by the link time optimizer.
++Specify the partitioning algorithm used by the link-time optimizer.
+ The value is either @code{1to1} to specify a partitioning mirroring
+ the original source files or @code{balanced} to specify partitioning
+ into equally sized chunks (whenever possible). Specifying @code{none}
+@@ -7718,27 +7709,29 @@
+
+ @item -flto-report
+ Prints a report with internal details on the workings of the link-time
+-optimizer. The contents of this report vary from version to version,
+-it is meant to be useful to GCC developers when processing object
++optimizer. The contents of this report vary from version to version.
++It is meant to be useful to GCC developers when processing object
+ files in LTO mode (via @option{-flto}).
+
+ Disabled by default.
+
+ @item -fuse-linker-plugin
+-Enables the use of linker plugin during link time optimization. This option
+-relies on the linker plugin support in linker that is available in gold
++Enables the use of a linker plugin during link-time optimization. This
++option relies on the linker plugin support in linker that is available in gold
+ or in GNU ld 2.21 or newer.
+
+-This option enables the extraction of object files with GIMPLE bytecode out of
+-library archives. This improves the quality of optimization by exposing more
+-code the the link time optimizer. This information specify what symbols
+-can be accessed externally (by non-LTO object or during dynamic linking).
+-Resulting code quality improvements on binaries (and shared libraries that do
+-use hidden visibility) is similar to @code{-fwhole-program}. See
+-@option{-flto} for a description on the effect of this flag and how to use it.
++This option enables the extraction of object files with GIMPLE bytecode out
++of library archives. This improves the quality of optimization by exposing
++more code to the link-time optimizer. This information specifies what
++symbols can be accessed externally (by non-LTO object or during dynamic
++linking). Resulting code quality improvements on binaries (and shared
++libraries that use hidden visibility) are similar to @code{-fwhole-program}.
++See @option{-flto} for a description of the effect of this flag and how to
++use it.
+
+-Enabled by default when LTO support in GCC is enabled and GCC was compiled
+-with a linker supporting plugins (GNU ld 2.21 or newer or gold).
++This option is enabled by default when LTO support in GCC is enabled
++and GCC was configured for use with
++a linker supporting plugins (GNU ld 2.21 or newer or gold).
+
+ @item -fcompare-elim
+ @opindex fcompare-elim
+Index: gcc/c-family/ChangeLog
+===================================================================
+--- gcc/c-family/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-family/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,15 @@
++2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
++
++ PR c++/50608
++ * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
++ (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
++ <INDIRECT_REF>: Return the argument.
++ <ARRAY_REF>: Remove special code for negative offset.
++ Call fold_build_pointer_plus instead of size_binop.
++ (fold_offsetof): Remove STOP_REF argument and adjust.
++ * c-common.h (fold_offsetof_1): Declare.
++ (fold_offsetof): Remove STOP_REF argument.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: gcc/c-family/c-common.c
+===================================================================
+--- gcc/c-family/c-common.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-family/c-common.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1236,13 +1236,7 @@
+ && (op1 = get_base_address (op0)) != NULL_TREE
+ && TREE_CODE (op1) == INDIRECT_REF
+ && TREE_CONSTANT (TREE_OPERAND (op1, 0)))
+- {
+- tree offset = fold_offsetof (op0, op1);
+- op1
+- = fold_convert_loc (loc, TREE_TYPE (expr), TREE_OPERAND (op1, 0));
+- ret = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (expr), op1,
+- offset);
+- }
++ ret = fold_convert_loc (loc, TREE_TYPE (expr), fold_offsetof_1 (op0));
+ else if (op0 != orig_op0 || in_init)
+ ret = in_init
+ ? fold_build1_initializer_loc (loc, code, TREE_TYPE (expr), op0)
+@@ -8459,20 +8453,15 @@
+ return uc;
+ }
- else
-@@ -6421,7 +6447,7 @@
- if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6425: checking for strip in $with_build_time_tools" >&5
-+echo "configure:6451: checking for strip in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/strip; then
- STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
- ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
-@@ -6432,14 +6458,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
- test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
-- ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
-+ test -n "$STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
- # Extract the first word of "strip", so it can be a program name with args.
- set dummy strip; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6443: checking for $ac_word" >&5
-+echo "configure:6469: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6476,7 +6502,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in strip; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6480: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:6506: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -6493,7 +6519,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6497: checking for $ac_word" >&5
-+echo "configure:6523: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6524,7 +6550,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6528: checking for $ac_word" >&5
-+echo "configure:6554: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6562,6 +6588,8 @@
- else
- STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
- fi
+-/* Build the result of __builtin_offsetof. EXPR is a nested sequence of
+- component references, with STOP_REF, or alternatively an INDIRECT_REF of
+- NULL, at the bottom; much like the traditional rendering of offsetof as a
+- macro. Returns the folded and properly cast result. */
++/* Fold an offsetof-like expression. EXPR is a nested sequence of component
++ references with an INDIRECT_REF of a constant at the bottom; much like the
++ traditional rendering of offsetof as a macro. Return the folded result. */
+
+-static tree
+-fold_offsetof_1 (tree expr, tree stop_ref)
++tree
++fold_offsetof_1 (tree expr)
+ {
+- enum tree_code code = PLUS_EXPR;
+ tree base, off, t;
- else
-@@ -6574,7 +6602,7 @@
- if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6578: checking for windres in $with_build_time_tools" >&5
-+echo "configure:6606: checking for windres in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/windres; then
- WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
- ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
-@@ -6585,14 +6613,14 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
- test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
-- ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
-+ test -n "$WINDRES_FOR_TARGET" && ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
- fi
- fi
- if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
- # Extract the first word of "windres", so it can be a program name with args.
- set dummy windres; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6596: checking for $ac_word" >&5
-+echo "configure:6624: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6629,7 +6657,7 @@
- if test -n "$with_build_time_tools"; then
- for ncn_progname in windres; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
--echo "configure:6633: checking for ${ncn_progname} in $with_build_time_tools" >&5
-+echo "configure:6661: checking for ${ncn_progname} in $with_build_time_tools" >&5
- if test -x $with_build_time_tools/${ncn_progname}; then
- ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
-@@ -6646,7 +6674,7 @@
- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6650: checking for $ac_word" >&5
-+echo "configure:6678: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6677,7 +6705,7 @@
- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
- set dummy ${ncn_progname}; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:6681: checking for $ac_word" >&5
-+echo "configure:6709: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -6715,6 +6743,8 @@
- else
- WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
- fi
-+else
-+ WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
- fi
+- if (expr == stop_ref && TREE_CODE (expr) != ERROR_MARK)
+- return size_zero_node;
+-
+ switch (TREE_CODE (expr))
+ {
+ case ERROR_MARK:
+@@ -8489,15 +8478,15 @@
- else
-@@ -6725,7 +6755,7 @@
- RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-
- echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
--echo "configure:6729: checking where to find the target ar" >&5
-+echo "configure:6759: checking where to find the target ar" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6758,7 +6788,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
--echo "configure:6762: checking where to find the target as" >&5
-+echo "configure:6792: checking where to find the target as" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6791,7 +6821,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
--echo "configure:6795: checking where to find the target cc" >&5
-+echo "configure:6825: checking where to find the target cc" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6824,7 +6854,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
--echo "configure:6828: checking where to find the target c++" >&5
-+echo "configure:6858: checking where to find the target c++" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6860,7 +6890,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
--echo "configure:6864: checking where to find the target c++ for libstdc++" >&5
-+echo "configure:6894: checking where to find the target c++ for libstdc++" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6896,7 +6926,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
--echo "configure:6900: checking where to find the target dlltool" >&5
-+echo "configure:6930: checking where to find the target dlltool" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6929,7 +6959,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
--echo "configure:6933: checking where to find the target gcc" >&5
-+echo "configure:6963: checking where to find the target gcc" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6962,7 +6992,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
--echo "configure:6966: checking where to find the target gcj" >&5
-+echo "configure:6996: checking where to find the target gcj" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -6998,7 +7028,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
--echo "configure:7002: checking where to find the target gfortran" >&5
-+echo "configure:7032: checking where to find the target gfortran" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7034,7 +7064,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
--echo "configure:7038: checking where to find the target ld" >&5
-+echo "configure:7068: checking where to find the target ld" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7067,7 +7097,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
--echo "configure:7071: checking where to find the target lipo" >&5
-+echo "configure:7101: checking where to find the target lipo" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7090,7 +7120,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
--echo "configure:7094: checking where to find the target nm" >&5
-+echo "configure:7124: checking where to find the target nm" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7123,7 +7153,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
--echo "configure:7127: checking where to find the target objdump" >&5
-+echo "configure:7157: checking where to find the target objdump" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7156,7 +7186,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
--echo "configure:7160: checking where to find the target ranlib" >&5
-+echo "configure:7190: checking where to find the target ranlib" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7189,7 +7219,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
--echo "configure:7193: checking where to find the target strip" >&5
-+echo "configure:7223: checking where to find the target strip" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7222,7 +7252,7 @@
- fi
- fi
- echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
--echo "configure:7226: checking where to find the target windres" >&5
-+echo "configure:7256: checking where to find the target windres" >&5
- if test "x${build}" != "x${host}" ; then
- if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
- # We already found the complete path
-@@ -7283,7 +7313,7 @@
-
-
- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
--echo "configure:7287: checking whether to enable maintainer-specific portions of Makefiles" >&5
-+echo "configure:7317: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
- if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
-@@ -7332,16 +7362,22 @@
- # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
- CFLAGS="$CFLAGS -fkeep-inline-functions"
- echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
--echo "configure:7336: checking whether -fkeep-inline-functions is supported" >&5
-+echo "configure:7366: checking whether -fkeep-inline-functions is supported" >&5
- cat > conftest.$ac_ext <<EOF
--#line 7338 "configure"
-+#line 7368 "configure"
- #include "confdefs.h"
+ case NOP_EXPR:
+ case INDIRECT_REF:
+- if (!integer_zerop (TREE_OPERAND (expr, 0)))
++ if (!TREE_CONSTANT (TREE_OPERAND (expr, 0)))
+ {
+ error ("cannot apply %<offsetof%> to a non constant address");
+ return error_mark_node;
+ }
+- return size_zero_node;
++ return TREE_OPERAND (expr, 0);
-+#if (__GNUC__ < 3) \
-+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
-+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
-+#error http://gcc.gnu.org/PR29382
-+#endif
-+
- int main() {
-
- ; return 0; }
- EOF
--if { (eval echo configure:7345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:7381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
- else
-Index: libgomp/ChangeLog
-===================================================================
---- libgomp/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgomp/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,10 @@
-+2007-06-21 Jakub Jelinek <jakub@redhat.com>
+ case COMPONENT_REF:
+- base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);
++ base = fold_offsetof_1 (TREE_OPERAND (expr, 0));
+ if (base == error_mark_node)
+ return base;
+
+@@ -8515,21 +8504,14 @@
+ break;
+
+ case ARRAY_REF:
+- base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);
++ base = fold_offsetof_1 (TREE_OPERAND (expr, 0));
+ if (base == error_mark_node)
+ return base;
+
+ t = TREE_OPERAND (expr, 1);
+- if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) < 0)
+- {
+- code = MINUS_EXPR;
+- t = fold_build1_loc (input_location, NEGATE_EXPR, TREE_TYPE (t), t);
+- }
+- t = convert (sizetype, t);
+- off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t);
+
+ /* Check if the offset goes beyond the upper bound of the array. */
+- if (code == PLUS_EXPR && TREE_CODE (t) == INTEGER_CST)
++ if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) >= 0)
+ {
+ tree upbound = array_ref_up_bound (expr);
+ if (upbound != NULL_TREE
+@@ -8569,26 +8551,30 @@
+ }
+ }
+ }
+
-+ PR middle-end/32362
-+ * testsuite/libgomp.c/pr32362-1.c: New test.
-+ * testsuite/libgomp.c/pr32362-2.c: New test.
-+ * testsuite/libgomp.c/pr32362-3.c: New test.
++ t = convert (sizetype, t);
++ off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t);
+ break;
+
+ case COMPOUND_EXPR:
+ /* Handle static members of volatile structs. */
+ t = TREE_OPERAND (expr, 1);
+ gcc_assert (TREE_CODE (t) == VAR_DECL);
+- return fold_offsetof_1 (t, stop_ref);
++ return fold_offsetof_1 (t);
+
+ default:
+ gcc_unreachable ();
+ }
+
+- return size_binop (code, base, off);
++ return fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (base), base, off);
+ }
+
++/* Likewise, but convert it to the return type of offsetof. */
+
- 2007-05-13 Release Manager
+ tree
+-fold_offsetof (tree expr, tree stop_ref)
++fold_offsetof (tree expr)
+ {
+- /* Convert back from the internal sizetype to size_t. */
+- return convert (size_type_node, fold_offsetof_1 (expr, stop_ref));
++ return convert (size_type_node, fold_offsetof_1 (expr));
+ }
- * GCC 4.2.0 released.
-Index: libgomp/testsuite/libgomp.c/pr32362-1.c
+ /* Warn for A ?: C expressions (with B omitted) where A is a boolean
+Index: gcc/c-family/c-common.h
===================================================================
---- libgomp/testsuite/libgomp.c/pr32362-1.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ libgomp/testsuite/libgomp.c/pr32362-1.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,32 @@
-+/* PR middle-end/32362 */
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+#include <omp.h>
-+#include <stdlib.h>
+--- gcc/c-family/c-common.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-family/c-common.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -916,7 +916,8 @@
+
+ extern void verify_sequence_points (tree);
+
+-extern tree fold_offsetof (tree, tree);
++extern tree fold_offsetof_1 (tree);
++extern tree fold_offsetof (tree);
+
+ /* Places where an lvalue, or modifiable lvalue, may be required.
+ Used to select diagnostic messages in lvalue_error and
+Index: gcc/tree-loop-distribution.c
+===================================================================
+--- gcc/tree-loop-distribution.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-loop-distribution.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -63,6 +63,51 @@
+ predecessor a node that writes to memory. */
+ static bitmap upstream_mem_writes;
+
++/* Returns true when DEF is an SSA_NAME defined in LOOP and used after
++ the LOOP. */
+
-+int
-+main ()
++static bool
++ssa_name_has_uses_outside_loop_p (tree def, loop_p loop)
+{
-+ int n[4] = { -1, -1, -1, -1 };
-+ static int a = 2, b = 4;
-+ omp_set_num_threads (4);
-+ omp_set_dynamic (0);
-+ omp_set_nested (1);
-+#pragma omp parallel private(b)
-+ {
-+ b = omp_get_thread_num ();
-+#pragma omp parallel firstprivate(a)
-+ {
-+ a = (omp_get_thread_num () + a) + 1;
-+ if (b == omp_get_thread_num ())
-+ n[omp_get_thread_num ()] = a + (b << 4);
-+ }
-+ }
-+ if (n[0] != 3)
-+ abort ();
-+ if (n[3] != -1
-+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
-+ abort ();
-+ return 0;
-+}
-Index: libgomp/testsuite/libgomp.c/pr32362-3.c
-===================================================================
---- libgomp/testsuite/libgomp.c/pr32362-3.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ libgomp/testsuite/libgomp.c/pr32362-3.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,34 @@
-+/* PR middle-end/32362 */
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
++ imm_use_iterator imm_iter;
++ use_operand_p use_p;
+
-+#include <omp.h>
-+#include <stdlib.h>
++ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def)
++ if (loop != loop_containing_stmt (USE_STMT (use_p)))
++ return true;
+
-+int a = 2;
++ return false;
++}
+
-+int
-+main ()
++/* Returns true when STMT defines a scalar variable used after the
++ loop. */
++
++static bool
++stmt_has_scalar_dependences_outside_loop (gimple stmt)
+{
-+ int n[4] = { -1, -1, -1, -1 };
-+ int b = 4;
-+ omp_set_num_threads (4);
-+ omp_set_dynamic (0);
-+ omp_set_nested (1);
-+#pragma omp parallel private(b)
-+ {
-+ b = omp_get_thread_num ();
-+#pragma omp parallel firstprivate(a)
++ tree name;
++
++ switch (gimple_code (stmt))
+ {
-+ a = (omp_get_thread_num () + a) + 1;
-+ if (b == omp_get_thread_num ())
-+ n[omp_get_thread_num ()] = a + (b << 4);
-+ }
-+ }
-+ if (n[0] != 3)
-+ abort ();
-+ if (n[3] != -1
-+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
-+ abort ();
-+ return 0;
-+}
-Index: libgomp/testsuite/libgomp.c/pr32362-2.c
-===================================================================
---- libgomp/testsuite/libgomp.c/pr32362-2.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ libgomp/testsuite/libgomp.c/pr32362-2.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,33 @@
-+/* PR middle-end/32362 */
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+#include <omp.h>
-+#include <stdlib.h>
++ case GIMPLE_CALL:
++ case GIMPLE_ASSIGN:
++ name = gimple_get_lhs (stmt);
++ break;
+
-+int a = 2, b = 4;
++ case GIMPLE_PHI:
++ name = gimple_phi_result (stmt);
++ break;
+
-+int
-+main ()
-+{
-+ int n[4] = { -1, -1, -1, -1 };
-+ omp_set_num_threads (4);
-+ omp_set_dynamic (0);
-+ omp_set_nested (1);
-+#pragma omp parallel private(b)
-+ {
-+ b = omp_get_thread_num ();
-+#pragma omp parallel firstprivate(a)
-+ {
-+ a = (omp_get_thread_num () + a) + 1;
-+ if (b == omp_get_thread_num ())
-+ n[omp_get_thread_num ()] = a + (b << 4);
++ default:
++ return false;
+ }
-+ }
-+ if (n[0] != 3)
-+ abort ();
-+ if (n[3] != -1
-+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
-+ abort ();
-+ return 0;
++
++ return (name
++ && TREE_CODE (name) == SSA_NAME
++ && ssa_name_has_uses_outside_loop_p (name,
++ loop_containing_stmt (stmt)));
+}
-Index: gcc/tree-vrp.c
-===================================================================
---- gcc/tree-vrp.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/tree-vrp.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -195,7 +195,28 @@
- || operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0)));
- }
-
-+/* If VAL is now an overflow infinity, return VAL. Otherwise, return
-+ the same value with TREE_OVERFLOW clear. This can be used to avoid
-+ confusing a regular value with an overflow value. */
++
+ /* Update the PHI nodes of NEW_LOOP. NEW_LOOP is a duplicate of
+ ORIG_LOOP. */
-+static inline tree
-+avoid_overflow_infinity (tree val)
-+{
-+ if (!is_overflow_infinity (val))
-+ return val;
+@@ -332,10 +377,18 @@
+ {
+ gimple stmt = gsi_stmt (bsi);
+
+- if (gimple_code (stmt) != GIMPLE_LABEL
+- && !is_gimple_debug (stmt)
+- && bitmap_bit_p (partition, x++)
+- && is_gimple_assign (stmt)
++ if (gimple_code (stmt) == GIMPLE_LABEL
++ || is_gimple_debug (stmt))
++ continue;
+
-+ if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
-+ return TYPE_MAX_VALUE (TREE_TYPE (val));
-+ else
-+ {
-+#ifdef ENABLE_CHECKING
-+ gcc_assert (operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
-+#endif
-+ return TYPE_MIN_VALUE (TREE_TYPE (val));
-+ }
-+}
++ if (!bitmap_bit_p (partition, x++))
++ continue;
+
++ /* If the stmt has uses outside of the loop fail. */
++ if (stmt_has_scalar_dependences_outside_loop (stmt))
++ goto end;
+
- /* Return whether VAL is equal to the maximum value of its type. This
- will be true for a positive overflow infinity. We can't do a
- simple equality comparison with TYPE_MAX_VALUE because C typedefs
-@@ -351,23 +372,11 @@
- infinity when we shouldn't. */
++ if (is_gimple_assign (stmt)
+ && !is_gimple_reg (gimple_assign_lhs (stmt)))
+ {
+ /* Don't generate the builtins when there are more than
+@@ -826,48 +879,6 @@
+ }
+ }
- static inline void
--set_value_range_to_value (value_range_t *vr, tree val)
-+set_value_range_to_value (value_range_t *vr, tree val, bitmap equiv)
- {
- gcc_assert (is_gimple_min_invariant (val));
-- if (is_overflow_infinity (val))
+-/* Returns true when DEF is an SSA_NAME defined in LOOP and used after
+- the LOOP. */
+-
+-static bool
+-ssa_name_has_uses_outside_loop_p (tree def, loop_p loop)
+-{
+- imm_use_iterator imm_iter;
+- use_operand_p use_p;
+-
+- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, def)
+- if (loop != loop_containing_stmt (USE_STMT (use_p)))
+- return true;
+-
+- return false;
+-}
+-
+-/* Returns true when STMT defines a scalar variable used after the
+- loop. */
+-
+-static bool
+-stmt_has_scalar_dependences_outside_loop (gimple stmt)
+-{
+- tree name;
+-
+- switch (gimple_code (stmt))
- {
-- if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
-- val = TYPE_MAX_VALUE (TREE_TYPE (val));
-- else
-- {
--#ifdef ENABLE_CHECKING
-- gcc_assert (operand_equal_p (val,
-- TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
--#endif
-- val = TYPE_MIN_VALUE (TREE_TYPE (val));
-- }
+- case GIMPLE_ASSIGN:
+- name = gimple_assign_lhs (stmt);
+- break;
+-
+- case GIMPLE_PHI:
+- name = gimple_phi_result (stmt);
+- break;
+-
+- default:
+- return false;
- }
-- set_value_range (vr, VR_RANGE, val, val, NULL);
-+ val = avoid_overflow_infinity (val);
-+ set_value_range (vr, VR_RANGE, val, val, equiv);
- }
+-
+- return TREE_CODE (name) == SSA_NAME
+- && ssa_name_has_uses_outside_loop_p (name, loop_containing_stmt (stmt));
+-}
+-
+ /* Returns true when STMT will be code generated in a partition of RDG
+ different than PART and that will not be code generated as a
+ builtin. */
+Index: gcc/java/ChangeLog
+===================================================================
+--- gcc/java/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/java/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,8 @@
++2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
++
++ * lang.c (java_init_options_struct): Set
++ frontend_set_flag_trapping_math.
++
+ 2011-10-26 Release Manager
- /* Set value range VR to a non-negative range of type TYPE.
-@@ -411,8 +420,7 @@
- static inline void
- set_value_range_to_null (value_range_t *vr, tree type)
- {
-- tree zero = build_int_cst (type, 0);
-- set_value_range (vr, VR_RANGE, zero, zero, vr->equiv);
-+ set_value_range_to_value (vr, build_int_cst (type, 0), vr->equiv);
- }
+ * GCC 4.6.2 released.
+Index: gcc/java/lang.c
+===================================================================
+--- gcc/java/lang.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/java/lang.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,6 +1,6 @@
+ /* Java(TM) language-specific utility routines.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+- 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
++ 2005, 2006, 2007, 2008, 2010, 2012 Free Software Foundation, Inc.
+ This file is part of GCC.
-@@ -763,7 +771,9 @@
- if (!TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (val1)))
- return -2;
+@@ -550,6 +550,7 @@
-- if (strict_overflow_p != NULL)
-+ if (strict_overflow_p != NULL
-+ && (code1 == SSA_NAME || !TREE_NO_WARNING (val1))
-+ && (code2 == SSA_NAME || !TREE_NO_WARNING (val2)))
- *strict_overflow_p = true;
+ /* In Java floating point operations never trap. */
+ opts->x_flag_trapping_math = 0;
++ opts->frontend_set_flag_trapping_math = true;
- if (code1 == SSA_NAME)
-@@ -1028,6 +1038,8 @@
- cond_code = swap_tree_comparison (TREE_CODE (cond));
- }
+ /* In Java arithmetic overflow always wraps around. */
+ opts->x_flag_wrapv = 1;
+Index: gcc/DATESTAMP
+===================================================================
+--- gcc/DATESTAMP (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/DATESTAMP (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1 +1 @@
+-20111026
++20120201
+Index: gcc/configure
+===================================================================
+--- gcc/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -7442,17 +7442,7 @@
+ RANLIB="$ac_cv_prog_RANLIB"
+ fi
-+ limit = avoid_overflow_infinity (limit);
-+
- type = TREE_TYPE (limit);
- gcc_assert (limit != var);
+-case "${host}" in
+-*-*-darwin*)
+- # By default, the Darwin ranlib will not treat common symbols as
+- # definitions when building the archive table of contents. Other
+- # ranlibs do that; pass an option to the Darwin ranlib that makes
+- # it behave similarly.
+- ranlib_flags="-c"
+- ;;
+-*)
+- ranlib_flags=""
+-esac
++ranlib_flags=""
+
+
+ # Find a good install program. We prefer a C program (faster),
+@@ -15740,7 +15730,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -16653,7 +16643,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -16671,7 +16661,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -17505,7 +17495,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17508 "configure"
++#line 17498 "configure"
+ #include "confdefs.h"
-@@ -1167,6 +1179,8 @@
- {
- tree one = build_int_cst (type, 1);
- max = fold_build2 (MINUS_EXPR, type, max, one);
-+ if (EXPR_P (max))
-+ TREE_NO_WARNING (max) = 1;
- }
+ #if HAVE_DLFCN_H
+@@ -17611,7 +17601,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17614 "configure"
++#line 17604 "configure"
+ #include "confdefs.h"
- set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
-@@ -1200,6 +1214,8 @@
- {
- tree one = build_int_cst (type, 1);
- min = fold_build2 (PLUS_EXPR, type, min, one);
-+ if (EXPR_P (min))
-+ TREE_NO_WARNING (min) = 1;
- }
+ #if HAVE_DLFCN_H
+@@ -18537,7 +18527,7 @@
+ esac
+ ;;
- set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
-@@ -1619,7 +1635,7 @@
- if (TREE_CODE (op0) == SSA_NAME)
- vr0 = *(get_value_range (op0));
- else if (is_gimple_min_invariant (op0))
-- set_value_range_to_value (&vr0, op0);
-+ set_value_range_to_value (&vr0, op0, NULL);
- else
- set_value_range_to_varying (&vr0);
-
-@@ -1627,7 +1643,7 @@
- if (TREE_CODE (op1) == SSA_NAME)
- vr1 = *(get_value_range (op1));
- else if (is_gimple_min_invariant (op1))
-- set_value_range_to_value (&vr1, op1);
-+ set_value_range_to_value (&vr1, op1, NULL);
- else
- set_value_range_to_varying (&vr1);
-
-@@ -2006,7 +2022,7 @@
- if (TREE_CODE (op0) == SSA_NAME)
- vr0 = *(get_value_range (op0));
- else if (is_gimple_min_invariant (op0))
-- set_value_range_to_value (&vr0, op0);
-+ set_value_range_to_value (&vr0, op0, NULL);
- else
- set_value_range_to_varying (&vr0);
-
-@@ -2091,6 +2107,8 @@
- && is_gimple_val (new_max)
- && tree_int_cst_equal (new_min, orig_min)
- && tree_int_cst_equal (new_max, orig_max)
-+ && (!is_overflow_infinity (new_min)
-+ || !is_overflow_infinity (new_max))
- && compare_values (new_min, new_max) <= 0
- && compare_values (new_min, new_max) >= -1)
- {
-@@ -2393,7 +2411,10 @@
- its type may be different from _Bool. Convert VAL to EXPR's
- type. */
- val = fold_convert (TREE_TYPE (expr), val);
-- set_value_range (vr, VR_RANGE, val, val, vr->equiv);
-+ if (is_gimple_min_invariant (val))
-+ set_value_range_to_value (vr, val, vr->equiv);
-+ else
-+ set_value_range (vr, VR_RANGE, val, val, vr->equiv);
- }
- else
- set_value_range_to_varying (vr);
-@@ -2424,7 +2445,7 @@
- else if (TREE_CODE_CLASS (code) == tcc_comparison)
- extract_range_from_comparison (vr, expr);
- else if (is_gimple_min_invariant (expr))
-- set_value_range_to_value (vr, expr);
-+ set_value_range_to_value (vr, expr, NULL);
+- freebsd[12]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+@@ -20312,7 +20302,7 @@
+ objformat=`/usr/bin/objformat`
else
- set_value_range_to_varying (vr);
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -20330,7 +20320,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: gcc/objc/objc-next-runtime-abi-01.c
+===================================================================
+--- gcc/objc/objc-next-runtime-abi-01.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/objc/objc-next-runtime-abi-01.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2871,12 +2871,15 @@
+ return eh_id;
+ }
-@@ -2545,6 +2566,13 @@
- if (compare_values (min, max) == 1)
- return;
- }
++/* For NeXT ABI 0 and 1, the personality routines are just those of the
++ underlying language. */
+
-+ /* According to the loop information, the variable does not
-+ overflow. If we think it does, probably because of an
-+ overflow due to arithmetic on a different INF value,
-+ reset now. */
-+ if (is_negative_overflow_infinity (min))
-+ min = tmin;
- }
- else
- {
-@@ -2557,13 +2585,62 @@
- if (compare_values (min, max) == 1)
- return;
- }
+ static tree
+ objc_eh_personality (void)
+ {
+ if (!objc_eh_personality_decl)
+ #ifndef OBJCPLUS
+- objc_eh_personality_decl = build_personality_function ("objc");
++ objc_eh_personality_decl = build_personality_function ("gcc");
+ #else
+ objc_eh_personality_decl = build_personality_function ("gxx");
+ #endif
+Index: gcc/objc/objc-act.c
+===================================================================
+--- gcc/objc/objc-act.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/objc/objc-act.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3136,9 +3136,8 @@
+ struct string_descriptor *desc, key;
+ void **loc;
+
+- /* Prep the string argument. */
+- string = fix_string_type (string);
+- TREE_SET_CODE (string, STRING_CST);
++ /* We should be passed a STRING_CST. */
++ gcc_checking_assert (TREE_CODE (string) == STRING_CST);
+ length = TREE_STRING_LENGTH (string) - 1;
+
+ /* The target may have different ideas on how to construct an ObjC string
+Index: gcc/objc/ChangeLog
+===================================================================
+--- gcc/objc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/objc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,18 @@
++2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
++
++ Backport from mainline
++ 2011-10-29 Iain Sandoe <iains@gcc.gnu.org>
++
++ PR target/47997
++ * objc-act.c (objc_build_string_object): Remove redundant second
++ call to fix_string_type (). Add a checking assert that we are,
++ indeed, passed a STRING_CST.
+
-+ if (is_positive_overflow_infinity (max))
-+ max = tmax;
- }
-
- set_value_range (vr, VR_RANGE, min, max, vr->equiv);
- }
- }
++2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
++
++ * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
++ for Objective-C m32.
++
+ 2011-10-26 Release Manager
-+/* Return true if VAR may overflow at STMT. This checks any available
-+ loop information to see if we can determine that VAR does not
-+ overflow. */
+ * GCC 4.6.2 released.
+Index: gcc/reorg.c
+===================================================================
+--- gcc/reorg.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/reorg.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3554,9 +3554,11 @@
+ }
+ }
-+static bool
-+vrp_var_may_overflow (tree var, tree stmt)
-+{
-+ struct loop *l;
-+ tree chrec, init, step;
++ /* See if we have a simple (conditional) jump that is useless. */
+ if (! INSN_ANNULLED_BRANCH_P (delay_insn)
++ && ! condjump_in_parallel_p (delay_insn)
+ && prev_active_insn (target_label) == insn
+- && ! condjump_in_parallel_p (delay_insn)
++ && ! BARRIER_P (prev_nonnote_insn (target_label))
+ #ifdef HAVE_cc0
+ /* If the last insn in the delay slot sets CC0 for some insn,
+ various code assumes that it is in a delay slot. We could
+Index: gcc/DEV-PHASE
+===================================================================
+--- gcc/DEV-PHASE (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1 @@
++prerelease
+Index: gcc/tree-ssa-sccvn.c
+===================================================================
+--- gcc/tree-ssa-sccvn.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-ssa-sccvn.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -546,6 +546,7 @@
+ tem1.type = TREE_TYPE (tem1.op0);
+ tem1.opcode = TREE_CODE (tem1.op0);
+ vro1 = &tem1;
++ deref1 = false;
+ }
+ if (deref2 && vro2->opcode == ADDR_EXPR)
+ {
+@@ -554,7 +555,10 @@
+ tem2.type = TREE_TYPE (tem2.op0);
+ tem2.opcode = TREE_CODE (tem2.op0);
+ vro2 = &tem2;
++ deref2 = false;
+ }
++ if (deref1 != deref2)
++ return false;
+ if (!vn_reference_op_eq (vro1, vro2))
+ return false;
+ ++j;
+Index: gcc/ChangeLog
+===================================================================
+--- gcc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,653 @@
++2012-01-31 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
-+ if (current_loops == NULL)
-+ return true;
++ Backport from mainline.
++ 2011-01-31 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
-+ l = loop_containing_stmt (stmt);
-+ if (l == NULL)
-+ return true;
++ config/arm/thumb2.md (thumb2_mov_notscc): Use MVN for true
++ condition.
+
-+ chrec = instantiate_parameters (l, analyze_scalar_evolution (l, var));
-+ if (TREE_CODE (chrec) != POLYNOMIAL_CHREC)
-+ return true;
++2012-01-31 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
-+ init = initial_condition_in_loop_num (chrec, l->num);
-+ step = evolution_part_in_loop_num (chrec, l->num);
++ * config/s390/s390.md ("*ashr<mode>3_and"): Add missing z196 flag
++ to srak instruction.
+
-+ if (step == NULL_TREE
-+ || !is_gimple_min_invariant (step)
-+ || !valid_value_p (init))
-+ return true;
++2012-01-30 Bin Cheng <bin.cheng@arm.com>
+
-+ /* If we get here, we know something useful about VAR based on the
-+ loop information. If it wraps, it may overflow. */
++ Backport from mainline.
++ 2012-01-30 Bin Cheng <bin.cheng@arm.com>
+
-+ if (scev_probably_wraps_p (init, step, stmt,
-+ current_loops->parray[CHREC_VARIABLE (chrec)],
-+ true))
-+ return true;
++ PR target/51835
++ * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI
++ for __aeabi_d2iz/__aeabi_d2uiz with hard-float.
+
-+ if (dump_file && (dump_flags & TDF_DETAILS) != 0)
-+ {
-+ print_generic_expr (dump_file, var, 0);
-+ fprintf (dump_file, ": loop information indicates does not overflow\n");
-+ }
++2012-01-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
-+ return false;
-+}
++ Backport from mainline.
++ 2012-01-20 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
++ PR target/50313
++ * config/arm/arm.c (arm_load_pic_register): Use
++ gen_pic_load_addr_unified. Delete calls to gen_pic_load_addr_32bit
++ , gen_pic_add_dot_plus_eight and gen_pic_add_dot_plus_four.
++ (arm_pic_static_addr): Likewise.
++ (arm_rtx_costs_1): Adjust cost for UNSPEC_PIC_UNIFIED.
++ (arm_note_pic_base): Handle UNSPEC_PIC_UNIFIED.
++ * config/arm/arm.md (UNSPEC_PIC_UNIFIED): Define.
++ (pic_load_addr_unified): New.
+
- /* Given two numeric value ranges VR0, VR1 and a comparison code COMP:
-
- - Return BOOLEAN_TRUE_NODE if VR0 COMP VR1 always returns true for
-@@ -4156,7 +4233,7 @@
- t = retval = NULL_TREE;
- EXECUTE_IF_SET_IN_BITMAP (e2, 0, i2, bi2)
- {
-- bool sop;
-+ bool sop = false;
-
- value_range_t vr2 = *(vr_value[i2]);
-
-@@ -4773,7 +4850,8 @@
- if (vrp_val_is_max (vr_result.max))
- goto varying;
-
-- if (!needs_overflow_infinity (TREE_TYPE (vr_result.min)))
-+ if (!needs_overflow_infinity (TREE_TYPE (vr_result.min))
-+ || !vrp_var_may_overflow (lhs, phi))
- vr_result.min = TYPE_MIN_VALUE (TREE_TYPE (vr_result.min));
- else if (supports_overflow_infinity (TREE_TYPE (vr_result.min)))
- vr_result.min =
-@@ -4791,7 +4869,8 @@
- if (vrp_val_is_min (vr_result.min))
- goto varying;
-
-- if (!needs_overflow_infinity (TREE_TYPE (vr_result.max)))
-+ if (!needs_overflow_infinity (TREE_TYPE (vr_result.max))
-+ || !vrp_var_may_overflow (lhs, phi))
- vr_result.max = TYPE_MAX_VALUE (TREE_TYPE (vr_result.max));
- else if (supports_overflow_infinity (TREE_TYPE (vr_result.max)))
- vr_result.max =
-@@ -4971,6 +5050,8 @@
- {
- tree one = build_int_cst (TREE_TYPE (op0), 1);
- max = fold_build2 (MINUS_EXPR, TREE_TYPE (op0), max, one);
-+ if (EXPR_P (max))
-+ TREE_NO_WARNING (max) = 1;
- }
- }
- else if (cond_code == GE_EXPR || cond_code == GT_EXPR)
-@@ -4984,6 +5065,8 @@
- {
- tree one = build_int_cst (TREE_TYPE (op0), 1);
- min = fold_build2 (PLUS_EXPR, TREE_TYPE (op0), min, one);
-+ if (EXPR_P (min))
-+ TREE_NO_WARNING (min) = 1;
- }
- }
-
-Index: gcc/DATESTAMP
-===================================================================
---- gcc/DATESTAMP (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/DATESTAMP (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1 +1 @@
--20070514
-+20070625
-Index: gcc/reload.c
-===================================================================
---- gcc/reload.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/reload.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1180,7 +1180,7 @@
-
- /* If IN appears in OUT, we can't share any input-only reload for IN. */
- if (in != 0 && out != 0 && MEM_P (out)
-- && (REG_P (in) || MEM_P (in))
-+ && (REG_P (in) || MEM_P (in) || GET_CODE (in) == PLUS)
- && reg_overlap_mentioned_for_reload_p (in, XEXP (out, 0)))
- dont_share = 1;
-
-@@ -6540,7 +6540,8 @@
- if (REG_P (in))
- return 0;
- else if (GET_CODE (in) == PLUS)
-- return (reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
-+ return (rtx_equal_p (x, in)
-+ || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
- || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1)));
- else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
- || reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));
-Index: gcc/pointer-set.c
-===================================================================
---- gcc/pointer-set.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/pointer-set.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -22,13 +22,12 @@
- #include "system.h"
- #include "pointer-set.h"
-
--/* A pointer sets is represented as a simple open-addressing hash
-+/* A pointer set is represented as a simple open-addressing hash
- table. Simplifications: The hash code is based on the value of the
- pointer, not what it points to. The number of buckets is always a
- power of 2. Null pointers are a reserved value. Deletion is not
-- supported. There is no mechanism for user control of hash
-- function, equality comparison, initial size, or resizing policy.
--*/
-+ supported (yet). There is no mechanism for user control of hash
-+ function, equality comparison, initial size, or resizing policy. */
-
- struct pointer_set_t
- {
-@@ -114,22 +113,16 @@
- }
- }
-
--/* Subroutine of pointer_set_insert. Inserts P into an empty
-- element of SLOTS, an array of length N_SLOTS. Returns nonzero
-- if P was already present in N_SLOTS. */
--static int
-+/* Subroutine of pointer_set_insert. Return the insertion slot for P into
-+ an empty element of SLOTS, an array of length N_SLOTS. */
-+static inline size_t
- insert_aux (void *p, void **slots, size_t n_slots, size_t log_slots)
- {
- size_t n = hash1 (p, n_slots, log_slots);
- while (true)
- {
-- if (slots[n] == p)
-- return 1;
-- else if (slots[n] == 0)
-- {
-- slots[n] = p;
-- return 0;
-- }
-+ if (slots[n] == p || slots[n] == 0)
-+ return n;
- else
- {
- ++n;
-@@ -144,12 +137,10 @@
- int
- pointer_set_insert (struct pointer_set_t *pset, void *p)
- {
-- if (insert_aux (p, pset->slots, pset->n_slots, pset->log_slots))
-- return 1;
--
-- /* We've inserted a new element. Expand the table if necessary to keep
-- the load factor small. */
-- ++pset->n_elements;
-+ size_t n;
-+
-+ /* For simplicity, expand the set even if P is already there. This can be
-+ superfluous but can happen at most once. */
- if (pset->n_elements > pset->n_slots / 4)
- {
- size_t new_log_slots = pset->log_slots + 1;
-@@ -158,9 +149,10 @@
- size_t i;
-
- for (i = 0; i < pset->n_slots; ++i)
-- {
-- if (pset->slots[i])
-- insert_aux (pset->slots[i], new_slots, new_n_slots, new_log_slots);
-+ {
-+ void *value = pset->slots[i];
-+ n = insert_aux (value, new_slots, new_n_slots, new_log_slots);
-+ new_slots[n] = value;
- }
-
- XDELETEVEC (pset->slots);
-@@ -169,5 +161,144 @@
- pset->slots = new_slots;
- }
-
-+ n = insert_aux (p, pset->slots, pset->n_slots, pset->log_slots);
-+ if (pset->slots[n])
-+ return 1;
++2012-01-25 Richard Guenther <rguenther@suse.de>
+
-+ pset->slots[n] = p;
-+ ++pset->n_elements;
- return 0;
- }
++ * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both
++ bases are dereferenced.
+
-+/* Pass each pointer in PSET to the function in FN, together with the fixed
-+ parameter DATA. If FN returns false, the iteration stops. */
++2012-01-24 Richard Guenther <rguenther@suse.de>
+
-+void pointer_set_traverse (struct pointer_set_t *pset,
-+ bool (*fn) (void *, void *), void *data)
-+{
-+ size_t i;
-+ for (i = 0; i < pset->n_slots; ++i)
-+ if (pset->slots[i] && !fn (pset->slots[i], data))
-+ break;
-+}
++ Forward-port to branch
++ 2010-09-21 Jakub Jelinek <jakub@redhat.com>
+
-+\f
-+/* A pointer map is represented the same way as a pointer_set, so
-+ the hash code is based on the address of the key, rather than
-+ its contents. Null keys are a reserved value. Deletion is not
-+ supported (yet). There is no mechanism for user control of hash
-+ function, equality comparison, initial size, or resizing policy. */
++ PR middle-end/45678
++ * expr.c (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: If
++ op0 isn't sufficiently aligned and there is movmisalignM
++ insn for mode, use it to load op0 into a temporary register.
+
-+struct pointer_map_t
-+{
-+ size_t log_slots;
-+ size_t n_slots; /* n_slots = 2^log_slots */
-+ size_t n_elements;
++2012-01-20 Eric Botcazou <ebotcazou@adacore.com>
+
-+ void **keys;
-+ void **values;
-+};
++ * cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK.
+
-+/* Allocate an empty pointer map. */
-+struct pointer_map_t *
-+pointer_map_create (void)
-+{
-+ struct pointer_map_t *result = XNEW (struct pointer_map_t);
++2012-01-19 Quentin Neill <quentin.neill@amd.com>
+
-+ result->n_elements = 0;
-+ result->log_slots = 8;
-+ result->n_slots = (size_t) 1 << result->log_slots;
++ PR target/48743
++ * config/i386/driver-i386.c (host_detect_local_cpu): Also check
++ family to distinguish PROCESSOR_ATHLON.
+
-+ result->keys = XCNEWVEC (void *, result->n_slots);
-+ result->values = XCNEWVEC (void *, result->n_slots);
-+ return result;
-+}
++2012-01-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
-+/* Reclaims all memory associated with PMAP. */
-+void pointer_map_destroy (struct pointer_map_t *pmap)
-+{
-+ XDELETEVEC (pmap->keys);
-+ XDELETEVEC (pmap->values);
-+ XDELETE (pmap);
-+}
++ PR tree-optimization/49642
++ * ipa-split.c (forbidden_dominators): New variable.
++ (check_forbidden_calls): New function.
++ (dominated_by_forbidden): Likewise.
++ (consider_split): Check for forbidden dominators.
++ (execute_split_functions): Initialize and free forbidden
++ dominators info; call check_forbidden_calls.
+
-+/* Returns a pointer to the value to which P maps, if PMAP contains P. P
-+ must be nonnull. Return NULL if PMAP does not contain P.
++2012-01-18 David Edelsohn <dje.gcc@gmail.com>
+
-+ Collisions are resolved by linear probing. */
-+void **
-+pointer_map_contains (struct pointer_map_t *pmap, void *p)
-+{
-+ size_t n = hash1 (p, pmap->n_slots, pmap->log_slots);
++ * config/rs6000/rs6000.md (call_value_indirect_aix32): Fix typo
++ in mode of operand[4].
+
-+ while (true)
-+ {
-+ if (pmap->keys[n] == p)
-+ return &pmap->values[n];
-+ else if (pmap->keys[n] == 0)
-+ return NULL;
-+ else
-+ {
-+ ++n;
-+ if (n == pmap->n_slots)
-+ n = 0;
-+ }
-+ }
-+}
++2012-01-15 Uros Bizjak <ubizjak@gmail.com>
+
-+/* Inserts P into PMAP if it wasn't already there. Returns a pointer
-+ to the value. P must be nonnull. */
-+void **
-+pointer_map_insert (struct pointer_map_t *pmap, void *p)
-+{
-+ size_t n;
++ PR rtl-optimization/51821
++ * recog.c (peep2_find_free_register): Determine clobbered registers
++ from insn pattern.
+
-+ /* For simplicity, expand the map even if P is already there. This can be
-+ superfluous but can happen at most once. */
-+ if (pmap->n_elements > pmap->n_slots / 4)
-+ {
-+ size_t new_log_slots = pmap->log_slots + 1;
-+ size_t new_n_slots = pmap->n_slots * 2;
-+ void **new_keys = XCNEWVEC (void *, new_n_slots);
-+ void **new_values = XCNEWVEC (void *, new_n_slots);
-+ size_t i;
-+
-+ for (i = 0; i < pmap->n_slots; ++i)
-+ if (pmap->keys[i])
-+ {
-+ void *key = pmap->keys[i];
-+ n = insert_aux (key, new_keys, new_n_slots, new_log_slots);
-+ new_keys[n] = key;
-+ new_values[n] = pmap->values[i];
-+ }
++2012-01-12 Georg-Johann Lay <avr@gjlay.de>
+
-+ XDELETEVEC (pmap->keys);
-+ XDELETEVEC (pmap->values);
-+ pmap->n_slots = new_n_slots;
-+ pmap->log_slots = new_log_slots;
-+ pmap->keys = new_keys;
-+ pmap->values = new_values;
-+ }
++ Backport from mainline r183129
++ PR target/51756
++ * config/avr/avr.c (avr_encode_section_info): Test for absence of
++ DECL_EXTERNAL when checking for initializers of progmem variables.
+
-+ n = insert_aux (p, pmap->keys, pmap->n_slots, pmap->log_slots);
-+ if (!pmap->keys[n])
-+ {
-+ ++pmap->n_elements;
-+ pmap->keys[n] = p;
-+ }
++22012-01-12 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
-+ return &pmap->values[n];
-+}
++ Backport from mainline
++ 2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
-+/* Pass each pointer in PMAP to the function in FN, together with the pointer
-+ to the value and the fixed parameter DATA. If FN returns false, the
-+ iteration stops. */
++ * config/arm/arm.md (mov_notscc): Use MVN for false condition.
+
-+void pointer_map_traverse (struct pointer_map_t *pmap,
-+ bool (*fn) (void *, void **, void *), void *data)
-+{
-+ size_t i;
-+ for (i = 0; i < pmap->n_slots; ++i)
-+ if (pmap->keys[i] && !fn (pmap->keys[i], &pmap->values[i], data))
-+ break;
-+}
-Index: gcc/pointer-set.h
-===================================================================
---- gcc/pointer-set.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/pointer-set.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -22,11 +22,21 @@
- #define POINTER_SET_H
-
- struct pointer_set_t;
--
- struct pointer_set_t *pointer_set_create (void);
- void pointer_set_destroy (struct pointer_set_t *pset);
-
- int pointer_set_contains (struct pointer_set_t *pset, void *p);
- int pointer_set_insert (struct pointer_set_t *pset, void *p);
-+void pointer_set_traverse (struct pointer_set_t *, bool (*) (void *, void *),
-+ void *);
-
-+struct pointer_map_t;
-+struct pointer_map_t *pointer_map_create (void);
-+void pointer_map_destroy (struct pointer_map_t *pmap);
++2012-01-12 Uros Bizjak <ubizjak@gmail.com>
+
-+void **pointer_map_contains (struct pointer_map_t *pmap, void *p);
-+void **pointer_map_insert (struct pointer_map_t *pmap, void *p);
-+void pointer_map_traverse (struct pointer_map_t *,
-+ bool (*) (void *, void **, void *), void *);
++ * config/i386/i386.md (*zero_extendsidi2_rex64): Correct movl template.
++ (x86_shift<mode>_adj_1): Remove operand constraint from operand 3.
+
- #endif /* POINTER_SET_H */
-Index: gcc/fold-const.c
-===================================================================
---- gcc/fold-const.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fold-const.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -4450,13 +4450,24 @@
- {
- low = range_successor (high1);
- high = high0;
-- in_p = (low != 0);
-+ in_p = 1;
-+ if (low == 0)
-+ {
-+ /* We are in the weird situation where high0 > high1 but
-+ high1 has no successor. Punt. */
-+ return 0;
-+ }
- }
- else if (! subset || highequal)
- {
- low = low0;
- high = range_predecessor (low1);
-- in_p = (high != 0);
-+ in_p = 1;
-+ if (high == 0)
-+ {
-+ /* low0 < low1 but low1 has no predecessor. Punt. */
-+ return 0;
-+ }
- }
- else
- return 0;
-@@ -4476,7 +4487,12 @@
- {
- low = range_successor (high0);
- high = high1;
-- in_p = (low != 0);
-+ in_p = 1;
-+ if (low == 0)
-+ {
-+ /* high1 > high0 but high0 has no successor. Punt. */
-+ return 0;
-+ }
- }
- }
-
-@@ -12634,9 +12650,14 @@
- /* ... fall through ... */
-
- default:
-- if (truth_value_p (TREE_CODE (t)))
-- /* Truth values evaluate to 0 or 1, which is nonnegative. */
-- return 1;
-+ {
-+ tree type = TREE_TYPE (t);
-+ if ((TYPE_PRECISION (type) != 1 || TYPE_UNSIGNED (type))
-+ && truth_value_p (TREE_CODE (t)))
-+ /* Truth values evaluate to 0 or 1, which is nonnegative unless we
-+ have a signed:1 type (where the value is -1 and 0). */
-+ return true;
-+ }
- }
-
- /* We don't know sign of `t', so be conservative and return false. */
-Index: gcc/omp-low.c
-===================================================================
---- gcc/omp-low.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/omp-low.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1505,9 +1505,9 @@
- for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
- t = maybe_lookup_decl (decl, up);
-
-- gcc_assert (t);
-+ gcc_assert (t || is_global_var (decl));
-
-- return t;
-+ return t ? t : decl;
- }
-
-
-Index: gcc/DEV-PHASE
-===================================================================
---- gcc/DEV-PHASE (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/DEV-PHASE (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1 @@
-+prerelease
-Index: gcc/ChangeLog
-===================================================================
---- gcc/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,285 @@
-+2007-06-21 H.J. Lu <hongjiu.lu@intel.com>
++2012-01-10 Joseph Myers <joseph@codesourcery.com>
+
-+ * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI.
-+ (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi.
-+ (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI.
++ Revert:
+
-+2007-06-21 Jakub Jelinek <jakub@redhat.com>
++ 2008-09-18 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
-+ PR middle-end/32362
-+ * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL,
-+ but decl is a global var, instead return decl.
-+ * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses
-+ even for is_global_var decls, if they are private in some outer
-+ context.
++ PR rtl-opt/37451
++ * loop-doloop.c (doloop_modify): New argument zero_extend_p and
++ zero extend count after the correction to it is done.
++ (doloop_optimize): Update call to doloop_modify, don't zero extend
++ count before call.
+
-+2007-06-21 Uros Bizjak <ubizjak@gmail.com>
++ 2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
-+ PR target/32389
-+ * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL.
-+ * config/i386/i386.c (assign_386_stack_local): Assert that
-+ SLOT_VIRTUAL is valid only before virtual regs are instantiated.
-+ (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]:
-+ Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP.
-+ * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto.
++ PR rtl-opt/37782
++ * loop-doloop.c (doloop_modify): Add from_mode argument that says what
++ mode count is in.
++ (doloop_optimize): Update call to doloop_modify.
+
-+2007-06-20 Jakub Jelinek <jakub@redhat.com>
++2012-01-09 Richard Sandiford <rdsandiford@googlemail.com>
+
-+ PR inline-asm/32109
-+ * gimplify.c (gimplify_asm_expr): Issue error if type is addressable
-+ and !allows_mem.
++ * config/mips/mips.md (loadgp_newabi_<mode>): Add missing earlyclobber.
+
-+ PR middle-end/32285
-+ * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
-+ if ACCUMULATE_OUTGOING_ARGS.
++2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
+
-+2007-06-20 Kaz Kojima <kkojima@gcc.gnu.org>
++ * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the
++ purported sigacthandler address isn't null before dereferencing it.
++ (sparc_is_sighandler): Likewise.
+
-+ PR rtl-optimization/28011
-+ Backport from mainline.
-+ * reload.c (push_reload): Set dont_share if IN appears in OUT
-+ also when IN is a PLUS rtx.
-+ (reg_overlap_mentioned_for_reload_p): Return true if X and IN
-+ are same PLUS rtx.
++2012-01-09 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
-+2007-06-19 Richard Guenther <rguenther@suse.de>
-+ Michael Matz <matz@suse.de>
++ Backport from mainline
++ 2011-11-04 Jiangning Liu <jiangning.liu@arm.com>
+
-+ PR tree-optimization/30252
-+ * tree-ssa-structalias.c (solution_set_add): Make sure to
-+ preserve all relevant vars.
-+ (handle_ptr_arith): Make sure to only handle positive
-+ offsets.
-+ (push_fields_onto_fieldstack): Create fields for empty
-+ bases.
++ PR rtl-optimization/38644
++ * config/arm/arm.c (thumb1_expand_epilogue): Add memory barrier
++ for epilogue having stack adjustment.
+
-+2007-06-19 Jakub Jelinek <jakub@redhat.com>
++2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
+
-+ PR tree-optimization/32353
-+ * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL.
++ PR ada/41929
++ * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove SAVPC and
++ add CFA. Revert back to old code for Solaris 8+ multi-threaded.
++ (sparc_is_sighandler): Likewise.
++ (MD_FALLBACK_FRAME_STATE_FOR): Adjust call to IS_SIGHANDLER.
+
-+2007-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
++2012-01-06 Eric Botcazou <ebotcazou@adacore.com>
+
-+ * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the
-+ return mode from the builtin itself.
-+ (sparc_fold_builtin): Fix cast of zero constant.
++ Backport from mainline
++ 2012-01-06 Arnaud Charlet <charlet@adacore.com>
+
-+2007-06-15 Diego Novillo <dnovillo@google.com>
++ * c-decl.c (ext_block): Moved up.
++ (collect_all_refs, for_each_global_decl): Take ext_block into account.
+
-+ PR 32327
-+ * tree-ssa-operands.c (build_ssa_operands): Initially assume
-+ that the statement does not take any addresses.
++2012-01-06 Richard Sandiford <richard.sandiford@linaro.org>
+
-+2007-06-13 Eric Botcazou <ebotcazou@libertysurf.fr>
++ PR middle-end/48660
++ * expr.h (copy_blkmode_to_reg): Declare.
++ * expr.c (copy_blkmode_to_reg): New function.
++ (expand_assignment): Don't expand register RESULT_DECLs before
++ the lhs. Use copy_blkmode_to_reg to copy BLKmode values into a
++ RESULT_DECL register.
++ (expand_expr_real_1): Handle BLKmode decls when looking for promotion.
+
-+ * config/sparc/sparc.c (sparc_override_options): Initialize
-+ fpu mask correctly.
++2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
+
-+2007-06-09 Ian Lance Taylor <iant@google.com>
++ PR tree-optimization/51315
++ * tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate.
++ (build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p.
+
-+ PR tree-optimization/32169
-+ * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
-+ CONVERT_EXPR, check whether min and max both converted to an
-+ overflow infinity representation.
++2012-01-04 Eric Botcazou <ebotcazou@adacore.com>
+
-+2007-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
++ PR tree-optimization/51624
++ * tree-sra.c (build_ref_for_model): When replicating a chain of
++ COMPONENT_REFs, stop as soon as the offset would become negative.
+
-+ PR target/32163
-+ Backport from mainline.
-+ * config/sh/sh.md (symGOT_load): Don't schedule insns when
-+ the symbol is generated with the stack protector.
++2012-01-04 Richard Guenther <rguenther@suse.de>
+
-+2007-06-06 Ian Lance Taylor <iant@google.com>
++ PR tree-optimization/49651
++ * tree-ssa-structalias.c (type_can_have_subvars): New function.
++ (var_can_have_subvars): Use it.
++ (get_constraint_for_1): Only consider subfields if there can be any.
+
-+ * fold-const.c (merge_ranges): If range_successor or
-+ range_predecessor fail, just return 0.
++2012-01-03 Sandra Loosemore <sandra@codesourcery.com>
+
-+2007-06-05 Ian Lance Taylor <iant@google.com>
++ Backport from mainline:
++ 2012-01-02 Sandra Loosemore <sandra@codesourcery.com>
+
-+ * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a
-+ PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p.
-+ (extract_range_from_assert): Set TREE_NO_WARNING when creating an
-+ expression.
-+ (test_for_singularity): Likewise.
++ * doc/invoke.texi (-flto and related options): Copy-edit.
+
-+2007-06-04 Ian Lance Taylor <iant@google.com>
++2012-01-03 Richard Guenther <rguenther@suse.de>
+
-+ * tree-vrp.c (adjust_range_with_scev): When loop is not expected
-+ to overflow, reduce overflow infinity to regular infinity.
-+ (vrp_var_may_overflow): New static function.
-+ (vrp_visit_phi_node): Check vrp_var_may_overflow.
++ Backport from mainline
++ 2011-11-10 Richard Guenther <rguenther@suse.de>
+
-+2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
++ PR tree-optimization/51042
++ * tree-ssa-pre.c (phi_translate_1): Avoid recursing on
++ self-referential expressions. Refactor code to avoid duplication.
+
-+ Backport from mainline:
-+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
++2012-01-03 Richard Guenther <rguenther@suse.de>
+
-+ * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it
-+ with MASK_SSE2.
-+ (__builtin_ia32_vec_ext_v2di): Likewise.
-+ (__builtin_ia32_vec_ext_v4si): Likewise.
-+ (__builtin_ia32_vec_ext_v8hi): Likewise.
-+ (__builtin_ia32_vec_set_v8hi): Likewise.
++ PR tree-optimization/51070
++ * tree-loop-distribution.c (generate_builtin): Do not replace
++ the loop with a builtin if the partition contains statements which
++ results are used outside of the loop.
++ (stmt_has_scalar_dependences_outside_loop): Properly handle calls.
+
-+2007-05-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++2011-12-30 Michael Meissner <meissner@linux.vnet.ibm.com>
+
-+ Backport from mainline:
-+ 2007-05-05 Aurelien Jarno <aurelien@aurel32.net>
++ Backport from the mainline
++ 2011-12-30 Michael Meissner <meissner@linux.vnet.ibm.com>
+
-+ * config/pa/pa.md: Split tgd_load, tld_load and tie_load
-+ into pic and non-pic versions. Mark r19 as used for
-+ tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used
-+ for tgd_load, tld_load and tie_load .
-+ * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
-+ version of tgd_load, tld_load and tie_load depending on the
-+ value of flag_pic.
++ * config/rs6000/rs6000.c (rs6000_inner_target_options): Fix thinko
++ in setting options via target #pragma or attribute.
+
-+2007-05-27 Daniel Berlin <dberlin@dberlin.org>
++2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
+
-+ Fix PR/30052
-+ Backport PTA solver from mainline
++ Backport from mainline
++ 2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
+
-+ * pointer-set.c: Copy from mainline
-+ * pointer-set.h: Ditto.
-+ * tree-ssa-structalias.c: Copy solver portions from mainline.
-+ * Makefile.in (tree-ssa-structalias.o): Update dependencies
++ PR target/51623
++ * config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call
++ unlikely_text_section_p. Instead check for being in a code section.
+
-+2007-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
++2011-12-23 Richard Guenther <rguenther@suse.de>
+
-+ * tree-vrp.c (compare_names): Initialize sop.
++ PR rtl-optimization/50396
++ * simplify-rtx.c (simplify_binary_operation_1): Properly
++ guard code that only works for integers.
+
-+2007-05-30 Jakub Jelinek <jakub@redhat.com>
++2011-12-22 Doug Kwan <dougkwan@google.com>
+
-+ PR tree-optimization/31769
-+ * except.c (duplicate_eh_regions): Clear prev_try if
-+ ERT_MUST_NOT_THROW region is inside of ERT_TRY region.
++ Backport from mainline
++ 2011-03-23 Julian Brown <julian@codesourcery.com>
+
-+2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
++ * expr.c (expand_expr_real_1): Only use BLKmode for volatile
++ accesses which are not naturally aligned.
+
-+ PR tree-opt/32100
-+ * fold-const.c (tree_expr_nonnegative_warnv_p): Don't
-+ return true when truth_value_p is true and the type
-+ is of signed:1.
++ 2011-11-20 Joey Ye <joey.ye@arm.com>
+
-+2007-05-27 H.J. Lu <hongjiu.lu@intel.com>
++ * expr.c (expand_expr_real_1): Correctly handle strict volatile
++ bitfield loads smaller than mode size.
+
-+ Backport from mainline:
-+ 2007-05-25 Uros Bizjak <ubizjak@gmail.com>
++2011-12-21 Richard Earnshaw <rearnsha@arm.com>
+
-+ * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate
-+ "memory" attribute for "sseishft" type insn without operands[2].
++ PR target/51643
++ * arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous
++ change.
+
-+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
++2011-12-21 Richard Earnshaw <rearnsha@arm.com>
+
-+ * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift.
++ PR target/51643
++ * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
++ weak function on bare-metal EABI targets.
+
-+2007-05-22 Ian Lance Taylor <iant@google.com>
++2011-12-21 Uros Bizjak <ubizjak@gmail.com>
+
-+ * tree-vrp.c (avoid_overflow_infinity): New static function,
-+ broken out of set_value_range_to_value.
-+ (set_value_range_to_value): Call avoid_overflow_infinity.
-+ (extract_range_from_assert): Likewise.
++ Backport from mainline
++ 2011-12-21 Richard Guenther <rguenther@suse.de>
+
-+2007-05-23 Chen Liqin <liqin@sunnorth.com.cn>
++ PR lto/41159
++ * tree-outof-ssa.c (insert_value_copy_on_edge): Use the
++ mode of the pseudo as destination mode. Only assert that
++ is equal to the promoted mode of the decl if it is a REG.
+
-+ PR target/30987
-+ * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
-+ * config/score/predicate.md (const_pow2, const_npow2): remove.
-+ * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
-+ PR target/30474
-+ * config/score/score.c (score_print_operand): makes sure that only lower
-+ bits are used.
-+
-+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
++2011-12-21 Uros Bizjak <ubizjak@gmail.com>
+
-+ PR target/31167
-+ Backport from mainline.
-+ * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
-+ x86_64_general_operand as operand[2] predicate. Remove "iF"
-+ from operand constraints and use "e" constraint instead.
-+ (*subti3_1, *subti3_1 splitter): Ditto.
-+ (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
-+ operand[1] predicate.
++ * config/alpha/linux-unwind.h: Update copyright years.
++ (MD_FROB_UPDATE_CONTEXT): New define.
++ (alpha_frob_update_context): New function.
+
-+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
++2011-12-19 Martin Jambor <mjambor@suse.cz>
+
-+ PR target/30041
-+ Backport from mainline.
-+ * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
-+ operands[1] in insn constraint. Correct type attribute to sselog1.
++ PR tree-optimization/51583
++ * tree-sra.c (load_assign_lhs_subreplacements): Call
++ force_gimple_operand_gsi when necessary also in case of no
++ corresponding replacement on the RHS.
+
-+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
++2011-12-16 Eric Botcazou <ebotcazou@adacore.com>
+
-+ PR target/31701
-+ Backport from mainline.
-+ * config/sh/sh.c (output_stack_adjust): Avoid using the frame
-+ register itself to hold the offset constant. Tell flow the use
-+ of r4 and r5 when they are used.
++ * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
++ (frame_blockage): New expander.
++ (frame_blockage<P:mode>): New instruction.
++ * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
++ instructions establishing the frame isn't atomic, emit frame blockage.
+
-+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
++2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
+
-+ PR target/31480
+ Backport from mainline.
-+ * config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
-+ is null.
++ 2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
+
-+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
++ PR rtl-optimization/49720
++ * simplify-rtx.c (simplify_relational_operation_1): Detect
++ infinite recursion condition in "(eq/ne (plus x cst1) cst2)
++ simplifies to (eq/ne x (cst2 - cst1))" case.
++
++2011-12-15 Andreas Tobler <andreast@fgznet.ch>
+
-+ PR target/31022
+ Backport from mainline.
-+ * config/sh/sh.c (sh_adjust_cost): Use the result of single_set
-+ instead of PATTERN.
++ 2011-12-15 Andreas Tobler <andreast@fgznet.ch>
+
-+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
++ * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
+
-+ PR target/27405
-+ Backport from mainline.
-+ * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove.
-+ (cmpsi{eq,gt,gtu}{si,di}_media): Rename to
-+ cmp{eq,gt,gtu}{si,di}_media.
-+ (*cmpne0si_media): Remove.
-+ (*movsicc_umin): Adjust gen_cmp*_media call.
-+ (unordered): Change the mode of unordered and operands[1] to
-+ SImode.
-+ (seq): Adjust gen_cmp*_media calls. Make the mode of
-+ a temporary result of compare SImode if needed. If the mode
-+ of operands[0] is DImode, extend the temporary result to DImode.
-+ (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise.
-+ (sunorderd): Change the mode of match_operand and unorderd to
-+ SImode.
-+ (cmpeq{sf,df}_media): Remove.
-+ (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media.
-+ (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand
-+ and compare operation to SImode.
-+
-+2007-05-18 Joseph Myers <joseph@codesourcery.com>
-+
-+ * config/soft-fp/double.h, config/soft-fp/extended.h,
-+ config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c,
-+ config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c,
-+ config/soft-fp/op-2.h, config/soft-fp/op-4.h,
-+ config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from
-+ glibc CVS.
-+
-+2007-05-17 Ian Lance Taylor <iant@google.com>
-+
-+ PR tree-optimization/31953
-+ * tree-vrp.c (set_value_range_to_value): Add equiv parameter.
-+ Change all callers.
-+ (set_value_range_to_null): Call set_value_range_to_value.
-+ (extract_range_from_comparison): Likewise.
-+
-+2007-05-17 Eric Botcazou <ebotcazou@libertysurf.fr>
-+
-+ PR rtl-optimization/31691
-+ * combine.c (simplify_set): Build a new src pattern instead of
-+ substituting its operands in the COMPARE case.
-+
-+2007-05-14 Mark Mitchell <mark@codesourcery.com>
-+
-+ * BASE-VER: Set to 4.2.1.
-+ * DEV-PHASE: Set to prerelease.
++2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-@@ -307,7 +589,8 @@
- 2007-04-03 Stuart Hastings <stuart@apple.com>
-
- PR 31281
-- * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
-+ * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile
-+ from rethrow decl.
- * cse.c (record_jump_equiv): Bail out on CCmode comparisons.
-
- 2007-04-03 Jakub Jelinek <jakub@redhat.com>
-Index: gcc/testsuite/gcc.c-torture/execute/20070614-1.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/20070614-1.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/20070614-1.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,33 @@
-+extern void abort (void);
++ * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
++ * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
++ * lto-streamer-in.c (lto_read_body): Likewise.
++ (lto_input_toplevel_asms): Likewise.
++ * lto-section-in.c (lto_create_simple_input_block): Likewise.
++ * lto-opts.c (lto_read_file_options): Likewise.
++ * ipa-prop.c (ipa_prop_read_section): Likewise.
+
-+_Complex v = 3.0 + 1.0iF;
++ * df.h (DF_NOTE): Fix typo in comment.
+
-+void
-+foo (_Complex z, int *x)
-+{
-+ if (z != v)
-+ abort ();
-+}
++2011-12-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
-+_Complex bar (_Complex z) __attribute__ ((pure));
-+_Complex
-+bar (_Complex z)
-+{
-+ return v;
-+}
++ * regmove.c (fixup_match_2): Only access call_used_regs with hard
++ regs.
+
-+int
-+baz (void)
-+{
-+ int a, i;
-+ for (i = 0; i < 6; i++)
-+ foo (bar (1.0iF * i), &a);
-+ return 0;
-+}
++2011-12-12 Jakub Jelinek <jakub@redhat.com>
+
-+int
-+main ()
-+{
-+ baz ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/vrp-7.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/vrp-7.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/vrp-7.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,20 @@
++ PR middle-end/51510
++ * calls.c (internal_arg_pointer_based_exp_scan): Don't use
++ VEC_safe_grow_cleared if idx is smaller than VEC_length.
+
-+void abort (void);
++ Backported from mainline
++ 2011-12-11 Jakub Jelinek <jakub@redhat.com>
+
-+struct T
-+{
-+ int b : 1;
-+} t;
++ PR tree-optimization/51485
++ * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
++ DRs in call stmts.
+
-+void __attribute__((noinline)) foo (int f)
-+{
-+ t.b = (f & 0x10) ? 1 : 0;
-+}
++2011-12-12 Eric Botcazou <ebotcazou@adacore.com>
+
-+int main (void)
-+{
-+ foo (0x10);
-+ if (!t.b)
-+ abort ();
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/execute/20070517-1.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/execute/20070517-1.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/execute/20070517-1.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,41 @@
-+/* PR rtl-optimization/31691 */
-+/* Origin: Chi-Hua Chen <stephaniechc-gccbug@yahoo.com> */
++ PR tree-optimization/50569
++ * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
++ in the expression of MODEL instead of just the last one.
+
-+extern void abort (void);
++2011-12-09 Michael Meissner <meissner@the-meissners.org>
+
-+static int get_kind(int) __attribute__ ((noinline));
++ Backport from mainline
++ 2011-12-09 Michael Meissner <meissner@the-meissners.org>
+
-+static int get_kind(int v)
-+{
-+ volatile int k = v;
-+ return k;
-+}
++ PR rtl-optimization/51469
++ * varasm.c (default_binds_local_p_1): If the symbol is a gnu
++ indirect function, mark the symbol as non-local.
+
-+static int some_call(void) __attribute__ ((noinline));
++2011-12-09 Jakub Jelinek <jakub@redhat.com>
+
-+static int some_call(void)
-+{
-+ return 0;
-+}
++ Backport from mainline
++ 2011-12-08 Jakub Jelinek <jakub@redhat.com>
+
-+static void example (int arg)
-+{
-+ int tmp, kind = get_kind (arg);
++ PR tree-optimization/51466
++ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
++ TREE_SIDE_EFFECTS.
+
-+ if (kind == 9 || kind == 10 || kind == 5)
-+ {
-+ if (some_call() == 0)
-+ {
-+ if (kind == 9 || kind == 10)
-+ tmp = arg;
-+ else
-+ abort();
-+ }
-+ }
-+}
++ 2011-11-28 Jakub Jelinek <jakub@redhat.com>
+
-+int main(void)
-+{
-+ example(10);
-+ return 0;
-+}
-Index: gcc/testsuite/gcc.c-torture/compile/pr32169.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/compile/pr32169.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/compile/pr32169.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,17 @@
-+void f(char);
-+static inline
-+void * __memset_generic(char c)
-+{
-+ f(c);
-+}
-+int prepare_startup_playback_urb(
-+ int b,
-+ int c
-+)
-+{
-+ char d;
-+ if (b)
-+ __memset_generic(c == ( 1) ? 0x80 : 0);
-+ else
-+ __memset_generic (c == ( 1) ? 0x80 : 0);
-+}
-Index: gcc/testsuite/gcc.c-torture/compile/pr31953.c
-===================================================================
---- gcc/testsuite/gcc.c-torture/compile/pr31953.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.c-torture/compile/pr31953.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,14 @@
-+struct WView
-+{
-+ int hexedit_mode:1;
-+};
-+toggle_hexedit_mode (struct WView *view)
-+{
-+ if (view->hexedit_mode)
-+ {
-+ }
-+ else
-+ {
-+ view->hexedit_mode = !view->hexedit_mode;
-+ }
-+}
-Index: gcc/testsuite/gcc.target/sparc/combined-2.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/combined-2.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/combined-2.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,7 +1,7 @@
- /* { dg-do compile } */
- /* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
--typedef char pixel __attribute__((vector_size(4)));
--typedef char vec8 __attribute__((vector_size(8)));
-+typedef unsigned char pixel __attribute__((vector_size(4)));
-+typedef unsigned char vec8 __attribute__((vector_size(8)));
- typedef short vec16 __attribute__((vector_size(8)));
-
- vec16 foo (pixel a, pixel b) {
-Index: gcc/testsuite/gcc.target/sparc/fpmul.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/fpmul.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/fpmul.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2,9 +2,9 @@
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
- typedef int vec32 __attribute__((vector_size(8)));
- typedef short vec16 __attribute__((vector_size(8)));
--typedef char pixel __attribute__((vector_size(4)));
-+typedef unsigned char pixel __attribute__((vector_size(4)));
- typedef short pixel16 __attribute__((vector_size(4)));
--typedef char vec8 __attribute__((vector_size(8)));
-+typedef unsigned char vec8 __attribute__((vector_size(8)));
-
- vec16 foo1 (pixel a, vec16 b) {
- return __builtin_vis_fmul8x16 (a, b);
-Index: gcc/testsuite/gcc.target/sparc/pdist.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/pdist.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/pdist.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,8 +1,7 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
--
- typedef long long int64_t;
--typedef char vec8 __attribute__((vector_size(8)));
-+typedef unsigned char vec8 __attribute__((vector_size(8)));
-
- int64_t foo (vec8 a, vec8 b) {
- int64_t d = 0;
-Index: gcc/testsuite/gcc.target/sparc/fexpand.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/fexpand.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/fexpand.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,7 +1,7 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
- typedef short vec16 __attribute__((vector_size(8)));
--typedef char vec8 __attribute__((vector_size(4)));
-+typedef unsigned char vec8 __attribute__((vector_size(4)));
-
- vec16 foo (vec8 a) {
- return __builtin_vis_fexpand (a);
-Index: gcc/testsuite/gcc.target/sparc/fnot.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/fnot.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/fnot.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,8 +1,8 @@
- /* { dg-do compile } */
- /* { dg-options "-O -mcpu=ultrasparc -mvis" } */
--typedef char vec8 __attribute__((vector_size(8)));
-+typedef unsigned char vec8 __attribute__((vector_size(8)));
- typedef short vec16 __attribute__((vector_size(8)));
--typedef int vec32 __attribute__((vector_size(8)));
-+typedef int vec32 __attribute__((vector_size(8)));
-
- extern vec8 foo1_8(void);
- extern void foo2_8(vec8);
-@@ -21,7 +21,7 @@
- #endif
-
- extern vec16 foo1_16(void);
--extern void foo2_16(vec8);
-+extern void foo2_16(vec16);
-
-
- vec16 fun16(void)
-@@ -38,7 +38,7 @@
- #endif
-
- extern vec32 foo1_32(void);
--extern void foo2_32(vec8);
-+extern void foo2_32(vec32);
-
- vec32 fun32(void)
- {
-Index: gcc/testsuite/gcc.target/sparc/mfpu.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/mfpu.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/sparc/mfpu.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,11 @@
-+/* Reported by Peter A. Krauss <peter.a.krauss@web.de> */
++ PR tree-optimization/50078
++ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
++ TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
+
-+/* { dg-do compile } */
-+/* { dg-options "-mfpu" } */
++2011-12-09 Kazu Hirata <kazu@codesourcery.com>
+
-+float square(float x)
-+{
-+ return x * x;
-+}
++ Backport from mainline:
+
-+/* { dg-final { scan-assembler "fmuls" } } */
-Index: gcc/testsuite/gcc.target/sparc/noresult.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/noresult.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/noresult.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,7 +1,6 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
- typedef short vec16 __attribute__((vector_size(8)));
--typedef char vec8 __attribute__((vector_size(4)));
-
- void foo (vec16 a) {
- __builtin_vis_fpack16 (a);
-Index: gcc/testsuite/gcc.target/sparc/fpmerge.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/fpmerge.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/fpmerge.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,7 +1,7 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
--typedef char pixel __attribute__((vector_size(8)));
--typedef char vec8 __attribute__((vector_size(4)));
-+typedef unsigned char pixel __attribute__((vector_size(8)));
-+typedef unsigned char vec8 __attribute__((vector_size(4)));
-
- pixel foo (vec8 a, vec8 b) {
- return __builtin_vis_fpmerge (a, b);
-Index: gcc/testsuite/gcc.target/sparc/align.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/align.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/align.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,10 +1,9 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
--
- typedef long long int64_t;
- typedef int vec32 __attribute__((vector_size(8)));
- typedef short vec16 __attribute__((vector_size(8)));
--typedef char vec8 __attribute__((vector_size(8)));
-+typedef unsigned char vec8 __attribute__((vector_size(8)));
-
- vec16 foo1 (vec16 a, vec16 b) {
- return __builtin_vis_faligndatav4hi (a, b);
-Index: gcc/testsuite/gcc.target/sparc/fpack16.c
-===================================================================
---- gcc/testsuite/gcc.target/sparc/fpack16.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gcc.target/sparc/fpack16.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,7 +1,7 @@
- /* { dg-do compile } */
- /* { dg-options "-mcpu=ultrasparc -mvis" } */
- typedef short vec16 __attribute__((vector_size(8)));
--typedef char vec8 __attribute__((vector_size(4)));
-+typedef unsigned char vec8 __attribute__((vector_size(4)));
-
- vec8 foo (vec16 a) {
- return __builtin_vis_fpack16 (a);
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-3.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-3.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-3.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,37 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
+
-+#include "sse2-check.h"
++ PR target/51408
++ * config/arm/arm.md (*minmax_arithsi): Always require the else
++ clause in the MINUS case.
+
-+#include <emmintrin.h>
++2011-12-08 Teresa Johnson <tejohnson@google.com>
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128i x;
-+ char c[16];
-+ short s[8];
-+ int i[4];
-+ long long ll[2];
-+ } val1;
-+ int res[4];
-+ int masks[4];
-+ int i;
++ Backport from mainline:
+
-+ for (i = 0; i < 16; i++)
-+ val1.c[i] = i;
++ 2011-08-05 Uros Bizjak <ubizjak@gmail.com>
+
-+ res[0] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 0);
-+ res[1] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 1);
-+ res[2] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 2);
-+ res[3] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 3);
++ * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
++ instead of "!m" for operand 0, alternative 4.
++ (*movdf_internal_rex64): Ditto for operand 0, alernative 6.
+
-+ for (i = 0; i < 4; i++)
-+ masks[i] = i;
++2011-12-08 Jakub Jelinek <jakub@redhat.com>
+
-+ for (i = 0; i < 4; i++)
-+ if (res[i] != val1.i [masks[i]])
-+ abort ();
-+}
-Index: gcc/testsuite/gcc.target/i386/pr32389.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr32389.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr32389.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,10 @@
-+/* Testcase by Mike Frysinger <vapier@gentoo.org> */
++ Backport from mainline
++ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
+
-+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-+/* { dg-options "-msse" } */
++ PR debug/51410
++ * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
++ for debug info if scope is file_scope.
+
-+double f1();
-+int f2() {
-+ __builtin_ia32_stmxcsr();
-+ return f1();
-+}
-Index: gcc/testsuite/gcc.target/i386/pr31167.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/pr31167.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr31167.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target x86_64-*-* } } */
-+/* { dg-options "-O" } */
++ PR c/51339
++ * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
++ relayout_decl instead of layout_decl.
+
-+typedef int int32_t;
++ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
++ Eric Botcazou <ebotcazou@adacore.com>
+
-+int32_t round32hi (const __int128_t arg)
-+{
-+ const int SHIFT = 96;
-+ const int mshift = 96;
-+ const __int128_t M = (~(__int128_t) 0) << mshift;
-+ const __int128_t L = (~M) + 1;
-+ const __int128_t L1 = ((__int128_t) L) >> 1;
-+ const __int128_t Mlo = ((__int128_t) (~M)) >> 1;
-+ __int128_t vv = arg & M;
++ PR middle-end/51323
++ PR middle-end/50074
++ * calls.c (internal_arg_pointer_exp_state): New variable.
++ (internal_arg_pointer_based_exp_1,
++ internal_arg_pointer_exp_scan): New functions.
++ (internal_arg_pointer_based_exp): New function.
++ (mem_overlaps_already_clobbered_arg_p): Use it.
++ (expand_call): Free internal_arg_pointer_exp_state.cache vector
++ and clear internal_arg_pointer_exp_state.scan_start.
+
-+ if ((arg & (L1)) && ((arg & Mlo) || (arg & L)))
-+ vv += L;
++ 2011-11-30 Jakub Jelinek <jakub@redhat.com>
+
-+ return (int32_t) (vv >> SHIFT);
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-4.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-4.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-4.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,41 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++ PR rtl-optimization/48721
++ * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
++ reg_pending_barrier to TRUE_BARRIER.
+
-+#include "sse2-check.h"
++ 2011-11-26 Joern Rennecke <joern.rennecke@embecosm.com>
+
-+#include <emmintrin.h>
++ PR middle-end/50074
++ * calls.c (mem_overlaps_already_clobbered_arg_p):
++ Return false if no outgoing arguments have been stored so far.
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128i x;
-+ char c[16];
-+ short s[8];
-+ int i[4];
-+ long long ll[2];
-+ } val1;
-+ short res[8];
-+ int masks[8];
-+ int i;
++2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
+
-+ for (i = 0; i < 16; i++)
-+ val1.c[i] = i;
++ PR tree-optimization/51315
++ * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
++ (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
++ MEM_REFs and use get_object_or_type_alignment for them.
++ (build_accesses_from_assign): Adjust for above change.
++ (access_precludes_ipa_sra_p): Likewise.
+
-+ res[0] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 0);
-+ res[1] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 1);
-+ res[2] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 2);
-+ res[3] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 3);
-+ res[4] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 4);
-+ res[5] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 5);
-+ res[6] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 6);
-+ res[7] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 7);
++2011-12-06 Martin Jambor <mjambor@suse.cz>
+
-+ for (i = 0; i < 8; i++)
-+ masks[i] = i;
++ Backport from mainline:
+
-+ for (i = 0; i < 8; i++)
-+ if (res[i] != val1.s [masks[i]])
-+ abort ();
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-check.h
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-check.h (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-check.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,20 @@
-+#include <stdio.h>
-+#include <stdlib.h>
++ 2011-12-02 Martin Jambor <mjambor@suse.cz>
++
++ PR tree-optimization/50622
++ * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
++ if both lacc and racc are grp_partial_lhs.
++
++2011-12-06 Iain Sandoe <iains@gcc.gnu.org>
++
++ * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
++ rs6000_current_abi.
++
++2011-12-06 Alan Modra <amodra@gmail.com>
++
++ PR target/50906
++ * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
++ Do not mark r11 setup as frame-related. Pass correct offset to
++ rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
++ arguments. Correct sp_offset. Remove "offset" fudge from
++ in-line rs6000_frame_related call. Rename misleading variable.
++ Fix comments and whitespace. Tidy some expressions.
++ (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
++ to r11 in out-of-line case. Correct sp_offset. Pass correct
++ offset to rs6000_emit_savres_rtx. Rename misleading variable.
++ Fix comments and whitespace. Tidy some expressions.
++ (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
++ adjustment when !saving_GPRs_inline. Correct register mode
++ used in address calcs.
++ (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
++ !restoring_GPRs_inline.
++
++2011-12-04 Jérémie Detrey <Jeremie.Detrey@loria.fr>
++
++ PR target/51393
++ * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
++ parameter as long long.
++
++2011-12-02 Georg-Johann Lay <avr@gjlay.de>
++
++ PR target/51002
++ PR target/51345
++ * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__):
++ Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__).
++ Add FIXME comments.
++ * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set
++ insn condition to !AVR_HAVE_8BIT_SP.
++ * config/avr/avr.c (output_movhi): "clr%B0" instead of "in
++ %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
++ (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
++ * config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and
++ AT86RF401 have a 16-bit SP (their manual is bogus).
++
++2011-11-25 Richard Sandiford <richard.sandiford@linaro.org>
+
-+#include "../../gcc.dg/i386-cpuid.h"
++ Backport from mainline:
+
-+static void sse2_test (void);
++ 2011-03-29 Richard Sandiford <richard.sandiford@linaro.org>
++
++ PR debug/48190
++ * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
++ (cached_dw_loc_list_def): New structure.
++ (cached_dw_loc_list): New typedef.
++ (cached_dw_loc_list_table): New variable.
++ (cached_dw_loc_list_table_hash): New function.
++ (cached_dw_loc_list_table_eq): Likewise.
++ (add_location_or_const_value_attribute): Take a bool cache_p.
++ Cache the list when the parameter is true.
++ (gen_formal_parameter_die): Update caller.
++ (gen_variable_die): Likewise.
++ (dwarf2out_finish): Likewise.
++ (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table
++ while generating debug info for the decl.
++ (dwarf2out_function_decl): Clear cached_dw_loc_list_table.
++ (dwarf2out_init): Initialize cached_dw_loc_list_table.
++ (resolve_addr): Cache the result of resolving a chain of
++ location lists.
++
++2011-11-24 Enkovich Ilya <ilya.enkovich@intel.com>
++
++ PR target/51287
++ * i386.c (distance_non_agu_define): Fix insn attr check.
++
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+int
-+main ()
-+{
-+ unsigned long cpu_facilities;
-+
-+ cpu_facilities = i386_cpuid_edx ();
++ * configure: Regenerate.
+
-+ /* Run SSE2 test only if host has SSE2 support. */
-+ if ((cpu_facilities & bit_SSE2))
-+ sse2_test ();
++2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
+
-+ exit (0);
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-1.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-1.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-1.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,35 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++ PR rtl-optimization/51187
++ * reorg.c (relax_delay_slots): Do not consider a jump useless if there
++ is a barrier between the jump and its target label.
+
-+#include "sse2-check.h"
++2011-11-19 Richard Earnshaw <rearnsha@arm.com>
+
-+#include <emmintrin.h>
++ PR target/50493
++ * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
++ overlap of src and dest operands.
+
-+#define msk0 0
-+#define msk1 1
++2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128d x;
-+ double d[2];
-+ } val1;
-+ double res[2];
-+ int masks[2];
-+ int i;
++ PR target/49992
++ * configure.ac: Remove ranlib special-casing for Darwin.
++ * configure: Regenerate.
+
-+ val1.d[0] = 23.;
-+ val1.d[1] = 45;
++2011-11-16 Richard Earnshaw <rearnsha@arm.com>
++ Bernd Schmidt <bernds@coudesourcery.com>
++ Sebastian Huber <sebastian.huber@embedded-brains.de>
+
-+ res[0] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk0);
-+ res[1] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk1);
++ PR target/49641
++ * config/arm/arm.c (store_multiple_sequence): Avoid cases where
++ the base reg is stored iff compiling for Thumb1.
+
-+ masks[0] = msk0;
-+ masks[1] = msk1;
++2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
+
-+ for (i = 0; i < 2; i++)
-+ if (res[i] != val1.d [masks[i]])
-+ abort ();
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-5.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-5.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-5.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,49 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++ PR target/48108
++ Backport from mainline r180523
++ * config/darwin.c (top level): Amend comments concerning LTO output.
++ (lto_section_num): New variable. (darwin_lto_section_e): New GTY.
++ (LTO_SECTS_SECTION, LTO_INDEX_SECTION): New.
++ (LTO_NAMES_SECTION): Rename.
++ (darwin_asm_named_section): Record LTO section counts and switches
++ in a vec of darwin_lto_section_e.
++ (darwin_file_start): Remove unused code.
++ (darwin_file_end): Put an LTO section termination label. Handle
++ output of the wrapped LTO sections, index and names table.
+
-+#include "sse2-check.h"
++2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
+
-+#include <emmintrin.h>
++ PR target/45233
++ * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
++ Only expand a symbol ref. into an access when the entity is defined
++ in the TU.
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128i x;
-+ char c[16];
-+ short s[8];
-+ int i[4];
-+ long long ll[2];
-+ } val1;
-+ char res[16];
-+ int masks[16];
-+ int i;
++2011-11-10 Jakub Jelinek <jakub@redhat.com>
+
-+ for (i = 0; i < 16; i++)
-+ val1.c[i] = i;
-+
-+ res[0] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 0);
-+ res[1] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 1);
-+ res[2] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 2);
-+ res[3] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 3);
-+ res[4] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 4);
-+ res[5] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 5);
-+ res[6] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 6);
-+ res[7] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 7);
-+ res[8] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 8);
-+ res[9] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 9);
-+ res[10] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 10);
-+ res[11] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 11);
-+ res[12] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 12);
-+ res[13] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 13);
-+ res[14] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 14);
-+ res[15] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 15);
-+
-+ for (i = 0; i < 16; i++)
-+ masks[i] = i;
-+
-+ for (i = 0; i < 16; i++)
-+ if (res[i] != val1.c [masks[i]])
-+ abort ();
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-2.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-2.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-2.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,35 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++ PR middle-end/51077
++ * tree-object-size.c (addr_object_size): Check TREE_CODE of
++ MEM_REF's operand rather than code of the MEM_REF itself.
+
-+#include "sse2-check.h"
++2011-11-07 Alan Modra <amodra@gmail.com>
+
-+#include <emmintrin.h>
++ PR target/30282
++ * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit
++ blockage for ABI_V4.
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128i x;
-+ char c[16];
-+ short s[8];
-+ int i[4];
-+ long long ll[2];
-+ } val1;
-+ long long res[2];
-+ int masks[2];
-+ int i;
++2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
+
-+ for (i = 0; i < 16; i++)
-+ val1.c[i] = i;
++ PR c++/50608
++ * c-parser.c (c_parser_postfix_expression) <RID_OFFSETOF>: Adjust call
++ to fold_offsetof.
++ * c-typeck.c (build_unary_op) <ADDR_EXPR>: Call fold_offsetof_1.
+
-+ res[0] = __builtin_ia32_vec_ext_v2di ((__v2di)val1.x, 0);
-+ res[1] = __builtin_ia32_vec_ext_v2di ((__v2di)val1.x, 1);
++2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
+
-+ for (i = 0; i < 2; i++)
-+ masks[i] = i;
++ PR target/50979
++ * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.
+
-+ for (i = 0; i < 2; i++)
-+ if (res[i] != val1.ll [masks[i]])
-+ abort ();
-+}
-Index: gcc/testsuite/gcc.target/i386/sse2-vec-6.c
-===================================================================
---- gcc/testsuite/gcc.target/i386/sse2-vec-6.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.target/i386/sse2-vec-6.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,69 @@
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+/* { dg-options "-O2 -msse2" } */
++2011-11-03 Uros Bizjak <ubizjak@gmail.com>
+
-+#include "sse2-check.h"
++ * config/i386/i386.md (lround<X87MODEF:mode><SWI248x:mode>2,
++ rint<mode>2, floor<mode>2, lfloor<MODEF:mode><SWI48:mode>2,
++ btrunc<mode>2, lwp_lwpval<mode>3): Use operands[N] instead of operandN.
+
-+#include <emmintrin.h>
-+#include <string.h>
++2011-11-02 Eric Botcazou <ebotcazou@adacore.com>
+
-+static void
-+sse2_test (void)
-+{
-+ union
-+ {
-+ __m128i x;
-+ char c[16];
-+ short s[8];
-+ int i[4];
-+ long long ll[2];
-+ } val1, res[16], tmp;
-+ short ins[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
-+ int masks[8];
-+ int i;
++ PR target/50945
++ * config/sparc/sparc.md (movsf_insn): Reindent constraints.
++ (movsf_insn_no_fpu): Likewise.
++ (movdf_insn_sp32): Likewise.
++ (movdf_insn_sp32_no_fpu): Likewise.
++ (movdf_insn_sp32_v9): Likewise. Remove redundant GY constraint.
++ (movdf_insn_sp32_v9_no_fpu): Likewise.
++ (movdf_insn_sp64): Likewise.
++ (movdf_insn_sp64_no_fpu): Likewise.
++ (movtf_insn_sp32): Likewise.
++ (movtf_insn_sp32_no_fpu): Likewise.
++ (movtf_insn_sp64): Likewise.
++ (movtf_insn_sp64_hq): Likewise.
++ (movtf_insn_sp64_no_fpu): Likewise.
+
-+ for (i = 0; i < 16; i++)
-+ val1.c[i] = i;
-+
-+ res[0].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 0);
-+ res[1].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 1);
-+ res[2].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 2);
-+ res[3].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 3);
-+ res[4].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 4);
-+ res[5].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 5);
-+ res[6].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 6);
-+ res[7].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[0], 7);
++2011-11-02 Bernd Schmidt <bernds@codesourcery.com>
+
-+ for (i = 0; i < 8; i++)
-+ masks[i] = i;
++ * cfgcleanup.c (try_head_merge_bb): If get_condition returns
++ NULL for a jump that is a cc0 insn, pick the previous insn for
++ move_before.
+
-+ for (i = 0; i < 8; i++)
-+ {
-+ tmp.x = val1.x;
-+ tmp.s[masks[i]] = ins[0];
-+ if (memcmp (&tmp, &res[i], sizeof (tmp)))
-+ abort ();
-+ }
++2011-11-01 Uros Bizjak <ubizjak@gmail.com>
+
-+ for (i = 0; i < 8; i++)
-+ {
-+ res[i].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
-+ ins[i], 0);
-+ masks[i] = 0;
-+ }
++ * config/i386/i386.md (splitters for int-float conversion): Use
++ SUBREG_REG on SUBREGs in splitter constraints.
+
-+ for (i = 0; i < 8; i++)
-+ {
-+ tmp.x = val1.x;
-+ tmp.s[masks[i]] = ins[i];
-+ if (memcmp (&tmp, &res[i], sizeof (tmp)))
-+ abort ();
-+ }
-+}
-Index: gcc/testsuite/gcc.dg/Wstrict-overflow-18.c
++2011-11-01 Julian Brown <julian@codesourcery.com>
++
++ PR rtl-optimization/47918
++ * reload1.c (set_initial_label_offsets): Use initial offsets
++ for labels on the nonlocal_goto_handler_labels chain.
++
++2011-10-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ PR target/50691
++ * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references.
++ * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for
++ TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references.
++
++2011-10-27 Uros Bizjak <ubizjak@gmail.com>
++
++ PR target/50875
++ * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn
++ constraints. Change alternative 1 to "x,m,1".
++
++2011-10-26 Jakub Jelinek <jakub@redhat.com>
++
++ * BASE-VER: Set to 4.6.3.
++ * DEV-PHASE: Set to prerelease.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+@@ -144,8 +794,8 @@
+
+ 2011-10-07 Bernd Schmidt <bernds@codesourcery.com>
+
+- PR target/49049
+- * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
++ PR target/49049
++ * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
+
+ 2011-10-06 Jakub Jelinek <jakub@redhat.com>
+
+@@ -252,7 +902,7 @@
+ * config/rs6000/rs6000.md (probe_stack): Use explicit operand.
+ * config/rs6000/rs6000.c (output_probe_stack_range): Likewise.
+
+-2011-09-14 Diego Novillo <dnovillo@google.com>
++2011-09-14 Diego Novillo <dnovillo@google.com>
+
+ * tree-vect-stmts.c (vect_transform_stmt): Remove unused
+ local variable ORIG_SCALAR_STMT.
+Index: gcc/testsuite/gcc.target/arm/headmerge-2.c
===================================================================
---- gcc/testsuite/gcc.dg/Wstrict-overflow-18.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/Wstrict-overflow-18.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,22 @@
+--- gcc/testsuite/gcc.target/arm/headmerge-2.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gcc.target/arm/headmerge-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+-/* { dg-final { scan-assembler-times "120" 1 } } */
++/* { dg-final { scan-assembler-times "120\n" 1 } } */
+
+ extern void foo1 (int);
+ extern void foo2 (int);
+Index: gcc/testsuite/gcc.target/arm/pr49641.c
+===================================================================
+--- gcc/testsuite/gcc.target/arm/pr49641.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/arm/pr49641.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
+/* { dg-do compile } */
-+/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
++/* { dg-options "-mthumb -O2" } */
++/* { dg-require-effective-target arm_thumb1_ok } */
++/* { dg-final { scan-assembler-not "stmia\[\\t \]*r3!\[^\\n]*r3" } } */
++typedef struct {
++ void *t1, *t2, *t3;
++} z;
++extern volatile int y;
++static inline void foo(z *x) {
++ x->t1 = &x->t2;
++ x->t2 = ((void *)0);
++ x->t3 = &x->t1;
++}
++extern z v;
++void bar (void) {
++ y = 0;
++ foo(&v);
++}
+Index: gcc/testsuite/gcc.target/arm/stack-red-zone.c
+===================================================================
+--- gcc/testsuite/gcc.target/arm/stack-red-zone.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/arm/stack-red-zone.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,12 @@
++/* No stack red zone. PR38644. */
++/* { dg-options "-mthumb -O2" } */
++/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" } } */
+
-+/* Don't warn about an overflow when folding i > 0. The loop analysis
-+ should determine that i does not wrap. */
++extern int doStreamReadBlock (int *, char *, int size, int);
+
-+struct c { unsigned int a; unsigned int b; };
-+extern void bar (struct c *);
-+int
-+foo (struct c *p)
++char readStream (int *s)
+{
-+ int i;
-+ int sum = 0;
-+
-+ for (i = 0; i < p->a - p->b; ++i)
-+ {
-+ if (i > 0)
-+ sum += 2;
-+ bar (p);
-+ }
-+ return sum;
++ char c = 0;
++ doStreamReadBlock (s, &c, 1, *s);
++ return c;
+}
-Index: gcc/testsuite/gcc.dg/Wstrict-overflow-19.c
+Index: gcc/testsuite/gcc.target/arm/sibcall-2.c
===================================================================
---- gcc/testsuite/gcc.dg/Wstrict-overflow-19.c (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gcc.dg/Wstrict-overflow-19.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,15 @@
+--- gcc/testsuite/gcc.target/arm/sibcall-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/arm/sibcall-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,12 @@
++/* { dg-require-effective-target arm_eabi } */
+/* { dg-do compile } */
-+/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
++/* { dg-options "-O2 -mabi=aapcs" } */
+
-+/* Don't warn about an overflow when threading jumps. We used to get
-+ a warning from comparing bounds generated by VRP. */
+
-+int
-+bar(int a, int b, int n)
++extern void __attribute__((weak)) wfunc(void);
++void main(void)
+{
-+ if (b > a)
-+ n = a - b;
-+ if (a >= b)
-+ n = 1;
-+ return n;
++ wfunc(); /* Must not tail-call. */
+}
-Index: gcc/testsuite/ChangeLog
++
++/* { dg-final { scan-assembler-not "b\[\\t \]+wfunc" } } */
+Index: gcc/testsuite/gcc.target/arm/pr51835.c
===================================================================
---- gcc/testsuite/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,190 @@
-+2007-06-21 Uros Bizjak <ubizjak@gmail.com>
+--- gcc/testsuite/gcc.target/arm/pr51835.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/arm/pr51835.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfloat-abi=hard -mfpu=fpv4-sp-d16" } */
++/* { dg-require-effective-target arm_thumb2_ok } */
+
-+ PR target/32389
-+ * gcc.target/i386/pr32389.c New test.
++int func1 (double d)
++{
++ return (int)d;
++}
++unsigned int func2 (double d)
++{
++ return (unsigned int)d;
++}
+
-+2007-06-20 Daniel Franke <franke.daniel@gmail.com>
++/* { dg-final { scan-assembler-times "fmrrd\[\\t \]+r0,\[\\t \]*r1,\[\\t \]*d0" 2 } } */
+Index: gcc/testsuite/gcc.target/powerpc/pr51623.c
+===================================================================
+--- gcc/testsuite/gcc.target/powerpc/pr51623.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/powerpc/pr51623.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,123 @@
++/* PR target/51623 */
++/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
++/* { dg-options "-mrelocatable -ffreestanding" } */
+
-+ Backport from trunk:
-+ PR fortran/32002
-+ * gfortran.dg/compliant_elemental_intrinsics_2.f90: New test.
++/* This generated an error, since the compiler was calling
++ unlikely_text_section_p in a context where it wasn't valid. */
+
-+2007-06-20 Jakub Jelinek <jakub@redhat.com>
++typedef long long loff_t;
++typedef unsigned size_t;
+
-+ PR inline-asm/32109
-+ * g++.dg/ext/asm10.C: New test.
+
-+ PR middle-end/32285
-+ * gcc.c-torture/execute/20070614-1.c: New test.
++struct mtd_info {
++ unsigned writesize;
++ unsigned oobsize;
++ const char *name;
++};
+
-+2007-06-20 Paul Thomas <pault@gcc.gnu.org>
++extern int strcmp(const char *,const char *);
++extern char * strchr(const char *,int);
+
-+ PR fortran/32302
-+ * gfortran.dg/common_resize_1.f90: New test.
++struct cmd_tbl_s {
++ char *name;
++};
+
-+2007-06-19 Richard Guenther <rguenther@suse.de>
-+ Michael Matz <matz@suse.de>
+
-+ PR tree-optimization/30252
-+ * g++.dg/opt/pr30252.C: New testcase.
++int printf(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2)));
++void* malloc(size_t);
++void free(void*);
+
-+2007-06-19 Jakub Jelinek <jakub@redhat.com>
+
-+ PR tree-optimization/32353
-+ * g++.dg/opt/nrv13.C: New test.
++extern int nand_curr_device;
++extern struct mtd_info nand_info[];
+
-+2007-06-15 Mark Mitchell <mark@codesourcery.com>
++static int nand_dump(struct mtd_info *nand, unsigned long off, int only_oob)
++{
++ int i;
++ unsigned char *datbuf, *oobbuf, *p;
++
++ datbuf = malloc(nand->writesize + nand->oobsize);
++ oobbuf = malloc(nand->oobsize);
++ off &= ~(nand->writesize - 1);
++
++ printf("Page %08lx dump:\n", off);
++ i = nand->writesize >> 4;
++ p = datbuf;
++
++ while (i--) {
++ if (!only_oob)
++ printf("\t%02x %02x %02x %02x %02x %02x %02x %02x"
++ " %02x %02x %02x %02x %02x %02x %02x %02x\n",
++ p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7],
++ p[8], p[9], p[10], p[11], p[12], p[13], p[14],
++ p[15]);
++ p += 16;
++ }
+
-+ * g++.dg/lookup/anon6.C: New test.
++ i = nand->oobsize >> 3;
++ free(datbuf);
++ free(oobbuf);
+
-+2007-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
++ return 0;
++}
+
-+ * gcc.target/sparc/align.c: Use 'unsigned char' as element type.
-+ * gcc.target/sparc/combined-2.c: Likewise.
-+ * gcc.target/sparc/fexpand.c : Likewise.
-+ * gcc.target/sparc/fnot.c: Likewise. Fix a couple of prototypes.
-+ * gcc.target/sparc/fpack16.c : Likewise.
-+ * gcc.target/sparc/fpmerge.c : Likewise.
-+ * gcc.target/sparc/fpmul.c : Likewise.
-+ * gcc.target/sparc/noresult.c : Likewise.
-+ * gcc.target/sparc/pdist.c: Likewise.
++int do_nand(struct cmd_tbl_s * cmdtp, int flag, int argc, char *argv[])
++{
++ int dev;
++ unsigned long off;
++ char *cmd, *s;
++ struct mtd_info *nand;
+
-+2007-06-15 Diego Novillo <dnovillo@google.com>
++ if (argc < 2)
++ goto usage;
+
-+ PR 32327
-+ * g++.dg/tree-ssa/pr32327-1.C: New test.
-+ * g++.dg/tree-ssa/pr32327.C: New test.
++ cmd = argv[1];
+
-+2007-06-13 Eric Botcazou <ebotcazou@libertysurf.fr>
++ if (strcmp(cmd, "info") == 0) {
++ putc('\n');
++ return 0;
++ }
+
-+ * gcc.target/sparc/mfpu.c: New test.
++ if (strcmp(cmd, "device") == 0) {
++ if (argc < 3) {
++ putc('\n');
++ }
++ dev = (int)simple_strtoul(argv[2], ((void *)0), 10);
++ nand_curr_device = dev;
++ return 0;
++ }
+
-+2007-06-09 Ian Lance Taylor <iant@google.com>
++ if (strcmp(cmd, "bad") != 0 && strcmp(cmd, "erase") != 0 )
++ goto usage;
++
++ if (nand_curr_device < 0 ) {
++ return 1;
++ }
++ nand = &nand_info[nand_curr_device];
+
-+ PR tree-optimization/32169
-+ * gcc.c-torture/compile/pr32169.c: New test.
++ if (strcmp(cmd, "erase") == 0 || strcmp(cmd, "scrub") == 0) {
++ int clean = argc > 2 && !strcmp("clean", argv[2]);
++ int scrub = !strcmp(cmd, "scrub");
++ return 0;
++ }
+
-+2007-06-08 Dirk Mueller <dmueller@suse.de>
++ if (strncmp(cmd, "dump", 4) == 0) {
++ if (argc < 3)
++ goto usage;
+
-+ PR c++/31809
-+ Backport from mainline:
-+ 2007-05-30 Jakub Jelinek <jakub@redhat.com>
++ s = strchr(cmd, '.');
++ off = (int)simple_strtoul(argv[2], ((void *)0), 16);
++
++ if (s != ((void *)0) && strcmp(s, ".oob") == 0)
++ nand_dump(nand, off, 1);
++ else
++ nand_dump(nand, off, 0);
++
++ return 0;
++ }
++usage:
++ cmd_usage(cmdtp);
++ return 1;
++}
+
-+ * g++.dg/opt/static5.C: New test.
++void *ptr = do_nand;
+Index: gcc/testsuite/gcc.target/i386/pr51393.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr51393.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/i386/pr51393.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,22 @@
++/* { dg-do run } */
++/* { dg-require-effective-target avx } */
++/* { dg-require-effective-target lp64 } */
++/* { dg-options "-O -mavx" } */
+
-+2007-06-06 Ian Lance Taylor <iant@google.com>
++#include "avx-check.h"
++#include <immintrin.h>
+
-+ * g++.dg/conversion/enum1.C: New test.
++static void
++__attribute__((noinline))
++avx_test (void)
++{
++ long long in = 0x800000000ll;
++ long long out;
+
-+2007-06-05 Ian Lance Taylor <iant@google.com>
++ __m256i zero = _mm256_setzero_si256();
++ __m256i tmp = _mm256_insert_epi64 (zero, in, 0);
++ out = _mm256_extract_epi64(tmp, 0);
+
-+ * gcc.dg/Wstrict-overflow-19.c: New test.
++ if (in != out)
++ abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/pr48721.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr48721.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/i386/pr48721.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,51 @@
++/* PR rtl-optimization/48721 */
++/* { dg-do compile } */
++/* { dg-options "-O -foptimize-sibling-calls -fsched2-use-superblocks -fschedule-insns2 -mtune=core2" } */
+
-+2007-06-04 Ian Lance Taylor <iant@google.com>
++extern unsigned char a[];
++extern int b[], d[], e[], f[], g[], *h[], m[], *n[], o[];
++extern char c[];
+
-+ * gcc.dg/Wstrict-overflow-18.c: New test.
++struct S
++{
++ unsigned char s1;
++ int s2, s3, s4, s5, s6, s7, s8;
++};
+
-+2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
++__attribute__((noinline, noclone)) int
++foo (int x)
++{
++ return 0;
++}
+
-+ Backport from mainline:
-+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
++int
++bar (int x, struct S *y)
++{
++ int z;
++ switch (x)
++ {
++ case 1:
++ case 2:
++ {
++ int t2, t4, t5, t6, t7, t8;
++ z = o[y->s8 * 6];
++ t8 = *n[m[x] * 5];
++ t4 = *h[y->s7];
++ t7 = z;
++ z = g[f[x] + y->s6];
++ t6 = e[y->s5];
++ t5 = d[c[x] + y->s3 * 17];
++ if (z)
++ t2 = b[z];
++ if (a[z] != y->s1)
++ return foo (x);
++ y->s8 = t8;
++ y->s4 = t4;
++ y->s7 = t7;
++ y->s6 = t6;
++ y->s5 = t5;
++ y->s2 = t2;
++ }
++ }
++ return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/movdi-rex64.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,11 @@
++/* { dg-do compile { target *-*-linux* } } */
++/* { dg-options "-fPIE" } */
+
-+ * gcc.target/i386/sse2-check.h: New.
-+ * gcc.target/i386/sse2-vec-1.c: Likewise.
-+ * gcc.target/i386/sse2-vec-2.c: Likewise.
-+ * gcc.target/i386/sse2-vec-3.c: Likewise.
-+ * gcc.target/i386/sse2-vec-4.c: Likewise.
-+ * gcc.target/i386/sse2-vec-5.c: Likewise.
-+ * gcc.target/i386/sse2-vec-6.c: Likewise.
++char *strcpy (char *dest, const char *src);
+
-+2007-05-31 Paul Thomas <pault@gcc.gnu.org>
++static __thread char buffer[25];
++const char * error_message (void)
++{
++ strcpy (buffer, "Unknown code ");
++ return 0;
++}
+Index: gcc/testsuite/lib/gcc-dg.exp
+===================================================================
+--- gcc/testsuite/lib/gcc-dg.exp (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/lib/gcc-dg.exp (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -565,6 +565,24 @@
+ }
+ }
+
++# Scan Fortran modules for absence of a given regexp.
++#
++# Argument 0 is the module name
++# Argument 1 is the regexp to match
++proc scan-module-absence { args } {
++ set modfilename [string tolower [lindex $args 0]].mod
++ set fd [open $modfilename r]
++ set text [read $fd]
++ close $fd
++
++ upvar 2 name testcase
++ if [regexp -- [lindex $args 1] $text] {
++ fail "$testcase scan-module [lindex $args 1]"
++ } else {
++ pass "$testcase scan-module [lindex $args 1]"
++ }
++}
+
-+ PR fortran/31483
-+ * gfortran.dg/altreturn_5.f90: New test.
+ # Verify that the compiler output file exists, invoked via dg-final.
+ proc output-exists { args } {
+ # Process an optional target or xfail list.
+Index: gcc/testsuite/gfortran.dg/whole_file_35.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,28 @@
++! { dg-do compile }
++!
++! PR fortran/50408
++!
++! Contributed by Vittorio Zecca
++!
++ module m
++ type int
++ integer :: val
++ end type int
++ interface ichar
++ module procedure uch
++ end interface
++ contains
++ function uch (c)
++ character (len=1), intent (in) :: c
++ type (int) :: uch
++ intrinsic ichar
++ uch%val = 127 - ichar (c)
++ end function uch
++ end module m
++
++ program p
++ use m
++ print *,ichar('~') ! must print "1"
++ end program p
++
++! { dg-final { cleanup-modules "m" } }
+Index: gcc/testsuite/gfortran.dg/dummy_procedure_7.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,65 @@
++! { dg-do run }
++!
++! PR fortran/52022
++!
+
-+ PR fortran/31540
-+ * gfortran.dg/char_result_5.f90: New test.
++module check
++ integer, save :: icheck = 0
++end module check
+
-+ PR fortran/31867
-+ * gfortran.dg/char_length_5.f90: New test.
++module t
++implicit none
++ contains
++subroutine sol(cost)
++ use check
++ interface
++ function cost(p) result(y)
++ double precision,dimension(:) :: p
++ double precision,dimension(:),allocatable :: y
++ end function cost
++ end interface
+
-+ PR fortran/31994
-+ * gfortran.dg/array_reference_1.f90: New test.
++ if (any (cost([1d0,2d0]) /= [2.d0, 4.d0])) call abort ()
++ icheck = icheck + 1
++end subroutine
+
-+2007-05-22 Tobias Burnus <burnus@net-b.de>
++end module t
+
-+ PR fortran/31559
-+ Backport from mainline.
-+ * primary.c (match_variable): External functions
-+ are no variables.
++module tt
++ procedure(cost1),pointer :: pcost
++contains
++ subroutine init()
++ pcost=>cost1
++ end subroutine
++
++ function cost1(x) result(y)
++ double precision,dimension(:) :: x
++ double precision,dimension(:),allocatable :: y
++ allocate(y(2))
++ y=2d0*x
++ end function cost1
++
++
++
++ function cost(x) result(y)
++ double precision,dimension(:) :: x
++ double precision,dimension(:),allocatable :: y
++ allocate(y(2))
++ y=pcost(x)
++ end function cost
++end module
++
++program test
++ use tt
++ use t
++ use check
++ implicit none
++
++ call init()
++ if (any (cost([3.d0,7.d0]) /= [6.d0, 14.d0])) call abort ()
++ if (icheck /= 0) call abort ()
++ call sol(cost)
++ if (icheck /= 1) call abort ()
++end program test
+
-+2007-05-30 Jakub Jelinek <jakub@redhat.com>
++! { dg-final { cleanup-modules "t tt check" } }
+Index: gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/derived_constructor_char_3.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,30 @@
++! { dg-do compile }
++!
++! PR fortran/51966
++!
++! Contributed by Peter Wind
++!
+
-+ PR tree-optimization/31769
-+ * g++.dg/gomp/pr31769.C: New test.
++ type :: Deriv
++ character(len=10) :: name
++ end type
++ character(len=8), dimension(2), parameter :: &
++ DEF_ECOSYSTEMS = (/ "Gridxxxx", "StringYY" /)
+
-+2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
++ type(Deriv), save :: DepEcoSystem = Deriv(DEF_ECOSYSTEMS(1))
+
-+ PR tree-opt/32100
-+ * gcc.c-torture/execute/vrp-7.c: New test.
-+
-+2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
++ if (DepEcoSystem%name /= "Gridxxxx" &
++ .or. DepEcoSystem%name(9:9) /= ' ' &
++ .or. DepEcoSystem%name(10:10) /= ' ') call abort()
++ DepEcoSystem%name = 'ABCDEFGHIJ'
++ call Init_EcoSystems()
++ if (DepEcoSystem%name /= "StringYY" &
++ .or. DepEcoSystem%name(9:9) /= ' ' &
++ .or. DepEcoSystem%name(10:10) /= ' ') call abort()
+
-+ PR libfortran/31964
-+ * gfortran.fortran-torture/execute/intrinsic_bitops.f90: Update.
++contains
++ subroutine Init_EcoSystems()
++ integer :: i =2
++ DepEcoSystem = Deriv(DEF_ECOSYSTEMS(i))
++ end subroutine Init_EcoSystems
++end
+Index: gcc/testsuite/gfortran.dg/move_alloc_8.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/move_alloc_8.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/move_alloc_8.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,106 @@
++! { dg-do compile }
++!
++! PR fortran/50684
++!
++! Module "bug" contributed by Martin Steghöfer.
++!
+
-+2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
++MODULE BUG
++ TYPE MY_TYPE
++ INTEGER, ALLOCATABLE :: VALUE
++ END TYPE
++CONTAINS
++ SUBROUTINE POINTER_INTENT_IN_BUG_WORKING(POINTER_INTENT_IN_VARIABLE)
++ TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
++ TYPE(MY_TYPE), POINTER :: POINTER_VARIABLE_LOCAL
++ INTEGER, ALLOCATABLE :: LOCAL_VALUE
++
++ POINTER_VARIABLE_LOCAL=>POINTER_INTENT_IN_VARIABLE
++ CALL MOVE_ALLOC(POINTER_VARIABLE_LOCAL%VALUE, LOCAL_VALUE)
++
++ RETURN
++ END SUBROUTINE POINTER_INTENT_IN_BUG_WORKING
++
++ SUBROUTINE POINTER_INTENT_IN_BUG_FAILING(POINTER_INTENT_IN_VARIABLE)
++ TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
++ INTEGER, ALLOCATABLE :: LOCAL_VALUE
++
++ CALL MOVE_ALLOC(POINTER_INTENT_IN_VARIABLE%VALUE, LOCAL_VALUE)
++
++ RETURN
++ END SUBROUTINE POINTER_INTENT_IN_BUG_FAILING
++end module bug
++
++subroutine test1()
++ TYPE MY_TYPE
++ INTEGER, ALLOCATABLE :: VALUE
++ END TYPE
++CONTAINS
++ SUBROUTINE sub (dt)
++ type(MY_TYPE), intent(in) :: dt
++ INTEGER, ALLOCATABLE :: lv
++ call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
++ END SUBROUTINE
++end subroutine test1
+
-+ PR libgfortran/31051
-+ * gfortran.dg/fmt_t_3.f90: New.
++subroutine test2 (x, px)
++ implicit none
++ type t
++ integer, allocatable :: a
++ end type t
+
-+2007-05-22 Dominique d'Humieres <dominiq@lps.ens.fr>
++ type t2
++ type(t), pointer :: ptr
++ integer, allocatable :: a
++ end type t2
+
-+ * gfortran.dg/unf_io_convert_3.f90: Fix dg directive.
++ type(t2), intent(in) :: x
++ type(t2), pointer, intent(in) :: px
+
-+2007-05-22 Tobias Burnus <burnus@net-b.de>
++ integer, allocatable :: a
++ type(t2), pointer :: ta
+
-+ PR fortran/31559
-+ Backport from mainline.
-+ * func_assign.f90: New test.
++ call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
++ call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
++ call move_alloc (x%ptr%a, a) ! OK (3)
++ call move_alloc (px%a, a) ! OK (4)
++ call move_alloc (px%ptr%a, a) ! OK (5)
++end subroutine test2
+
-+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
++subroutine test3 (x, px)
++ implicit none
++ type t
++ integer, allocatable :: a
++ end type t
++
++ type t2
++ class(t), pointer :: ptr
++ integer, allocatable :: a
++ end type t2
++
++ type(t2), intent(in) :: x
++ class(t2), pointer, intent(in) :: px
++
++ integer, allocatable :: a
++ class(t2), pointer :: ta
++
++ call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
++ call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
++ call move_alloc (x%ptr%a, a) ! OK (6)
++ call move_alloc (px%a, a) ! OK (7)
++ call move_alloc (px%ptr%a, a) ! OK (8)
++end subroutine test3
++
++subroutine test4()
++ TYPE MY_TYPE
++ INTEGER, ALLOCATABLE :: VALUE
++ END TYPE
++CONTAINS
++ SUBROUTINE sub (dt)
++ CLASS(MY_TYPE), intent(in) :: dt
++ INTEGER, ALLOCATABLE :: lv
++ call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
++ END SUBROUTINE
++end subroutine test4
+
-+ PR target/31167
-+ Backport from mainline.
-+ * gcc.target/i386/pr31167.c: New test.
++! { dg-final { cleanup-modules "bug" } }
+Index: gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++! { dg-do compile }
++!
++! PR fortran/51448
++!
++! Contribued by François Willot
++!
++ PROGRAM MAIN
++ IMPLICIT NONE
++ TYPE mytype
++ REAL b(2)
++ END TYPE mytype
++ TYPE(mytype) a
++ DOUBLE PRECISION, ALLOCATABLE :: x(:)
++ ALLOCATE(x(2))
++ a%b=0.0E0
++ x=a%b
++ END
+Index: gcc/testsuite/gfortran.dg/implicit_pure_2.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/implicit_pure_2.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/implicit_pure_2.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++! { dg-do compile }
++! PR 51502 - this was wrongly detected to be implicit pure.
++module m
++ integer :: i
++contains
++ subroutine foo(x)
++ integer, intent(inout) :: x
++ outer: block
++ block
++ i = 5
++ end block
++ end block outer
++ end subroutine foo
++end module m
++
++! { dg-final { scan-module-absence "m" "IMPLICIT_PURE" } }
++! { dg-final { cleanup-modules "m" } }
+Index: gcc/testsuite/gfortran.dg/intrinsic_size_2.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++! { dg-do compile }
++!
++! PR fortran/51904
++!
++! Contributed by David Sagan.
++!
+
-+2007-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
++call qp_draw_polyline_basic([1.0,2.0])
++contains
++subroutine qp_draw_polyline_basic (x)
++ implicit none
++ real :: x(:), f
++ integer :: i
++ f = 0
++ print *, size(f*x)
++end subroutine
++end
+Index: gcc/testsuite/gfortran.dg/default_initialization_5.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/default_initialization_5.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/default_initialization_5.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,66 @@
++! { dg-do run }
++! { dg-options "-fdump-tree-original" }
++!
++! PR fortran/51435
++!
++! Contributed by darmar.xxl@gmail.com
++!
++module arr_m
++ type arr_t
++ real(8), dimension(:), allocatable :: rsk
++ end type
++ type arr_t2
++ integer :: a = 77
++ end type
++end module arr_m
++!*********************
++module list_m
++ use arr_m
++ implicit none
+
-+ PR libgfortran/31395
-+ * gfortran.dg/fmt_colon.f90: New test.
++ type(arr_t2), target :: tgt
++
++ type my_list
++ type(arr_t), pointer :: head => null()
++ end type my_list
++ type my_list2
++ type(arr_t2), pointer :: head => tgt
++ end type my_list2
++end module list_m
++!***********************
++module worker_mod
++ use list_m
++ implicit none
+
-+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
++ type data_all_t
++ type(my_list) :: my_data
++ end type data_all_t
++ type data_all_t2
++ type(my_list2) :: my_data
++ end type data_all_t2
++contains
++ subroutine do_job()
++ type(data_all_t) :: dum
++ type(data_all_t2) :: dum2
++
++ if (associated(dum%my_data%head)) then
++ call abort()
++ else
++ print *, 'OK: do_job my_data%head is NOT associated'
++ end if
++
++ if (dum2%my_data%head%a /= 77) &
++ call abort()
++ end subroutine
++end module
++!***************
++program hello
++ use worker_mod
++ implicit none
++ call do_job()
++end program
+
-+ PR fortran/31618
-+ Backport from trunk.
-+ * gfortran.dg/backspace_8.f: New test case.
++! { dg-final { scan-tree-dump-times "my_data.head = 0B" 1 "original" } }
++! { dg-final { scan-tree-dump-times "my_data.head = &tgt" 1 "original" } }
++! { dg-final { cleanup-tree-dump "original" } }
++! { dg-final { cleanup-modules "arr_m list_m worker_mod" } }
+Index: gcc/testsuite/gfortran.dg/move_alloc_12.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/move_alloc_12.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/move_alloc_12.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,33 @@
++! { dg-do compile }
++!
++! PR fortran/51948
++!
++ type :: t
++ end type t
++contains
++ function func(x, y)
++ class(t) :: y
++ type(t), allocatable :: func
++ type(t), allocatable :: x
++
++ select type (y)
++ type is(t)
++ call move_alloc (x, func)
++ end select
++ end function
++
++ function func2(x, y)
++ class(t) :: y
++ class(t), allocatable :: func2
++ class(t), allocatable :: x
++
++ block
++ block
++ select type (y)
++ type is(t)
++ call move_alloc (x, func2)
++ end select
++ end block
++ end block
++ end function
++end
+Index: gcc/testsuite/gfortran.dg/init_flag_9.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/init_flag_9.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/init_flag_9.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,15 @@
++! { dg-do run }
++! { dg-options "-finit-character=89" }
++!
++! PR fortran/51800
++!
+
-+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
++subroutine foo(n)
++ character(len=n) :: str
++! print *, str
++ if (str /= repeat ('Y', n)) call abort()
++end subroutine foo
+
-+ PR libfortran/31196
-+ Backport from trunk.
-+ * gfortran.dg/reshape_transpose_1.f90: New test.
++call foo(3)
++call foo(10)
++end
+Index: gcc/testsuite/gfortran.dg/pr50875.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/pr50875.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/pr50875.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,39 @@
++! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
++! { dg-options "-O3 -mavx" }
++!
++! PR fortran/50875.f90
+
-+2007-05-17 Ian Lance Taylor <iant@google.com>
++module test
+
-+ PR tree-optimization/31953
-+ * gcc.c-torture/compile/pr31953.c: New test.
++ implicit none
+
-+2007-05-17 Eric Botcazou <ebotcazou@libertysurf.fr>
++ integer, parameter :: dp=kind(1.d0)
+
-+ * gcc.c-torture/execute/20070517-1.c: New test.
++ integer :: P = 2
+
-+2007-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
++ real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:)
++ complex(kind=dp), allocatable :: cmplx_array_A(:)
+
-+ PR fortran/31725
-+ * gfortran.dg/substr_4.f: New test.
++contains
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-Index: gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90
-===================================================================
---- gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90 (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -8,7 +8,8 @@
- i = 2
- j = 3
- k = 12
--
-+ a = 5
-+
- if (.not. btest (i, o+1)) call abort
- if (btest (i, o+2)) call abort
- if (iand (i, j) .ne. 2) call abort
-@@ -26,4 +27,6 @@
- if (ishftc (k, o-30) .ne. 48) call abort
- if (ishftc (k, o+1, o+3) .ne. 9) call abort
- if (not (i) .ne. -3) call abort
-+ if (ishftc (a, 1, bit_size(a)) .ne. 10) call abort
-+ if (ishftc (1, 1, 32) .ne. 2) call abort
- end program
-Index: gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C
-===================================================================
---- gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,70 @@
-+// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
-+// { dg-options "-O2" }
++ subroutine routine_A
+
-+// Endian sensitive. This is a little-endian redux.
++ integer :: i
+
-+typedef long long int64;
-+typedef unsigned long long uint64;
-+typedef __SIZE_TYPE__ size_t;
++ allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P))
+
-+extern "C" {
-+extern void *memcpy (void *__restrict __dest,
-+ __const void *__restrict __src, size_t __n) /*throw ()*/;
-+extern void abort (void);
-+}
++ real_array_A = 1
++ real_array_B = 1
+
-+inline uint64 Swap64(uint64 ull) {
-+ uint64 b0 = (ull >> 0) & 0xff;
-+ uint64 b1 = (ull >> 8) & 0xff;
-+ uint64 b2 = (ull >> 16) & 0xff;
-+ uint64 b3 = (ull >> 24) & 0xff;
-+ uint64 b4 = (ull >> 32) & 0xff;
-+ uint64 b5 = (ull >> 40) & 0xff;
-+ uint64 b6 = (ull >> 48) & 0xff;
-+ uint64 b7 = (ull >> 56) & 0xff;
-+ return (b0 << 56) | (b1 << 48) | (b2 << 40) | (b3 << 32) |
-+ (b4 << 24) | (b5 << 16) | (b6 << 8) | (b7 << 0);
-+}
++ do i = 1, p
++ cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp)
++ cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1))
++ end do
+
-+inline void KeyFromUint64(uint64 ull, unsigned char* key) {
-+ uint64 ull_swap = Swap64(ull);
-+ memcpy(key, &ull_swap, sizeof(uint64));
-+}
++ deallocate(cmplx_array_A,real_array_B,real_array_A)
+
-+inline int64 int64_from_double(const double& source) {
-+ int64 dest;
-+ memcpy(&dest, &source, sizeof(dest));
-+ return dest;
-+}
++ end subroutine routine_A
+
-+void KeyFromDouble(double x, unsigned char* key) __attribute__ ((noinline));
-+void KeyFromDouble(double x, unsigned char* key) {
-+ int64 n = int64_from_double(x);
-+ if (n >= 0) {
-+ n += 1ull << 63;
-+ } else {
-+ n = -n;
-+ }
-+ KeyFromUint64(n, key);
-+}
++end module test
+
++! { dg-final { cleanup-modules "test" } }
+Index: gcc/testsuite/gfortran.dg/class_47.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/class_47.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/class_47.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,40 @@
++! { dg-do compile }
++!
++! PR fortran/51913
++!
++! Contributed by Alexander Tismer
++!
++MODULE m_sparseMatrix
+
-+void TestKeyFromDouble(uint64 ull) {
-+ double d;
-+ memcpy(&d, &ull, sizeof(d));
++ implicit none
++
++ type :: sparseMatrix_t
+
-+ unsigned char key[sizeof(uint64)];
-+ unsigned char expected_key[sizeof(uint64)] = { 0x81, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
++ end type sparseMatrix_t
++END MODULE m_sparseMatrix
+
-+ KeyFromDouble(d, key);
++!===============================================================================
++module m_subroutine
++! USE m_sparseMatrix !< when uncommenting this line program works fine
+
-+ for (size_t i = 0; i < sizeof(key); ++i) {
-+ if ((key[i] & 0xff) != expected_key[i])
-+ abort ();
-+ }
-+}
++ implicit none
+
-+int main() {
-+ TestKeyFromDouble(0x0123456789abcdefull);
-+ return 0;
-+}
-Index: gcc/testsuite/g++.dg/tree-ssa/pr32327.C
++ contains
++ subroutine test(matrix)
++ use m_sparseMatrix
++ class(sparseMatrix_t), pointer :: matrix
++ end subroutine
++end module
++
++!===============================================================================
++PROGRAM main
++ use m_subroutine
++ USE m_sparseMatrix
++ implicit none
++
++ CLASS(sparseMatrix_t), pointer :: sparseMatrix
++
++ call test(sparseMatrix)
++END PROGRAM
++
++! { dg-final { cleanup-modules "m_sparsematrix m_subroutine" } }
+Index: gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
===================================================================
---- gcc/testsuite/g++.dg/tree-ssa/pr32327.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/tree-ssa/pr32327.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,84 @@
-+// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
-+// { dg-options "-O2" }
+--- gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,19 @@
++! { dg-do compile }
++! { dg-options "-Wall" }
++!
++! PR fortran/50923
++!
++module m
++contains
++ integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" }
++ end function f
++ integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" }
++ end function g
++ integer pure function i()
++ i = 7
++ end function i
++ integer pure function j() result(k)
++ k = 8
++ end function j
++end module m
++! { dg-final { cleanup-modules "mod" } }
+Index: gcc/testsuite/gfortran.dg/implicit_pure_1.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/implicit_pure_1.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/implicit_pure_1.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,53 @@
++! { dg-do run }
++!
++! PR fortran/51218
++!
++! Contributed by Harald Anlauf
++!
++
++module a
++ implicit none
++ integer :: neval = 0
++contains
++ subroutine inc_eval
++ neval = neval + 1
++ end subroutine inc_eval
++end module a
+
-+typedef unsigned long long uint64;
-+typedef __SIZE_TYPE__ size_t;
++module b
++ use a
++ implicit none
++contains
++ function f(x) ! Should be implicit pure
++ real :: f
++ real, intent(in) :: x
++ f = x
++ end function f
++
++ function g(x) ! Should NOT be implicit pure
++ real :: g
++ real, intent(in) :: x
++ call inc_eval
++ g = x
++ end function g
++end module b
++
++program gfcbug114a
++ use a
++ use b
++ implicit none
++ real :: x = 1, y = 1, t, u, v, w
++ if (neval /= 0) call abort ()
++ t = f(x)*f(y)
++ if (neval /= 0) call abort ()
++ u = f(x)*f(y) + f(x)*f(y)
++ if (neval /= 0) call abort ()
++ v = g(x)*g(y)
++ if (neval /= 2) call abort ()
++ w = g(x)*g(y) + g(x)*g(y)
++ if (neval /= 6) call abort ()
++ if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) call abort ()
++end program gfcbug114a
++
++! { dg-final { scan-module "b" "IMPLICIT_PURE" } }
++! { dg-final { cleanup-modules "b" } }
+Index: gcc/testsuite/gfortran.dg/init_flag_8.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/init_flag_8.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gfortran.dg/init_flag_8.f90 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
++! { dg-do compile }
++! { dg-options "-fno-automatic -finit-local-zero" }
++!
++! PR fortran/51800
++!
++! Contributed by Mario Baumann
++!
++ SUBROUTINE FOO( N, A )
++ IMPLICIT NONE
++ INTEGER :: N
++ INTEGER :: A(1:N)
++ INTEGER :: J
++ INTEGER :: DUMMY(1:N)
++ DO J=1,N
++ DUMMY(J) = 0
++ A(J) = DUMMY(J)
++ END DO
++ END SUBROUTINE FOO
+Index: gcc/testsuite/gcc.c-torture/execute/doloop-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/doloop-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/doloop-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
++#include <limits.h>
+
-+extern "C" {
-+extern void *memcpy (void *__restrict __dest,
-+ __const void *__restrict __src, size_t __n) /*throw ()*/;
++extern void exit (int);
+extern void abort (void);
-+}
+
-+extern void foo (void* p);
-+
-+inline uint64
-+ghtonll(uint64 x)
-+{
-+ // __r is allocated the same stack slot as dest below
-+ union { unsigned long long int __ll;
-+ unsigned long int __l[2]; } __w, __r;
-+ __w.__ll = x;
-+ __r.__l[0] = (
-+ {
-+ register unsigned int __v;
-+ __asm__ __volatile__ ("bswap %0" : "=r" (__v) :
-+ "0" ((unsigned int) (__w.__l[1])));
-+ __v; });
-+
-+ __r.__l[1] = (
-+ {
-+ register unsigned int __v;
-+ __asm__ __volatile__ ("bswap %0" : "=r" (__v) :
-+ "0" ((unsigned int) (__w.__l[0])));
-+ __v; });
-+
-+ return __r.__ll;
-+}
++volatile unsigned int i;
+
-+inline uint64
-+double_2_uint64 (const double *source)
++int
++main (void)
+{
-+ uint64 dest; // allocated the same stack slot as __r above
-+ memcpy(&dest, source, sizeof(dest));
-+ return dest;
-+}
++ unsigned char z = 0;
+
-+inline void
-+KeyFromUint64(uint64 fp) {
-+ uint64 norder;
-+ norder = ghtonll (fp);
-+ foo((char*)(&norder));
++ do ++i;
++ while (--z > 0);
++ if (i != UCHAR_MAX + 1U)
++ abort ();
++ exit (0);
+}
+Index: gcc/testsuite/gcc.c-torture/execute/20120111-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/20120111-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/20120111-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
++#include <stdlib.h>
++#include <stdint.h>
+
-+void
-+KeyFromDouble(double x) {
-+ uint64 n = double_2_uint64 (&x);
-+ if (n >= 42) {
-+ n += 1;
-+ }
++uint32_t f0a (uint64_t arg2) __attribute__((noinline));
+
-+ KeyFromUint64(n);
++uint32_t
++f0a (uint64_t arg)
++{
++ return ~(arg > -3);
+}
+
-+#define NUM 0x0123456789abcdefll
-+#define EXPECTED 0xe0bc9a7856347243ll
-+
-+void foo (void *x)
-+{
-+ if (*((uint64 *)x) != (uint64) EXPECTED)
++int main() {
++ uint32_t r1;
++ r1 = f0a (12094370573988097329ULL);
++ if (r1 != ~0U)
+ abort ();
++ return 0;
+}
+Index: gcc/testsuite/gcc.c-torture/execute/pr51466.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/pr51466.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/pr51466.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,43 @@
++/* PR tree-optimization/51466 */
+
-+int main ()
++extern void abort (void);
++
++__attribute__((noinline, noclone)) int
++foo (int i)
+{
-+ if (sizeof (double) != sizeof (uint64))
-+ return 0;
++ volatile int v[4];
++ int *p;
++ v[i] = 6;
++ p = (int *) &v[i];
++ return *p;
++}
+
-+ if (sizeof (uint64) == sizeof (unsigned long int))
-+ return 0;
++__attribute__((noinline, noclone)) int
++bar (int i)
++{
++ volatile int v[4];
++ int *p;
++ v[i] = 6;
++ p = (int *) &v[i];
++ *p = 8;
++ return v[i];
++}
+
-+ KeyFromDouble ((double)NUM);
++__attribute__((noinline, noclone)) int
++baz (int i)
++{
++ volatile int v[4];
++ int *p;
++ v[i] = 6;
++ p = (int *) &v[0];
++ *p = 8;
++ return v[i];
++}
+
++int
++main ()
++{
++ if (foo (3) != 6 || bar (2) != 8 || baz (0) != 8 || baz (1) != 6)
++ abort ();
+ return 0;
+}
-Index: gcc/testsuite/g++.dg/conversion/enum1.C
+Index: gcc/testsuite/gcc.c-torture/execute/20111212-1.c
===================================================================
---- gcc/testsuite/g++.dg/conversion/enum1.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/conversion/enum1.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,10 @@
-+// { dg-do run }
-+// { dg-options "-O2 -finline-functions" }
+--- gcc/testsuite/gcc.c-torture/execute/20111212-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/20111212-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,34 @@
++/* PR tree-optimization/50569 */
++/* Reported by Paul Koning <pkoning@gcc.gnu.org> */
++/* Reduced testcase by Mikael Pettersson <mikpe@it.uu.se> */
++
++struct event {
++ struct {
++ unsigned int sec;
++ } sent __attribute__((packed));
++};
++
++void __attribute__((noinline,noclone)) frob_entry(char *buf)
++{
++ struct event event;
+
-+enum E { V = 1 };
-+static const E E_MIN = V;
-+static const E E_MAX = V;
++ __builtin_memcpy(&event, buf, sizeof(event));
++ if (event.sent.sec < 64) {
++ event.sent.sec = -1U;
++ __builtin_memcpy(buf, &event, sizeof(event));
++ }
++}
+
-+bool valid(E v) { return v >= E_MIN && v <= E_MAX; }
++int main(void)
++{
++ union {
++ char buf[1 + sizeof(struct event)];
++ int align;
++ } u;
+
-+int main() { return valid(E(2)); }
-Index: gcc/testsuite/g++.dg/ext/asm10.C
-===================================================================
---- gcc/testsuite/g++.dg/ext/asm10.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/ext/asm10.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,14 @@
-+// PR inline-asm/32109
-+// { dg-do compile }
-+// { dg-options "-O2" }
++ __builtin_memset(&u, 0, sizeof u);
+
-+struct A { int i[3]; ~A (); };
-+struct A a;
-+struct B { struct A c; int i; B (); } b;
++ frob_entry(&u.buf[1]);
+
-+B::B ()
-+{
-+ __asm ("" : : "r" (a)); // { dg-error "impossible constraint|non-memory input" }
-+ __asm ("" : : "r" (b.c)); // { dg-error "impossible constraint|non-memory input" }
-+ __asm ("" : : "r" (c)); // { dg-error "impossible constraint|non-memory input" }
++ return 0;
+}
-Index: gcc/testsuite/g++.dg/gomp/pr31769.C
+Index: gcc/testsuite/gcc.c-torture/execute/20120105-1.c
===================================================================
---- gcc/testsuite/g++.dg/gomp/pr31769.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/gomp/pr31769.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,61 @@
-+// PR tree-optimization/31769
-+// { dg-options "-O2 -fopenmp" }
-+// { dg-do compile }
-+
-+struct B
+--- gcc/testsuite/gcc.c-torture/execute/20120105-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/20120105-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,24 @@
++struct __attribute__((packed)) S
+{
-+ B () {}
-+ virtual ~B () {}
++ int a, b, c;
+};
-+struct C
++
++static int __attribute__ ((noinline,noclone))
++extract(const char *p)
+{
-+ C (int x, int y) {}
-+};
-+template<typename T, int U>
-+struct D
++ struct S s;
++ __builtin_memcpy (&s, p, sizeof(struct S));
++ return s.a;
++}
++
++volatile int i;
++
++int main (void)
+{
-+ D () {}
-+ ~D () {}
-+};
-+struct E
++ char p[sizeof(struct S) + 1];
++
++ __builtin_memset (p, 0, sizeof(struct S) + 1);
++ i = extract (p + 1);
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.c-torture/execute/pr51323.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/pr51323.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/pr51323.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,35 @@
++/* PR middle-end/51323 */
++
++extern void abort (void);
++struct S { int a, b, c; };
++int v;
++
++__attribute__((noinline, noclone)) void
++foo (int x, int y, int z)
+{
-+ E () {}
-+ ~E () {}
-+ D<int, 1> e;
-+};
-+struct A
++ if (x != v || y != 0 || z != 9)
++ abort ();
++}
++
++static inline int
++baz (const struct S *p)
+{
-+ B *b;
-+ A () { b = __null; }
-+ ~A () { if (b != __null) delete b; }
-+};
-+struct F : public A
++ return p->b;
++}
++
++__attribute__((noinline, noclone)) void
++bar (int x, struct S y)
+{
-+ explicit F (int x) { foo (0); }
-+ F (const F &x) {}
-+ F (F &x, C y) {}
-+ F operator () (C x) const
-+ {
-+ return F (const_cast<F &>(*this), x);
-+ }
-+ template <typename U> F & operator+= (const U &);
-+ void foo (int);
-+ E f;
-+};
++ foo (baz (&y), 0, x);
++}
+
+int
+main ()
+{
-+ try
-+ {
-+ F f (10);
-+ F g (10);
-+ C h (0, 9);
-+#pragma omp parallel for
-+ for (int i = 0; i < 2; ++i)
-+ g += f (h);
-+ }
-+ catch (int &e)
-+ {
-+ }
++ struct S s;
++ v = 3; s.a = v - 1; s.b = v; s.c = v + 1;
++ bar (9, s);
++ v = 17; s.a = v - 1; s.b = v; s.c = v + 1;
++ bar (9, s);
++ return 0;
+}
-Index: gcc/testsuite/g++.dg/opt/pr30252.C
+Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c
===================================================================
---- gcc/testsuite/g++.dg/opt/pr30252.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/opt/pr30252.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,226 @@
-+/* { dg-do run } */
-+/* { dg-options "-O -fstrict-aliasing" } */
+--- gcc/testsuite/gcc.c-torture/execute/20111208-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,94 @@
++/* PR tree-optimization/51315 */
++/* Reported by Jurij Smakov <jurij@wooyd.org> */
+
-+extern "C" void abort (void);
-+namespace sigc {
-+ template <class T_type>
-+ struct type_trait
-+ {
-+ typedef T_type& pass;
-+ typedef const T_type& take;
-+ typedef T_type* pointer;
-+ };
-+ template <class T_base, class T_derived>
-+ struct is_base_and_derived
-+ {
-+ struct big {
-+ char memory[64];
-+ };
-+ static big is_base_class_(...);
-+ static char is_base_class_(typename type_trait<T_base>::pointer);
-+ static const bool value =
-+ sizeof(is_base_class_(reinterpret_cast<typename type_trait<T_derived>::pointer>(0))) ==
-+ sizeof(char);
-+ };
-+ struct nil;
-+ struct functor_base {};
-+ template <class T_functor, bool I_derives_functor_base=is_base_and_derived<functor_base,T_functor>::value>
-+ struct functor_trait
-+ {
-+ };
-+ template <class T_functor>
-+ struct functor_trait<T_functor,true>
-+ {
-+ typedef typename T_functor::result_type result_type;
-+ typedef T_functor functor_type;
-+ };
-+ template <class T_arg1, class T_return>
-+ class pointer_functor1 : public functor_base
-+ {
-+ typedef T_return (*function_type)(T_arg1);
-+ function_type func_ptr_;
-+ public:
-+ typedef T_return result_type;
-+ explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {}
-+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
-+ { return func_ptr_(_A_a1); }
-+ };
-+ template <class T_arg1, class T_return>
-+ inline pointer_functor1<T_arg1, T_return>
-+ ptr_fun1(T_return (*_A_func)(T_arg1))
-+ { return pointer_functor1<T_arg1, T_return>(_A_func); }
-+ struct adaptor_base : public functor_base {};
-+ template <class T_functor,
-+ class T_arg1=void,
-+ bool I_derives_adaptor_base=is_base_and_derived<adaptor_base,T_functor>::value>
-+ struct deduce_result_type
-+ { typedef typename functor_trait<T_functor>::result_type type; };
-+ template <class T_functor>
-+ struct adaptor_functor : public adaptor_base
-+ {
-+ template <class T_arg1=void>
-+ struct deduce_result_type
-+ { typedef typename sigc::deduce_result_type<T_functor, T_arg1>::type type; };
-+ typedef typename functor_trait<T_functor>::result_type result_type;
-+ result_type
-+ operator()() const;
-+ template <class T_arg1>
-+ typename deduce_result_type<T_arg1>::type
-+ operator()(T_arg1 _A_arg1) const
-+ { return functor_(_A_arg1); }
-+ explicit adaptor_functor(const T_functor& _A_functor)
-+ : functor_(_A_functor)
-+ {}
-+ mutable T_functor functor_;
-+ };
-+ template <class T_functor>
-+ typename adaptor_functor<T_functor>::result_type
-+ adaptor_functor<T_functor>::operator()() const
-+ { return functor_(); }
-+ template <class T_functor, bool I_isadaptor = is_base_and_derived<adaptor_base, T_functor>::value> struct adaptor_trait;
-+ template <class T_functor>
-+ struct adaptor_trait<T_functor, true>
-+ {
-+ typedef T_functor adaptor_type;
-+ };
-+ template <class T_functor>
-+ struct adaptor_trait<T_functor, false>
-+ {
-+ typedef typename functor_trait<T_functor>::functor_type functor_type;
-+ typedef adaptor_functor<functor_type> adaptor_type;
-+ };
-+ template <class T_functor>
-+ struct adapts : public adaptor_base
-+ {
-+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
-+ explicit adapts(const T_functor& _A_functor)
-+ : functor_(_A_functor)
-+ {}
-+ mutable adaptor_type functor_;
-+ };
-+ template <class T_type>
-+ struct reference_wrapper
-+ {
-+ };
-+ template <class T_type>
-+ struct unwrap_reference
-+ {
-+ typedef T_type type;
-+ };
-+ template <class T_type>
-+ class bound_argument
-+ {
-+ public:
-+ bound_argument(const T_type& _A_argument)
-+ : visited_(_A_argument)
-+ {}
-+ inline T_type& invoke()
-+ { return visited_; }
-+ T_type visited_;
-+ };
-+ template <class T_wrapped>
-+ class bound_argument< reference_wrapper<T_wrapped> >
-+ {
-+ };
-+ template <int I_location, class T_functor, class T_type1=nil>
-+ struct bind_functor;
-+ template <class T_functor, class T_type1>
-+ struct bind_functor<-1, T_functor, T_type1> : public adapts<T_functor>
-+ {
-+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
-+ typedef typename adaptor_type::result_type result_type;
-+ result_type
-+ operator()()
-+ {
-+ return this->functor_.template operator()<typename type_trait<typename unwrap_reference<T_type1>::type>::pass> (bound1_.invoke());
-+ }
-+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1)
-+ : adapts<T_functor>(_A_func), bound1_(_A_bound1)
-+ {}
-+ bound_argument<T_type1> bound1_;
-+ };
-+ template <class T_type1, class T_functor>
-+ inline bind_functor<-1, T_functor,
-+ T_type1>
-+ bind(const T_functor& _A_func, T_type1 _A_b1)
-+ { return bind_functor<-1, T_functor,
-+ T_type1>
-+ (_A_func, _A_b1);
-+ }
-+ namespace internal {
-+ struct slot_rep;
-+ typedef void* (*hook)(slot_rep *);
-+ struct slot_rep
++typedef unsigned int size_t;
++
++extern void *memcpy (void *__restrict __dest,
++ __const void *__restrict __src, size_t __n)
++ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
++
++extern size_t strlen (__const char *__s)
++ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
++
++typedef short int int16_t;
++typedef int int32_t;
++
++extern void abort (void);
++
++int a;
++
++static void __attribute__ ((noinline,noclone))
++do_something (int item)
++{
++ a = item;
++}
++
++int
++pack_unpack (char *s, char *p)
++{
++ char *send, *pend;
++ char type;
++ int integer_size;
++
++ send = s + strlen (s);
++ pend = p + strlen (p);
++
++ while (p < pend)
+ {
-+ hook call_;
-+ };
-+ }
-+ class slot_base : public functor_base
++ type = *p++;
++
++ switch (type)
++ {
++ case 's':
++ integer_size = 2;
++ goto unpack_integer;
++
++ case 'l':
++ integer_size = 4;
++ goto unpack_integer;
++
++ unpack_integer:
++ switch (integer_size)
++ {
++ case 2:
++ {
++ union
+ {
-+ public:
-+ typedef internal::slot_rep rep_type;
-+ explicit slot_base(rep_type* rep)
-+ : rep_(rep)
-+ {
-+ }
-+ mutable rep_type *rep_;
-+ };
-+ namespace internal {
-+ template <class T_functor>
-+ struct typed_slot_rep : public slot_rep
-+ {
-+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
-+ adaptor_type functor_;
-+ inline typed_slot_rep(const T_functor& functor)
-+ : functor_(functor)
-+ {
-+ }
-+ };
-+ template<class T_functor>
-+ struct slot_call0
-+ {
-+ static void *call_it(slot_rep* rep)
-+ {
-+ typedef typed_slot_rep<T_functor> typed_slot;
-+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
-+ return (typed_rep->functor_)();
-+ }
-+ static hook address()
-+ {
-+ return &call_it;
-+ }
-+ };
++ int16_t i;
++ char a[sizeof (int16_t)];
+ }
++ v;
++ memcpy (v.a, s, sizeof (int16_t));
++ s += sizeof (int16_t);
++ do_something (v.i);
++ }
++ break;
+
-+ class slot0 : public slot_base
++ case 4:
++ {
++ union
+ {
-+ public:
-+ typedef void * (*call_type)(rep_type*);
-+ inline void *operator()() const
-+ {
-+ return slot_base::rep_->call_ (slot_base::rep_);
-+ }
-+ template <class T_functor>
-+ slot0(const T_functor& _A_func)
-+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
-+ {
-+ slot_base::rep_->call_ = internal::slot_call0<T_functor>::address();
++ int32_t i;
++ char a[sizeof (int32_t)];
++ }
++ v;
++ memcpy (v.a, s, sizeof (int32_t));
++ s += sizeof (int32_t);
++ do_something (v.i);
++ }
++ break;
++ }
++ break;
++ }
+ }
-+ };
-+}
-+struct A
-+{
-+ static void *foo (void *p) { return p; }
-+ typedef sigc::slot0 C;
-+ C bar();
-+};
-+A::C A::bar ()
-+{
-+ return sigc::bind (sigc::ptr_fun1 (&A::foo), (void*)0);
++ return (int) *s;
+}
-+int main (void)
++
++int
++main (void)
+{
-+ A a;
-+ if (a.bar ()() != 0)
++ int n = pack_unpack ("\200\001\377\376\035\300", "sl");
++ if (n != 0)
+ abort ();
++ return 0;
+}
-Index: gcc/testsuite/g++.dg/opt/static5.C
+Index: gcc/testsuite/gcc.c-torture/execute/doloop-2.c
===================================================================
---- gcc/testsuite/g++.dg/opt/static5.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/opt/static5.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,29 @@
-+// PR c++/31809
-+// { dg-do run }
-+// { dg-options "-O2" }
-+
-+struct S
-+{
-+ unsigned v;
-+ static inline S f (unsigned a);
-+};
-+
-+inline S
-+S::f (unsigned a)
-+{
-+ static S t = { a };
-+ return t;
-+}
+--- gcc/testsuite/gcc.c-torture/execute/doloop-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/execute/doloop-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
++#include <limits.h>
+
-+const static S s = S::f (26);
++extern void exit (int);
++extern void abort (void);
+
-+extern "C" void abort (void);
++volatile unsigned int i;
+
+int
-+main ()
++main (void)
+{
-+ S t = s;
-+ if (t.v != 26)
++ unsigned short z = 0;
++
++ do ++i;
++ while (--z > 0);
++ if (i != USHRT_MAX + 1U)
+ abort ();
-+ return 0;
++ exit (0);
+}
-Index: gcc/testsuite/g++.dg/opt/nrv13.C
+Index: gcc/testsuite/gcc.c-torture/compile/pr51077.c
===================================================================
---- gcc/testsuite/g++.dg/opt/nrv13.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/opt/nrv13.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,42 @@
-+// PR tree-optimization/32353
-+// { dg-do run }
-+// { dg-options "-O2" }
-+
-+extern "C" void abort ();
+--- gcc/testsuite/gcc.c-torture/compile/pr51077.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/compile/pr51077.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,15 @@
++/* PR middle-end/51077 */
+
-+struct A
-+{
-+ int f;
-+ A (int x) : f (x) {}
-+};
++struct S { unsigned char s, t[256]; };
+
-+A
-+foo (const A &x, const A &y)
++void
++foo (const struct S *x, struct S *y, int z)
+{
-+ A r (0);
-+ r = x.f == -111 ? y : (y.f == -111 || x.f > y.f) ? x : y;
-+ A s (0);
-+ r = r.f == -111 ? s : (r.f > s.f) ? r : s;
-+ return r;
++ int i;
++ for (i = 0; i < 8; i++)
++ {
++ const struct S *a = &x[i];
++ __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0));
++ y = (struct S *) &y->t[z];
++ }
+}
-+
-+int
-+main ()
+Index: gcc/testsuite/gcc.c-torture/compile/20110913-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/compile/20110913-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.c-torture/compile/20110913-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,26 @@
++struct ieee754_double {
++ double d;
++};
++extern const float __exp_deltatable[178];
++float __ieee754_expf (float x)
+{
-+ if (foo (A (0), A (1)).f != 1)
-+ abort ();
-+ if (foo (A (1), A (9)).f != 9)
-+ abort ();
-+ if (foo (A (9), A (1)).f != 9)
-+ abort ();
-+ if (foo (A (-4), A (-5)).f != 0)
-+ abort ();
-+ if (foo (A (-111), A (-111)).f != 0)
-+ abort ();
-+ if (foo (A (2), A (-111)).f != 2)
-+ abort ();
-+ if (foo (A (-111), A (6)).f != 6)
-+ abort ();
-+ if (foo (A (-111), A (-4)).f != 0)
-+ abort ();
++ static const float himark = 88.72283935546875;
++ static const float lomark = -103.972084045410;
++ if (__builtin_isless(x, himark) && __builtin_isgreater(x, lomark))
++ {
++ int tval;
++ double x22, t, result, dx;
++ float delta;
++ struct ieee754_double ex2_u;
++ dx -= t;
++ tval = (int) (t * 512.0);
++ if (t >= 0)
++ delta = - __exp_deltatable[tval];
++ else
++ delta = __exp_deltatable[-tval];
++ x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
++ result = x22 * ex2_u.d + ex2_u.d;
++ return (float) result;
++ }
++ return x;
+}
-Index: gcc/testsuite/g++.dg/lookup/anon6.C
+Index: gcc/testsuite/gnat.dg/frame_overflow.adb
===================================================================
---- gcc/testsuite/g++.dg/lookup/anon6.C (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/g++.dg/lookup/anon6.C (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,11 @@
-+extern int v1; // { dg-error "declared" }
-+static union { int v1; }; // { dg-error "redeclaration" }
+--- gcc/testsuite/gnat.dg/frame_overflow.adb (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gnat.dg/frame_overflow.adb (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,27 +1,20 @@
+ -- { dg-do compile }
+
+-with System;
++package body Frame_Overflow is
+
+-procedure frame_overflow is
+-
+- type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
+- type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
+-
+- type Bitmap_T is record
+- Bits : Bitmap_Array_T := (others => False);
+- end record;
+-
+- function
++ function -- { dg-error "too large" }
+ Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T
+ is
+- Result: Bitmap_T := Bitmap; -- { dg-error "Storage_Error" }
++ Result: Bitmap_T := Bitmap;
+ begin
+ Result.Bits (Bitpos) := True;
+ return Result;
+ end;
+
+- function Negate (Bitmap : Bitmap_T) return Bitmap_T is
+- Result: Bitmap_T; -- { dg-error "Storage_Error" }
++ function -- { dg-error "too large" }
++ Negate (Bitmap : Bitmap_T) return Bitmap_T
++ is
++ Result: Bitmap_T;
+ begin
+ for E in Bitpos_Range_T loop
+ Result.Bits (E) := not Bitmap.Bits (E);
+@@ -29,6 +22,4 @@
+ return Result;
+ end;
+
+-begin
+- null;
+-end;
++end Frame_Overflow;
+Index: gcc/testsuite/gnat.dg/frame_overflow.ads
+===================================================================
+--- gcc/testsuite/gnat.dg/frame_overflow.ads (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gnat.dg/frame_overflow.ads (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++with System;
++
++package Frame_Overflow is
++
++ type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
++ type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
++
++ type Bitmap_T is record
++ Bits : Bitmap_Array_T := (others => False);
++ end record;
+
-+static union { int v2; }; // { dg-error "declared" }
-+extern int v2; // { dg-error "redeclaration" }
++ function
++ Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T;
+
-+int v3; // { dg-error "declared" }
-+static union { int v3; }; // { dg-error "redeclaration" }
++ function Negate (Bitmap : Bitmap_T) return Bitmap_T;
+
-+static union { int v4; }; // { dg-error "declared" }
-+static union { int v4; }; // { dg-error "redeclaration" }
-Index: gcc/testsuite/gfortran.dg/char_length_5.f90
++end Frame_Overflow;
+Index: gcc/testsuite/gnat.dg/renaming5.adb
===================================================================
---- gcc/testsuite/gfortran.dg/char_length_5.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/char_length_5.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,61 @@
-+! { dg-do run }
-+! Tests the fix for PR31867, in which the interface evaluation
-+! of the character length of 'join' (ie. the length available in
-+! the caller) was wrong.
-+!
-+! Contributed by <beliavsky@aol.com>
-+!
-+module util_mod
-+ implicit none
-+contains
-+ function join (words, sep) result(str)
-+ character (len=*), intent(in) :: words(:),sep
-+ character (len = (size (words) - 1) * len_trim (sep) + &
-+ sum (len_trim (words))) :: str
-+ integer :: i,nw
-+ nw = size (words)
-+ str = ""
-+ if (nw < 1) then
-+ return
-+ else
-+ str = words(1)
-+ end if
-+ do i=2,nw
-+ str = trim (str) // trim (sep) // words(i)
-+ end do
-+ end function join
-+end module util_mod
-+!
-+program xjoin
-+ use util_mod, only: join
-+ implicit none
-+ integer yy
-+ character (len=5) :: words(5:8) = (/"two ","three","four ","five "/), sep = "^#^"
-+ character (len=5) :: words2(4) = (/"bat ","ball ","goal ","stump"/), sep2 = "&"
+--- gcc/testsuite/gnat.dg/renaming5.adb (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gnat.dg/renaming5.adb (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,30 @@
++-- PR ada/46192
++-- Testcase by Rolf Ebert <rolf.ebert.gcc@gmx.de>
+
-+ if (join (words, sep) .ne. "two^#^three^#^four^#^five") call abort ()
-+ if (len (join (words, sep)) .ne. 25) call abort ()
++-- { dg-do compile }
++-- { dg-options "-O2 -fdump-tree-optimized" }
+
-+ if (join (words(5:6), sep) .ne. "two^#^three") call abort ()
-+ if (len (join (words(5:6), sep)) .ne. 11) call abort ()
++with System; use System;
+
-+ if (join (words(7:8), sep) .ne. "four^#^five") call abort ()
-+ if (len (join (words(7:8), sep)) .ne. 11) call abort ()
++package body Renaming5 is
+
-+ if (join (words(5:7:2), sep) .ne. "two^#^four") call abort ()
-+ if (len (join (words(5:7:2), sep)) .ne. 10) call abort ()
++ type Bits_In_Byte is array (0 .. 7) of Boolean;
++ pragma Pack (Bits_In_Byte);
+
-+ if (join (words(6:8:2), sep) .ne. "three^#^five") call abort ()
-+ if (len (join (words(6:8:2), sep)) .ne. 12) call abort ()
++ A : Bits_In_Byte;
++ for A'Address use System'To_Address(16#c0#);
++ pragma Volatile (A);
+
-+ if (join (words2, sep2) .ne. "bat&ball&goal&stump") call abort ()
-+ if (len (join (words2, sep2)) .ne. 19) call abort ()
++ B : Bits_In_Byte renames A;
+
-+ if (join (words2(1:2), sep2) .ne. "bat&ball") call abort ()
-+ if (len (join (words2(1:2), sep2)) .ne. 8) call abort ()
++ procedure Proc is
++ begin
++ while B (0) = False loop
++ null;
++ end loop;
++ end;
+
-+ if (join (words2(2:4:2), sep2) .ne. "ball&stump") call abort ()
-+ if (len (join (words2(2:4:2), sep2)) .ne. 10) call abort ()
++end Renaming5;
+
-+end program xjoin
-+! { dg-final { cleanup-modules "util_mod" } }
-Index: gcc/testsuite/gfortran.dg/array_reference_1.f90
++-- { dg-final { scan-tree-dump-times "goto" 2 "optimized" } }
++-- { dg-final { cleanup-tree-dump "optimized" } }
+Index: gcc/testsuite/gnat.dg/renaming5.ads
===================================================================
---- gcc/testsuite/gfortran.dg/array_reference_1.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/array_reference_1.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,35 @@
-+! { dg-do run }
-+! Tests the fix for PR31994, aka 31867, in which the offset
-+! of 'a' in both subroutines was being evaluated incorrectly.
-+! The testcase for PR31867 is char_length_5.f90
-+!
-+! Contributed by Elizabeth Yip <elizabeth.l.yip@boeing.com>
-+! and Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
-+!
-+program main
-+ call PR31994
-+ call PR31994_comment6
-+contains
-+ subroutine PR31994
-+ implicit none
-+ complex (kind=4), dimension(2,2) :: a, b, c
-+ a(1,1) = (1.,1.)
-+ a(2,1) = (2.,2.)
-+ a(1,2) = (3.,3.)
-+ a(2,2) = (4.,4.)
-+ b=conjg (transpose (a))
-+ c=transpose (a)
-+ c=conjg (c)
-+ if (any (b .ne. c)) call abort ()
-+ end subroutine PR31994
-+ subroutine PR31994_comment6
-+ implicit none
-+ real ,dimension(2,2)::a
-+ integer ,dimension(2,2) :: b, c
-+ a = reshape ((/1.,2.,3.,4./), (/2,2/))
-+ b=int (transpose(a))
-+ c = int (a)
-+ c = transpose (c)
-+ if (any (b .ne. c)) call abort ()
-+ end subroutine PR31994_comment6
-+END program main
-Index: gcc/testsuite/gfortran.dg/reshape_transpose_1.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/reshape_transpose_1.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/reshape_transpose_1.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,18 @@
-+! { dg-do run }
-+! PR 31196 - reshape of transposed derived types generated
-+! wront results.
-+program main
-+ implicit none
-+ TYPE datatype
-+ INTEGER :: I
-+ END TYPE datatype
-+ character (len=20) line1, line2
-+ TYPE(datatype), dimension(2,2) :: data, result
-+ data(1,1)%i = 1
-+ data(2,1)%i = 2
-+ data(1,2)%i = 3
-+ data(2,2)%i = 4
-+ write (unit=line1, fmt="(4I4)") reshape(transpose(data),shape(data))
-+ write (unit=line2, fmt="(4I4)") (/ 1, 3, 2, 4 /)
-+ if (line1 /= line2) call abort
-+END program main
-Index: gcc/testsuite/gfortran.dg/common_resize_1.f
-===================================================================
---- gcc/testsuite/gfortran.dg/common_resize_1.f (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/common_resize_1.f (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,176 @@
-+c { dg-do run }
-+c { dg-options "-std=legacy" }
-+c
-+c Tests the fix for PR32302, in which the resizing of 'aux32' would cause
-+c misalignment for double precision types and a wrong result would be obtained
-+c at any level of optimization except none.
-+c
-+c Contributed by Dale Ranta <dir@lanl.gov>
-+c
-+ subroutine unpki(ixp,nwcon,nmel)
-+ parameter(lnv=32)
-+ implicit double precision (a-h,o-z) dp
-+c
-+c unpack connection data
-+c
-+ common/aux32/kka(lnv),kkb(lnv),kkc(lnv),
-+ 1 kk1(lnv),kk2(lnv),kk3(lnv),dxy(lnv),
-+ 2 dyx(lnv),dyz(lnv),dzy(lnv),dzx(lnv),
-+ 3 dxz(lnv),vx17(lnv),vx28(lnv),vx35(lnv),
-+ 4 vx46(lnv),vy17(lnv),vy28(lnv),
-+ 5 vy35(lnv),vy46(lnv),vz17(lnv),vz28(lnv),vz35(lnv),vz46(lnv)
-+ common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
-+ 1 ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv)
-+ dimension ixp(nwcon,*)
-+c
-+ return
-+ end
-+ subroutine prtal
-+ parameter(lnv=32)
-+ implicit double precision (a-h,o-z) dp
-+ common/aux8/
-+ & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
-+ & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
-+ & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
-+ & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
-+ & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
-+ & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
-+ common/aux9/vlrho(lnv),det(lnv)
-+ common/aux10/
-+ 1 px1(lnv),px2(lnv),px3(lnv),px4(lnv),
-+ & px5(lnv),px6(lnv),px7(lnv),px8(lnv),
-+ 2 py1(lnv),py2(lnv),py3(lnv),py4(lnv),
-+ & py5(lnv),py6(lnv),py7(lnv),py8(lnv),
-+ 3 pz1(lnv),pz2(lnv),pz3(lnv),pz4(lnv),
-+ & pz5(lnv),pz6(lnv),pz7(lnv),pz8(lnv),
-+ 4 vx1(lnv),vx2(lnv),vx3(lnv),vx4(lnv),
-+ 5 vx5(lnv),vx6(lnv),vx7(lnv),vx8(lnv),
-+ 6 vy1(lnv),vy2(lnv),vy3(lnv),vy4(lnv),
-+ 7 vy5(lnv),vy6(lnv),vy7(lnv),vy8(lnv),
-+ 8 vz1(lnv),vz2(lnv),vz3(lnv),vz4(lnv),
-+ 9 vz5(lnv),vz6(lnv),vz7(lnv),vz8(lnv)
-+ common/aux32/ ! { dg-warning "shall be of the same size" }
-+ a a17(lnv),a28(lnv),dett(lnv),
-+ 1 aj1(lnv),aj2(lnv),aj3(lnv),aj4(lnv),
-+ 2 aj5(lnv),aj6(lnv),aj7(lnv),aj8(lnv),
-+ 3 aj9(lnv),x17(lnv),x28(lnv),x35(lnv),
-+ 4 x46(lnv),y17(lnv),y28(lnv),y35(lnv),
-+ 5 y46(lnv),z17(lnv),z28(lnv),z35(lnv),z46(lnv)
-+ common/aux33/ ! { dg-warning "shall be of the same size" }
-+ a ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
-+ 1 ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv),nmel
-+ common/aux36/lft,llt
-+ common/failu/sieu(lnv),failu(lnv)
-+ common/sand1/ihf,ibemf,ishlf,itshf
-+ dimension aj5968(lnv),aj6749(lnv),aj4857(lnv),aji1(lnv),aji2(lnv),
-+ 1 aji3(lnv),aji4(lnv),aji5(lnv),
-+ 1 aji6(lnv),aji7(lnv),aji8(lnv),aji9(lnv),aj12(lnv),
-+ 2 aj45(lnv),aj78(lnv),b17(lnv),b28(lnv),c17(lnv),c28(lnv)
-+c
-+ equivalence (x17,aj5968),(x28,aj6749),(x35,aj4857),(x46,aji1),
-+ 1 (y17,aji2),(y28,aji3),(y35,aji4),(y46,aji5),(z17,aji6),
-+ 2 (z28,aji7),(z35,aji8),(z46,aji9),(aj1,aj12),(aj2,aj45),
-+ 3 (aj3,aj78),(px1,b17),(px2,b28),(px3,c17),(px4,c28)
-+ data o64th/0.0156250/
-+c
-+c jacobian matrix
-+c
-+ do 10 i=lft,llt
-+ x17(i)=x7(i)-x1(i)
-+ x28(i)=x8(i)-x2(i)
-+ x35(i)=x5(i)-x3(i)
-+ x46(i)=x6(i)-x4(i)
-+ y17(i)=y7(i)-y1(i)
-+ y28(i)=y8(i)-y2(i)
-+ y35(i)=y5(i)-y3(i)
-+ y46(i)=y6(i)-y4(i)
-+ z17(i)=z7(i)-z1(i)
-+ z28(i)=z8(i)-z2(i)
-+ z35(i)=z5(i)-z3(i)
-+ 10 z46(i)=z6(i)-z4(i)
-+ do 20 i=lft,llt
-+ aj1(i)=x17(i)+x28(i)-x35(i)-x46(i)
-+ aj2(i)=y17(i)+y28(i)-y35(i)-y46(i)
-+ aj3(i)=z17(i)+z28(i)-z35(i)-z46(i)
-+ a17(i)=x17(i)+x46(i)
-+ a28(i)=x28(i)+x35(i)
-+ b17(i)=y17(i)+y46(i)
-+ b28(i)=y28(i)+y35(i)
-+ c17(i)=z17(i)+z46(i)
-+ 20 c28(i)=z28(i)+z35(i)
-+ do 30 i=lft,llt
-+ aj4(i)=a17(i)+a28(i)
-+ aj5(i)=b17(i)+b28(i)
-+ aj6(i)=c17(i)+c28(i)
-+ aj7(i)=a17(i)-a28(i)
-+ aj8(i)=b17(i)-b28(i)
-+ 30 aj9(i)=c17(i)-c28(i)
-+c
-+c jacobian
-+c
-+ do 40 i=lft,llt
-+ aj5968(i)=aj5(i)*aj9(i)-aj6(i)*aj8(i)
-+ aj6749(i)=aj6(i)*aj7(i)-aj4(i)*aj9(i)
-+ 40 aj4857(i)=aj4(i)*aj8(i)-aj5(i)*aj7(i)
-+ if (ihf.ne.1) then
-+ do 50 i=lft,llt
-+ 50 det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
-+ else
-+ do 55 i=lft,llt
-+ det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
-+ 1 *failu(i) + (1. - failu(i))
-+ 55 continue
-+ endif
-+ do 60 i=lft,llt
-+ 60 dett(i)=o64th/det(i)
-+
-+ if (det(lft) .ne. 1d0) call abort ()
-+ if (det(llt) .ne. 1d0) call abort ()
-+
-+ return
-+c
-+ end
-+ program main
-+ parameter(lnv=32)
-+ implicit double precision (a-h,o-z) dp
-+ common/aux8/
-+ & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
-+ & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
-+ & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
-+ & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
-+ & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
-+ & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
-+ common/aux36/lft,llt
-+ common/sand1/ihf,ibemf,ishlf,itshf
-+ lft=1
-+ llt=1
-+ x1(1)=0
-+ x2(1)=1
-+ x3(1)=1
-+ x4(1)=0
-+ x5(1)=0
-+ x6(1)=1
-+ x7(1)=1
-+ x8(1)=0
-+
-+ y1(1)=0
-+ y2(1)=0
-+ y3(1)=1
-+ y4(1)=1
-+ y5(1)=0
-+ y6(1)=0
-+ y7(1)=1
-+ y8(1)=1
-+
-+ z1(1)=0
-+ z2(1)=0
-+ z3(1)=0
-+ z4(1)=0
-+ z5(1)=1
-+ z6(1)=1
-+ z7(1)=1
-+ z8(1)=1
-+ call prtal
-+ stop
-+ end
-+
-Index: gcc/testsuite/gfortran.dg/fmt_colon.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/fmt_colon.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/fmt_colon.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,14 @@
-+! { dg-do run }
-+! PR31395 Colon edit descriptor is ignored.
-+! Test case derived from PR. Prepared by Jerry DeLisle
-+! <jvdelisle@gcc.gnu.org>
-+PROGRAM test
-+ INTEGER :: i = 1
-+ character(30) :: astring
-+ WRITE(astring, 10) i
-+ 10 FORMAT('i =',I2:' this should not print')
-+ if (astring.ne."i = 1") call abort
-+ write(astring, 20) i, i
-+ 20 format('i =',I2:' this should print',I2)
-+ if (astring.ne."i = 1 this should print 1") call abort
-+END PROGRAM test
-\ No newline at end of file
-Index: gcc/testsuite/gfortran.dg/char_result_13.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/char_result_13.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/char_result_13.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,13 @@
-+! { dg-do compile }
-+! tests the fix for PR31540, in which the character lengths in
-+! parentheses were not resolved.
-+!
-+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
-+!
-+ subroutine pfb()
-+ implicit none
-+ external pfname1, pfname2
-+ character ((136)) pfname1
-+ character ((129+7)) pfname2
-+ return
-+ end
-Index: gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,44 @@
-+! { dg-compile }
-+!
-+! Testcases from PR32002.
-+!
-+PROGRAM test_pr32002
+--- gcc/testsuite/gnat.dg/renaming5.ads (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gnat.dg/renaming5.ads (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,5 @@
++package Renaming5 is
+
-+ CALL test_1() ! scalar/vector
-+ CALL test_2() ! vector/vector
-+ CALL test_3() ! matrix/vector
-+ CALL test_4() ! matrix/matrix
++ procedure Proc;
+
-+CONTAINS
-+ ELEMENTAL FUNCTION f(x)
-+ INTEGER, INTENT(in) :: x
-+ INTEGER :: f
-+ f = x
-+ END FUNCTION
++end Renaming5;
+Index: gcc/testsuite/gnat.dg/specs/addr1.ads
+===================================================================
+--- gcc/testsuite/gnat.dg/specs/addr1.ads (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gnat.dg/specs/addr1.ads (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -15,7 +15,7 @@
+ end record;
+ for Rec2'Size use 64;
+
+- A: Arr (1 .. 12);
++ A: Arr (1 .. 4);
+
+ Obj1: Rec1;
+ for Obj1'Address use A'Address; -- { dg-bogus "alignment" }
+Index: gcc/testsuite/gcc.dg/pr45819.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr45819.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gcc.dg/pr45819.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fdump-tree-optimized" } */
++/* { dg-options "-O2 -fdump-tree-optimized -w" } */
+
+ struct ehci_regs {
+ char x;
+Index: gcc/testsuite/gcc.dg/gomp/pr51339.c
+===================================================================
+--- gcc/testsuite/gcc.dg/gomp/pr51339.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/gomp/pr51339.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,15 @@
++/* PR c/51339 */
++/* { dg-do compile } */
++/* { dg-options "-fopenmp" } */
+
-+ SUBROUTINE test_1()
-+ INTEGER :: a = 0, b(2) = 0
-+ a = f(b) ! { dg-error "Incompatible ranks" }
-+ b = f(a) ! ok, set all array elements to f(a)
-+ END SUBROUTINE
++char g[] = "g";
+
-+ SUBROUTINE test_2()
-+ INTEGER :: a(2) = 0, b(3) = 0
-+ a = f(b) ! { dg-error "different shape" }
-+ a = f(b(1:2)) ! ok, slice, stride 1
-+ a = f(b(1:3:2)) ! ok, slice, stride 2
-+ END SUBROUTINE
++void
++foo (void)
++{
++#pragma omp parallel sections firstprivate (g) lastprivate (g)
++ {
++ #pragma omp section
++ g[0] = 'h';
++ }
++}
+Index: gcc/testsuite/gcc.dg/cpp/assert4.c
+===================================================================
+--- gcc/testsuite/gcc.dg/cpp/assert4.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gcc.dg/cpp/assert4.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Test builtin preprocessor assertions.
+ By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
+
+@@ -7,7 +7,7 @@
+
+ /* Check for #system assertions. */
+
+-#if defined __gnu_linux__
++#if defined __linux__
+ # if !#system(linux) || !#system(unix) || !#system(posix)
+ # error
+ # endif
+Index: gcc/testsuite/gcc.dg/pr50078.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr50078.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/pr50078.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,14 @@
++/* PR tree-optimization/50078 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
+
-+ SUBROUTINE test_3()
-+ INTEGER :: a(4) = 0, b(2,2) = 0
-+ a = f(b) ! { dg-error "Incompatible ranks" }
-+ a = f(RESHAPE(b, (/ 4 /))) ! ok, same shape
-+ END SUBROUTINE
++unsigned nonvolvar[2];
+
-+ SUBROUTINE test_4()
-+ INTEGER :: a(2,2) = 0, b(3,3) = 0
-+ a = f(b) ! { dg-error "different shape" }
-+ a = f(b(1:3, 1:2)) ! { dg-error "different shape" }
-+ a = f(b(1:3:2, 1:3:2)) ! ok, same shape
-+ END SUBROUTINE
-+END PROGRAM
-Index: gcc/testsuite/gfortran.dg/altreturn_5.f90
++void
++test (int arg)
++{
++ unsigned v = *(volatile unsigned *) (&nonvolvar[arg]);
++ *(volatile unsigned *) (&nonvolvar[arg]) = v;
++}
++
++/* { dg-final { scan-assembler-times "movl\[^\n\r\]*nonvolvar" 2 { target { { i?86-*-* x86_64-*-* } && nonpic } } } } */
+Index: gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
===================================================================
---- gcc/testsuite/gfortran.dg/altreturn_5.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/altreturn_5.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,30 @@
-+! { dg-do run }
-+! Tests the fix for PR31483, in which dummy argument procedures
-+! produced an ICE if they had an alternate return.
-+!
-+! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
+--- gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,13 @@
++/* PR debug/51410 */
++/* { dg-do compile } */
++/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */
+
-+ SUBROUTINE R (i, *, *)
-+ INTEGER i
-+ RETURN i
-+ END
++int x;
+
-+ SUBROUTINE PHLOAD (READER, i, res)
-+ IMPLICIT NONE
-+ EXTERNAL READER
-+ integer i
-+ character(3) res
-+ CALL READER (i, *1, *2)
-+ 1 res = "one"
-+ return
-+ 2 res = "two"
-+ return
-+ END
-+
-+ EXTERNAL R
-+ character(3) res
-+ call PHLOAD (R, 1, res)
-+ if (res .ne. "one") call abort ()
-+ CALL PHLOAD (R, 2, res)
-+ if (res .ne. "two") call abort ()
-+ END
-\ No newline at end of file
-Index: gcc/testsuite/gfortran.dg/substr_4.f
-===================================================================
---- gcc/testsuite/gfortran.dg/substr_4.f (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/substr_4.f (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,69 @@
-+! { dg-do run }
-+ subroutine test_lower
-+ implicit none
-+ character(3), dimension(3) :: zsymel,zsymelr
-+ common /xx/ zsymel, zsymelr
-+ integer :: znsymelr
-+ zsymel = (/ 'X', 'Y', ' ' /)
-+ zsymelr= (/ 'X', 'Y', ' ' /)
-+ znsymelr=2
-+ call check_zsymel(zsymel,zsymelr,znsymelr)
++int
++foo (void)
++{
++ return x;
++}
+
-+ contains
++/* { dg-final { scan-assembler-times "\\(DIE\[^\\r\\n\]*DW_TAG_variable\\)" 1 } } */
+Index: gcc/testsuite/gcc.dg/pr51821.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr51821.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/pr51821.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,25 @@
++/* { dg-do run } */
++/* { dg-options "-std=c99 -O2" } */
++/* { dg-options "-std=c99 -O2 -msse" { target { i?86-*-* x86_64-*-* } } } */
++/* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */
+
-+ subroutine check_zsymel(zsymel,zsymelr,znsymelr)
-+ implicit none
-+ integer znsymelr, isym
-+ character(*) zsymel(*),zsymelr(*)
-+ character(len=80) buf
-+ zsymel(3)(lenstr(zsymel(3))+1:)='X'
-+ write (buf,10) (trim(zsymelr(isym)),isym=1,znsymelr)
-+10 format(3(a,:,','))
-+ if (trim(buf) /= 'X,Y') call abort
-+ end subroutine check_zsymel
-+
-+ function lenstr(s)
-+ character(len=*),intent(in) :: s
-+ integer :: lenstr
-+ if (len_trim(s) /= 0) call abort
-+ lenstr = len_trim(s)
-+ end function lenstr
-+
-+ end subroutine test_lower
-+
-+ subroutine test_upper
-+ implicit none
-+ character(3), dimension(3) :: zsymel,zsymelr
-+ common /xx/ zsymel, zsymelr
-+ integer :: znsymelr
-+ zsymel = (/ 'X', 'Y', ' ' /)
-+ zsymelr= (/ 'X', 'Y', ' ' /)
-+ znsymelr=2
-+ call check_zsymel(zsymel,zsymelr,znsymelr)
++extern void abort (void);
+
-+ contains
++unsigned int __attribute__((noinline))
++test (int shift_size)
++{
++ unsigned long long res = ~0;
+
-+ subroutine check_zsymel(zsymel,zsymelr,znsymelr)
-+ implicit none
-+ integer znsymelr, isym
-+ character(*) zsymel(*),zsymelr(*)
-+ character(len=80) buf
-+ zsymel(3)(:lenstr(zsymel(3))+1)='X'
-+ write (buf,20) (trim(zsymelr(isym)),isym=1,znsymelr)
-+20 format(3(a,:,','))
-+ if (trim(buf) /= 'X,Y') call abort
-+ end subroutine check_zsymel
-+
-+ function lenstr(s)
-+ character(len=*),intent(in) :: s
-+ integer :: lenstr
-+ if (len_trim(s) /= 0) call abort
-+ lenstr = len_trim(s)
-+ end function lenstr
-+
-+ end subroutine test_upper
-+
-+ program test
-+ call test_lower
-+ call test_upper
-+ end program test
-Index: gcc/testsuite/gfortran.dg/fmt_t_3.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/fmt_t_3.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/fmt_t_3.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,15 @@
-+! { dg-do run }
-+! PR31051 bug with x and t format descriptors.
-+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org> from PR.
-+program t
-+ integer, parameter :: n = 9
-+ character(len=40) :: fmt
-+ character(len=2), dimension(n) :: y
-+ open(unit=10, status="scratch")
-+ y = 'a '
-+ fmt = '(a,1x,(t7, 3a))'
-+ write(10, fmt) 'xxxx', (y(i), i = 1,n)
-+ rewind(10)
-+ read(10, '(a)') fmt
-+ if (fmt.ne."xxxx a a a") call abort()
-+end program t
-Index: gcc/testsuite/gfortran.dg/backspace_8.f
-===================================================================
---- gcc/testsuite/gfortran.dg/backspace_8.f (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/backspace_8.f (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,18 @@
-+C { dg-do run }
-+C PR libfortran/31618 - backspace after an error didn't work.
-+ program main
-+ character*78 msg
-+ open (21, file="backspace_7.dat", form="unformatted")
-+ write (21) 42, 43
-+ write (21) 4711, 4712
-+ write (21) -1, -4
-+ rewind (21)
-+ read (21) i,j
-+ read (21,err=100,end=100) i,j,k
-+ call abort
-+ 100 continue
-+ backspace 21
-+ read (21) i,j
-+ if (i .ne. 4711 .or. j .ne. 4712) call abort
-+ close (21,status="delete")
-+ end
-Index: gcc/testsuite/gfortran.dg/func_assign.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/func_assign.f90 (.../tags/gcc_4_2_0_release) (revision 0)
-+++ gcc/testsuite/gfortran.dg/func_assign.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -0,0 +1,33 @@
-+! { dg-do compile }
-+!
-+! PR fortran/31559
-+! Do not allow assigning to external functions
-+!
-+! Contributed by Steve Kargl <sgk@troutmask.apl.washington.edu>
-+!
-+module mod
-+ implicit none
-+contains
-+ integer function bar()
-+ bar = 4
-+ end function bar
-+
-+ subroutine a()
-+ implicit none
-+ real :: fun
-+ external fun
-+ interface
-+ function funget(a)
-+ integer :: a
-+ end function
-+ subroutine sub()
-+ end subroutine sub
-+ end interface
-+ sub = 'a' ! { dg-error "Expected VARIABLE" }
-+ fun = 4.4 ! { dg-error "Expected VARIABLE" }
-+ funget = 4 ! { dg-error "is not a VALUE" }
-+ bar = 5 ! { dg-error "is not a VALUE" }
-+ end subroutine a
-+end module mod
++ return res << shift_size;
++}
+
-+end
-Index: gcc/testsuite/gfortran.dg/unf_io_convert_3.f90
-===================================================================
---- gcc/testsuite/gfortran.dg/unf_io_convert_3.f90 (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/testsuite/gfortran.dg/unf_io_convert_3.f90 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,4 +1,4 @@
--! { dg-do run}
-+! { dg-do run }
- ! { dg-require-effective-target fortran_large_real }
- program main
- integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
-Index: gcc/cp/class.c
-===================================================================
---- gcc/cp/class.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/cp/class.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -5350,22 +5350,34 @@
- }
- else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE)
- {
-+ /* We only need one hash table because it is always left empty. */
-+ static htab_t ht;
-+ if (!ht)
-+ ht = htab_create (37,
-+ htab_hash_pointer,
-+ htab_eq_pointer,
-+ /*htab_del=*/NULL);
-+
- /* Reference variables should be references to objects. */
- if (nonnull)
- *nonnull = 1;
-
-- /* DECL_VAR_MARKED_P is used to prevent recursion; a
-+ /* Enter the INSTANCE in a table to prevent recursion; a
- variable's initializer may refer to the variable
- itself. */
- if (TREE_CODE (instance) == VAR_DECL
- && DECL_INITIAL (instance)
-- && !DECL_VAR_MARKED_P (instance))
-+ && !htab_find (ht, instance))
- {
- tree type;
-- DECL_VAR_MARKED_P (instance) = 1;
-+ void **slot;
-+
-+ slot = htab_find_slot (ht, instance, INSERT);
-+ *slot = instance;
- type = fixed_type_or_null (DECL_INITIAL (instance),
- nonnull, cdtorp);
-- DECL_VAR_MARKED_P (instance) = 0;
-+ htab_clear_slot (ht, slot);
-+
- return type;
- }
- }
-Index: gcc/cp/decl.c
-===================================================================
---- gcc/cp/decl.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/cp/decl.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2161,8 +2161,24 @@
- }
- else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl))
- {
-- /* Objects declared at top level: */
-- /* If at least one is a reference, it's ok. */
-+ /* The objects have been declared at namespace scope. If either
-+ is a member of an anonymous union, then this is an invalid
-+ redeclaration. For example:
-+
-+ int i;
-+ union { int i; };
-+
-+ is invalid. */
-+ if (DECL_ANON_UNION_VAR_P (newdecl)
-+ || DECL_ANON_UNION_VAR_P (olddecl))
-+ return "redeclaration of %q#D";
-+ /* If at least one declaration is a reference, there is no
-+ conflict. For example:
-+
-+ int i = 3;
-+ extern int i;
-+
-+ is valid. */
- if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl))
- return NULL;
- /* Reject two definitions. */
-@@ -5368,7 +5384,18 @@
- initializer. It is not legal to redeclare a static data
- member, so this issue does not arise in that case. */
- if (var_definition_p && TREE_STATIC (decl))
-- expand_static_init (decl, init);
-+ {
-+ /* If a TREE_READONLY variable needs initialization
-+ at runtime, it is no longer readonly and we need to
-+ avoid MEM_READONLY_P being set on RTL created for it. */
-+ if (init)
-+ {
-+ if (TREE_READONLY (decl))
-+ TREE_READONLY (decl) = 0;
-+ was_readonly = 0;
-+ }
-+ expand_static_init (decl, init);
-+ }
- }
- }
-
-Index: gcc/cp/cp-tree.h
-===================================================================
---- gcc/cp/cp-tree.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/cp/cp-tree.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -107,7 +107,7 @@
- DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL)
- 3: DECL_IN_AGGR_P.
- 4: DECL_C_BIT_FIELD (in a FIELD_DECL)
-- DECL_VAR_MARKED_P (in a VAR_DECL)
-+ DECL_ANON_UNION_VAR_P (in a VAR_DECL)
- DECL_SELF_REFERENCE_P (in a TYPE_DECL)
- DECL_INVALID_OVERRIDER_P (in a FUNCTION_DECL)
- 5: DECL_INTERFACE_KNOWN.
-@@ -2111,10 +2111,10 @@
- (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
- ->decl_flags.u.template_info)
-
--/* For a VAR_DECL, indicates that the variable has been processed.
-- This flag is set and unset throughout the code; it is always
-- used for a temporary purpose. */
--#define DECL_VAR_MARKED_P(NODE) \
-+/* For a VAR_DECL, indicates that the variable is actually a
-+ non-static data member of anonymous union that has been promoted to
-+ variable status. */
-+#define DECL_ANON_UNION_VAR_P(NODE) \
- (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE)))
-
- /* Template information for a RECORD_TYPE or UNION_TYPE. */
-Index: gcc/cp/ChangeLog
++int
++main ()
++{
++ int dst = 32;
++
++ if (test (dst) != 0)
++ abort ();
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/volatile-bitfields-1.c
===================================================================
---- gcc/cp/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/cp/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,29 @@
-+2007-06-15 Mark Mitchell <mark@codesourcery.com>
+--- gcc/testsuite/gcc.dg/volatile-bitfields-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/volatile-bitfields-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,23 @@
++/* { dg-options "-fstrict-volatile-bitfields" } */
++/* { dg-do run } */
+
-+ * cp-tree.h (DECL_VAR_MARKED_P): Remove.
-+ (DECL_ANON_UNION_VAR_P): New macro.
-+ * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
-+ than DECL_VAR_MARKED_P, to keep track of which variables we have
-+ seen.
-+ * decl.c (redeclaration_error_message): Complain about redeclaring
-+ anonymous union members at namespace scope.
-+ * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
++extern int puts(const char *);
++extern void abort(void) __attribute__((noreturn));
+
-+2007-06-08 Dirk Mueller <dmueller@suse.de>
++typedef struct {
++ volatile unsigned short a:8, b:8;
++} BitStruct;
+
-+ PR c++/31809
-+ PR c++/31806
-+ Backport from mainline:
-+ 2007-05-31 Jakub Jelinek <jakub@redhat.com>
++BitStruct bits = {1, 2};
+
-+ * decl.c (cp_finish_decl): Also clear was_readonly if a static var
-+ needs runtime initialization.
++void check(int i, int j)
++{
++ if (i != 1 || j != 2) puts("FAIL"), abort();
++}
+
-+ 2007-05-30 Jakub Jelinek <jakub@redhat.com>
++int main ()
++{
++ check(bits.a, bits.b);
+
-+ * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
-+ variables that need runtime initialization.
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/pr51408.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr51408.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/pr51408.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,22 @@
++/* This testcase used to fail because of a bug in
++ arm.md:*minmax_arithsi. */
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-Index: gcc/cp/decl2.c
-===================================================================
---- gcc/cp/decl2.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/cp/decl2.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1056,6 +1056,7 @@
- tree base;
-
- decl = build_decl (VAR_DECL, DECL_NAME (field), TREE_TYPE (field));
-+ DECL_ANON_UNION_VAR_P (decl) = 1;
-
- base = get_base_address (object);
- TREE_PUBLIC (decl) = TREE_PUBLIC (base);
-Index: gcc/fortran/trans-expr.c
++/* { dg-do run } */
++/* { dg-options "-O1" } */
++
++extern void abort (void);
++
++int __attribute__((noinline))
++foo (int a, int b)
++{
++ int max = (b > 0) ? b : 0;
++ return max - a;
++}
++
++int
++main (void)
++{
++ if (foo (3, -1) != -3)
++ abort ();
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr50396.c
===================================================================
---- gcc/fortran/trans-expr.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/trans-expr.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -255,6 +255,10 @@
- gfc_conv_string_parameter (se);
- else
- {
-+ /* Avoid multiple evaluation of substring start. */
-+ if (!CONSTANT_CLASS_P (start.expr) && !DECL_P (start.expr))
-+ start.expr = gfc_evaluate_now (start.expr, &se->pre);
-+
- /* Change the start of the string. */
- if (TYPE_STRING_FLAG (TREE_TYPE (se->expr)))
- tmp = se->expr;
-@@ -273,6 +277,10 @@
- gfc_conv_expr_type (&end, ref->u.ss.end, gfc_charlen_type_node);
- gfc_add_block_to_block (&se->pre, &end.pre);
- }
+--- gcc/testsuite/gcc.dg/torture/pr50396.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/torture/pr50396.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,22 @@
++/* { dg-do run } */
++/* { dg-add-options ieee } */
+
-+ if (!CONSTANT_CLASS_P (end.expr) && !DECL_P (end.expr))
-+ end.expr = gfc_evaluate_now (end.expr, &se->pre);
++extern void abort (void);
++typedef float vf128 __attribute__((vector_size(16)));
++typedef float vf64 __attribute__((vector_size(8)));
++int main()
++{
++#if !__FINITE_MATH_ONLY__
++#if __FLT_HAS_QUIET_NAN__
++ vf128 v = (vf128){ 0.f, 0.f, 0.f, 0.f };
++ vf64 u = (vf64){ 0.f, 0.f };
++ v = v / (vf128){ 0.f, 0.f, 0.f, 0.f };
++ if (v[0] == v[0])
++ abort ();
++ u = u / (vf64){ 0.f, 0.f };
++ if (u[0] == u[0])
++ abort ();
++#endif
++#endif
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr51042.c
+===================================================================
+--- gcc/testsuite/gcc.dg/torture/pr51042.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/torture/pr51042.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
+
- tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node,
- build_int_cst (gfc_charlen_type_node, 1),
- start.expr);
-@@ -2340,17 +2348,23 @@
-
- /* Generate the actual call. */
- gfc_conv_function_val (se, sym);
++int a, b;
+
- /* If there are alternate return labels, function type should be
- integer. Can't modify the type in place though, since it can be shared
-- with other functions. */
-+ with other functions. For dummy arguments, the typing is done to
-+ to this result, even if it has to be repeated for each call. */
- if (has_alternate_specifier
- && TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) != integer_type_node)
- {
-- gcc_assert (! sym->attr.dummy);
-- TREE_TYPE (sym->backend_decl)
-- = build_function_type (integer_type_node,
-- TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
-- se->expr = build_fold_addr_expr (sym->backend_decl);
-+ if (!sym->attr.dummy)
++void
++foo (int x)
++{
++ int e[2];
++ int d;
++ while (x)
++ {
++ for (d = 0; d <= 1; d = 1)
++ if (e[a])
++ break;
++ for (b = 0; b <= 0; b = 1)
+ {
-+ TREE_TYPE (sym->backend_decl)
-+ = build_function_type (integer_type_node,
-+ TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
-+ se->expr = build_fold_addr_expr (sym->backend_decl);
++ e[a] = a;
++ if (a)
++ break;
+ }
-+ else
-+ TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) = integer_type_node;
- }
-
- fntype = TREE_TYPE (TREE_TYPE (se->expr));
-Index: gcc/fortran/trans-array.c
++ }
++}
+Index: gcc/testsuite/gcc.dg/torture/pr51070-2.c
===================================================================
---- gcc/fortran/trans-array.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/trans-array.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -4422,6 +4422,8 @@
-
- if (se->direct_byref)
- base = gfc_index_zero_node;
-+ else if (GFC_ARRAY_TYPE_P (TREE_TYPE (desc)))
-+ base = gfc_evaluate_now (gfc_conv_array_offset (desc), &loop.pre);
- else
- base = NULL_TREE;
-
-@@ -4489,8 +4491,20 @@
- stride, info->stride[dim]);
-
- if (se->direct_byref)
-- base = fold_build2 (MINUS_EXPR, TREE_TYPE (base),
-- base, stride);
-+ {
-+ base = fold_build2 (MINUS_EXPR, TREE_TYPE (base),
-+ base, stride);
-+ }
-+ else if (GFC_ARRAY_TYPE_P (TREE_TYPE (desc)))
-+ {
-+ tmp = gfc_conv_array_lbound (desc, n);
-+ tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (base),
-+ tmp, loop.from[dim]);
-+ tmp = fold_build2 (MULT_EXPR, TREE_TYPE (base),
-+ tmp, gfc_conv_array_stride (desc, n));
-+ base = fold_build2 (PLUS_EXPR, TREE_TYPE (base),
-+ tmp, base);
-+ }
-
- /* Store the new stride. */
- tmp = gfc_conv_descriptor_stride (parm, gfc_rank_cst[dim]);
-@@ -4511,7 +4525,8 @@
- gfc_conv_descriptor_data_set (&loop.pre, parm, offset);
- }
-
-- if (se->direct_byref && !se->data_not_needed)
-+ if ((se->direct_byref || GFC_ARRAY_TYPE_P (TREE_TYPE (desc)))
-+ && !se->data_not_needed)
- {
- /* Set the offset. */
- tmp = gfc_conv_descriptor_offset (parm);
-Index: gcc/fortran/gfortran.texi
-===================================================================
---- gcc/fortran/gfortran.texi (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/gfortran.texi (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -611,7 +611,7 @@
- to change the representation of data for unformatted files.
- The syntax for the @env{GFORTRAN_CONVERT_UNIT} variable is:
- @smallexample
--GFORTRAN_CONVERT_UNIT: mode | mode ';' exception ;
-+GFORTRAN_CONVERT_UNIT: mode | mode ';' exception | exception ;
- mode: 'native' | 'swap' | 'big_endian' | 'little_endian' ;
- exception: mode ':' unit_list | unit_list ;
- unit_list: unit_spec | unit_list unit_spec ;
-@@ -668,7 +668,12 @@
- setting a default data representation for the whole program. The
- @code{CONVERT} specifier overrides the @option{-fconvert} compile options.
-
-+@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT
-+environment variable will override the CONVERT specifier in the
-+open statement}. This is to give control over data formats to
-+users who do not have the source code of their program available.
-
-+
- @c =====================================================================
- @c PART II: LANGUAGE REFERENCE
- @c =====================================================================
-Index: gcc/fortran/trans-common.c
-===================================================================
---- gcc/fortran/trans-common.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/trans-common.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -359,14 +359,15 @@
- tree size = TYPE_SIZE_UNIT (union_type);
- if (tree_int_cst_lt (DECL_SIZE_UNIT (decl), size))
- {
-- /* Named common blocks of the same name shall be of the same size
-- in all scoping units of a program in which they appear, but
-- blank common blocks may be of different sizes. */
-- if (strcmp (com->name, BLANK_COMMON_NAME))
-+ /* Named common blocks of the same name shall be of the same size
-+ in all scoping units of a program in which they appear, but
-+ blank common blocks may be of different sizes. */
-+ if (strcmp (com->name, BLANK_COMMON_NAME))
- gfc_warning ("Named COMMON block '%s' at %L shall be of the "
- "same size", com->name, &com->where);
-- DECL_SIZE_UNIT (decl) = size;
-- }
-+ DECL_SIZE_UNIT (decl) = size;
-+ TREE_TYPE (decl) = union_type;
-+ }
- }
-
- /* If this common block has been declared in a previous program unit,
-Index: gcc/fortran/ChangeLog
+--- gcc/testsuite/gcc.dg/torture/pr51070-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/torture/pr51070-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,35 @@
++/* { dg-do compile } */
++/* { dg-options "-fno-inline" } */
++
++int
++func_4 (int si1, int si2)
++{
++ return si1;
++}
++
++int
++func_14 (int left, int right)
++{
++ return 1;
++}
++
++int
++func_37 (int left, int right)
++{
++ return left;
++}
++
++int g_92[1024];
++int g_95[1024];
++int g_224;
++int g_352[1024];
++int
++func_9 ()
++{
++ for (; g_224; g_224 += 1)
++ {
++ g_95[0] = func_4 (func_37 (g_92[g_224], 0), 0);
++ g_92[g_224] = 0, g_352[g_224] = func_14 (0, 0);
++ }
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr51070.c
===================================================================
---- gcc/fortran/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,43 @@
-+2007-07-20 Daniel Franke <franke.daniel@gmail.com>
+--- gcc/testsuite/gcc.dg/torture/pr51070.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/torture/pr51070.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,34 @@
++/* { dg-do compile } */
+
-+ Backport from trunk:
-+ PR fortran/32002
-+ * resolve.c (resolve_actual_arglist): Resolve actual argument after
-+ being identified as variable.
++int
++func_4 (int si1, int si2)
++{
++ return si1;
++}
+
-+2007-06-20 Paul Thomas <pault@gcc.gnu.org>
++int
++func_14 (int left, int right)
++{
++ return 1;
++}
+
-+ PR fortran/32302
-+ * trans-common.c (build_common_decl): If resizing of common
-+ decl is needed, update the TREE_TYPE.
++int
++func_37 (int left, int right)
++{
++ return left;
++}
+
-+2007-05-31 Paul Thomas <pault@gcc.gnu.org>
++int g_92[1024];
++int g_95[1024];
++int g_224;
++int g_352[1024];
++int
++func_9 ()
++{
++ for (; g_224; g_224 += 1)
++ {
++ g_95[0] = func_4 (func_37 (g_92[g_224], 0), 0);
++ g_92[g_224] = 0, g_352[g_224] = func_14 (0, 0);
++ }
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/tree-ssa/pr49642.c
+===================================================================
+--- gcc/testsuite/gcc.dg/tree-ssa/pr49642.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/tree-ssa/pr49642.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,49 @@
++/* Verify that ipa-split is disabled following __builtin_constant_p. */
+
-+ PR fortran/31483
-+ * trans-expr.c (gfc_conv_function_call): Give a dummy
-+ procedure the correct type if it has alternate returns.
-+
++/* { dg-do compile } */
++/* { dg-options "-O2 -fdump-tree-optimized" } */
+
-+ PR fortran/31540
-+ * resolve.c (resolve_fl_procedure): Resolve constant character
-+ lengths.
++typedef unsigned int u32;
++typedef unsigned long long u64;
+
-+ PR fortran/31867
-+ PR fortran/31994
-+ * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
-+ offset for non-descriptor, source arrays and correct for stride
-+ not equal to one before writing to field of output descriptor.
++static inline __attribute__((always_inline)) __attribute__((const))
++int __ilog2_u32(u32 n)
++{
++ int bit;
++ asm ("cntlzw %0,%1" : "=r" (bit) : "r" (n));
++ return 31 - bit;
++}
+
-+2007-05-17 Tobias Burnus <burnus@net-b.de>
+
-+ * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
++static inline __attribute__((always_inline)) __attribute__((const))
++int __ilog2_u64(u64 n)
++{
++ int bit;
++ asm ("cntlzd %0,%1" : "=r" (bit) : "r" (n));
++ return 63 - bit;
++}
+
-+2007-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
-+ PR fortran/31725
-+ * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
-+ only once.
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-Index: gcc/fortran/resolve.c
-===================================================================
---- gcc/fortran/resolve.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/resolve.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1006,6 +1006,13 @@
- e->ref->u.ar.as = sym->as;
- }
-
-+ /* Expressions are assigned a default ts.type of BT_PROCEDURE in
-+ primary.c (match_actual_arg). If above code determines that it
-+ is a variable instead, it needs to be resolved as it was not
-+ done at the beginning of this function. */
-+ if (gfc_resolve_expr (e) != SUCCESS)
-+ return FAILURE;
-+
- argument_list:
- /* Check argument list functions %VAL, %LOC and %REF. There is
- nothing to do for %REF. */
-@@ -5742,6 +5749,11 @@
- if (sym->ts.type == BT_CHARACTER)
- {
- gfc_charlen *cl = sym->ts.cl;
++static u64 ehca_map_vaddr(void *caddr);
+
-+ if (cl && cl->length && gfc_is_constant_expr (cl->length)
-+ && resolve_charlen (cl) == FAILURE)
-+ return FAILURE;
++struct ehca_shca {
++ u32 hca_cap_mr_pgsize;
++};
+
- if (!cl || !cl->length || cl->length->expr_type != EXPR_CONSTANT)
- {
- if (sym->attr.proc == PROC_ST_FUNCTION)
-Index: gcc/fortran/primary.c
-===================================================================
---- gcc/fortran/primary.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/fortran/primary.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2415,7 +2415,8 @@
-
- case FL_PROCEDURE:
- /* Check for a nonrecursive function result */
-- if (sym->attr.function && (sym->result == sym || sym->attr.entry))
-+ if (sym->attr.function && (sym->result == sym || sym->attr.entry)
-+ && !sym->attr.external)
- {
- /* If a function result is a derived type, then the derived
- type may still have to be resolved. */
-Index: gcc/BASE-VER
-===================================================================
---- gcc/BASE-VER (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/BASE-VER (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1 +1 @@
--4.2.0
-+4.2.1
-Index: gcc/gimplify.c
-===================================================================
---- gcc/gimplify.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/gimplify.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -4053,6 +4053,19 @@
- parse_input_constraint (&constraint, 0, 0, noutputs, 0,
- oconstraints, &allows_mem, &allows_reg);
-
-+ /* If we can't make copies, we can only accept memory. */
-+ if (TREE_ADDRESSABLE (TREE_TYPE (TREE_VALUE (link))))
-+ {
-+ if (allows_mem)
-+ allows_reg = 0;
-+ else
-+ {
-+ error ("impossible constraint in %<asm%>");
-+ error ("non-memory input %d must stay in memory", i);
-+ return GS_ERROR;
-+ }
-+ }
++static u64 ehca_get_max_hwpage_size(struct ehca_shca *shca)
++{
++ return 1UL << ( __builtin_constant_p(shca->hca_cap_mr_pgsize) ? ( (shca->hca_cap_mr_pgsize) < 1 ? ____ilog2_NaN() : (shca->hca_cap_mr_pgsize) & (1ULL << 63) ? 63 : (shca->hca_cap_mr_pgsize) & (1ULL << 62) ? 62 : (shca->hca_cap_mr_pgsize) & (1ULL << 61) ? 61 : (shca->hca_cap_mr_pgsize) & (1ULL << 60) ? 60 : (shca->hca_cap_mr_pgsize) & (1ULL << 59) ? 59 : (shca->hca_cap_mr_pgsize) & (1ULL << 58) ? 58 : (shca->hca_cap_mr_pgsize) & (1ULL << 57) ? 57 : (shca->hca_cap_mr_pgsize) & (1ULL << 56) ? 56 : (shca->hca_cap_mr_pgsize) & (1ULL << 55) ? 55 : (shca->hca_cap_mr_pgsize) & (1ULL << 54) ? 54 : (shca->hca_cap_mr_pgsize) & (1ULL << 53) ? 53 : (shca->hca_cap_mr_pgsize) & (1ULL << 52) ? 52 : (shca->hca_cap_mr_pgsize) & (1ULL << 51) ? 51 : (shca->hca_cap_mr_pgsize) & (1ULL << 50) ? 50 : (shca->hca_cap_mr_pgsize) & (1ULL << 49) ? 49 : (shca->hca_cap_mr_pgsize) & (1ULL << 48) ? 48 : (shca->hca_cap_mr_pgsize) & (1ULL << 47) ? 47 : (shca->hca_cap_mr_pgsize) & (1ULL << 46) ? 46 : (shca->hca_cap_mr_pgsize) & (1ULL << 45) ? 45 : (shca->hca_cap_mr_pgsize) & (1ULL << 44) ? 44 : (shca->hca_cap_mr_pgsize) & (1ULL << 43) ? 43 : (shca->hca_cap_mr_pgsize) & (1ULL << 42) ? 42 : (shca->hca_cap_mr_pgsize) & (1ULL << 41) ? 41 : (shca->hca_cap_mr_pgsize) & (1ULL << 40) ? 40 : (shca->hca_cap_mr_pgsize) & (1ULL << 39) ? 39 : (shca->hca_cap_mr_pgsize) & (1ULL << 38) ? 38 : (shca->hca_cap_mr_pgsize) & (1ULL << 37) ? 37 : (shca->hca_cap_mr_pgsize) & (1ULL << 36) ? 36 : (shca->hca_cap_mr_pgsize) & (1ULL << 35) ? 35 : (shca->hca_cap_mr_pgsize) & (1ULL << 34) ? 34 : (shca->hca_cap_mr_pgsize) & (1ULL << 33) ? 33 : (shca->hca_cap_mr_pgsize) & (1ULL << 32) ? 32 : (shca->hca_cap_mr_pgsize) & (1ULL << 31) ? 31 : (shca->hca_cap_mr_pgsize) & (1ULL << 30) ? 30 : (shca->hca_cap_mr_pgsize) & (1ULL << 29) ? 29 : (shca->hca_cap_mr_pgsize) & (1ULL << 28) ? 28 : (shca->hca_cap_mr_pgsize) & (1ULL << 27) ? 27 : (shca->hca_cap_mr_pgsize) & (1ULL << 26) ? 26 : (shca->hca_cap_mr_pgsize) & (1ULL << 25) ? 25 : (shca->hca_cap_mr_pgsize) & (1ULL << 24) ? 24 : (shca->hca_cap_mr_pgsize) & (1ULL << 23) ? 23 : (shca->hca_cap_mr_pgsize) & (1ULL << 22) ? 22 : (shca->hca_cap_mr_pgsize) & (1ULL << 21) ? 21 : (shca->hca_cap_mr_pgsize) & (1ULL << 20) ? 20 : (shca->hca_cap_mr_pgsize) & (1ULL << 19) ? 19 : (shca->hca_cap_mr_pgsize) & (1ULL << 18) ? 18 : (shca->hca_cap_mr_pgsize) & (1ULL << 17) ? 17 : (shca->hca_cap_mr_pgsize) & (1ULL << 16) ? 16 : (shca->hca_cap_mr_pgsize) & (1ULL << 15) ? 15 : (shca->hca_cap_mr_pgsize) & (1ULL << 14) ? 14 : (shca->hca_cap_mr_pgsize) & (1ULL << 13) ? 13 : (shca->hca_cap_mr_pgsize) & (1ULL << 12) ? 12 : (shca->hca_cap_mr_pgsize) & (1ULL << 11) ? 11 : (shca->hca_cap_mr_pgsize) & (1ULL << 10) ? 10 : (shca->hca_cap_mr_pgsize) & (1ULL << 9) ? 9 : (shca->hca_cap_mr_pgsize) & (1ULL << 8) ? 8 : (shca->hca_cap_mr_pgsize) & (1ULL << 7) ? 7 : (shca->hca_cap_mr_pgsize) & (1ULL << 6) ? 6 : (shca->hca_cap_mr_pgsize) & (1ULL << 5) ? 5 : (shca->hca_cap_mr_pgsize) & (1ULL << 4) ? 4 : (shca->hca_cap_mr_pgsize) & (1ULL << 3) ? 3 : (shca->hca_cap_mr_pgsize) & (1ULL << 2) ? 2 : (shca->hca_cap_mr_pgsize) & (1ULL << 1) ? 1 : (shca->hca_cap_mr_pgsize) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(shca->hca_cap_mr_pgsize) <= 4) ? __ilog2_u32(shca->hca_cap_mr_pgsize) : __ilog2_u64(shca->hca_cap_mr_pgsize) );
++}
+
- /* If the operand is a memory input, it should be an lvalue. */
- if (!allows_reg && allows_mem)
- {
-@@ -4802,7 +4815,20 @@
- else if (flags & GOVD_SHARED)
- {
- if (is_global_var (decl))
-- return 0;
-+ {
-+ struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp->outer_context;
-+ while (ctx != NULL)
-+ {
-+ splay_tree_node on
-+ = splay_tree_lookup (ctx->variables, (splay_tree_key) decl);
-+ if (on && (on->value & (GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE
-+ | GOVD_PRIVATE | GOVD_REDUCTION)) != 0)
-+ break;
-+ ctx = ctx->outer_context;
-+ }
-+ if (ctx == NULL)
-+ return 0;
-+ }
- code = OMP_CLAUSE_SHARED;
- }
- else if (flags & GOVD_PRIVATE)
-Index: gcc/calls.c
-===================================================================
---- gcc/calls.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/calls.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1238,13 +1238,25 @@
-
- /* If this is a libcall, then precompute all arguments so that we do not
- get extraneous instructions emitted as part of the libcall sequence. */
-- if ((flags & ECF_LIBCALL_BLOCK) == 0)
-+
-+ /* If we preallocated the stack space, and some arguments must be passed
-+ on the stack, then we must precompute any parameter which contains a
-+ function call which will store arguments on the stack.
-+ Otherwise, evaluating the parameter may clobber previous parameters
-+ which have already been stored into the stack. (we have code to avoid
-+ such case by saving the outgoing stack arguments, but it results in
-+ worse code) */
-+ if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS)
- return;
-
- for (i = 0; i < num_actuals; i++)
- {
- enum machine_mode mode;
-
-+ if ((flags & ECF_LIBCALL_BLOCK) == 0
-+ && TREE_CODE (args[i].tree_value) != CALL_EXPR)
-+ continue;
++int x(struct ehca_shca *shca) {
++ return ehca_get_max_hwpage_size(shca);
++}
+
- /* If this is an addressable type, we cannot pre-evaluate it. */
- gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)));
-
-Index: gcc/except.c
++int y(struct ehca_shca *shca)
++{
++ return ehca_get_max_hwpage_size(shca);
++}
++
++/* { dg-final { scan-tree-dump-times "____ilog2_NaN" 0 "optimized" } } */
++/* { dg-final { cleanup-tree-dump "optimized" } } */
+Index: gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
===================================================================
---- gcc/except.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/except.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1005,7 +1005,11 @@
- for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
- prev_try && prev_try->type != ERT_TRY;
- prev_try = prev_try->outer)
-- ;
-+ if (prev_try->type == ERT_MUST_NOT_THROW)
-+ {
-+ prev_try = NULL;
-+ break;
-+ }
+--- gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-ealias" } */
++/* { dg-options "-O2 -fno-tree-forwprop -fno-tree-ccp -fdump-tree-ealias" } */
- /* Remap all of the internal catch and cleanup linkages. Since we
- duplicate entire subtrees, all of the referenced regions will have
-Index: gcc/combine.c
+ extern void abort (void);
+ struct X {
+Index: gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
===================================================================
---- gcc/combine.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/combine.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -5341,14 +5341,14 @@
- }
- else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx)
- {
-- SUBST(SET_SRC (x), op0);
-+ SUBST (SET_SRC (x), op0);
- src = SET_SRC (x);
- }
-- else
-+ /* Otherwise, update the COMPARE if needed. */
-+ else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1)
- {
-- /* Otherwise, update the COMPARE if needed. */
-- SUBST (XEXP (src, 0), op0);
-- SUBST (XEXP (src, 1), op1);
-+ SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1));
-+ src = SET_SRC (x);
- }
- }
- else
-Index: gcc/Makefile.in
-===================================================================
---- gcc/Makefile.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/Makefile.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1839,7 +1839,7 @@
- tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \
- $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \
-- gt-tree-ssa-structalias.h $(PARAMS_H)
-+ gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h
- tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
- $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
- toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
-Index: gcc/tree-ssa-structalias.c
+--- gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-ealias" } */
++/* { dg-options "-O2 -fno-tree-forwprop -fno-tree-ccp -fdump-tree-ealias" } */
+
+ extern void abort (void);
+ struct X {
+Index: gcc/testsuite/gcc.dg/tree-ssa/pr51583.c
===================================================================
---- gcc/tree-ssa-structalias.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/tree-ssa-structalias.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -51,10 +51,11 @@
- #include "params.h"
- #include "tree-ssa-structalias.h"
- #include "cgraph.h"
-+#include "pointer-set.h"
-
- /* The idea behind this analyzer is to generate set constraints from the
- program, then solve the resulting constraints in order to generate the
-- points-to sets.
-+ points-to sets.
-
- Set constraints are a way of modeling program analysis problems that
- involve sets. They consist of an inclusion constraint language,
-@@ -70,33 +71,33 @@
-
- Also see "Ultra-fast Aliasing Analysis using CLA: A Million Lines
- of C Code in a Second" by ""Nevin Heintze and Olivier Tardieu" at
-- http://citeseer.ist.psu.edu/heintze01ultrafast.html
-+ http://citeseer.ist.psu.edu/heintze01ultrafast.html
-
-- There are three types of constraint expressions, DEREF, ADDRESSOF, and
-- SCALAR. Each constraint expression consists of a constraint type,
-- a variable, and an offset.
--
-+ There are three types of real constraint expressions, DEREF,
-+ ADDRESSOF, and SCALAR. Each constraint expression consists
-+ of a constraint type, a variable, and an offset.
-+
- SCALAR is a constraint expression type used to represent x, whether
- it appears on the LHS or the RHS of a statement.
- DEREF is a constraint expression type used to represent *x, whether
-- it appears on the LHS or the RHS of a statement.
-+ it appears on the LHS or the RHS of a statement.
- ADDRESSOF is a constraint expression used to represent &x, whether
- it appears on the LHS or the RHS of a statement.
--
-+
- Each pointer variable in the program is assigned an integer id, and
- each field of a structure variable is assigned an integer id as well.
--
-+
- Structure variables are linked to their list of fields through a "next
- field" in each variable that points to the next field in offset
-- order.
-- Each variable for a structure field has
-+ order.
-+ Each variable for a structure field has
-
- 1. "size", that tells the size in bits of that field.
- 2. "fullsize, that tells the size in bits of the entire structure.
- 3. "offset", that tells the offset in bits from the beginning of the
- structure to this field.
-
-- Thus,
-+ Thus,
- struct f
- {
- int a;
-@@ -110,50 +111,51 @@
- foo.b -> id 2, size 32, offset 32, fullsize 64, next NULL
- bar -> id 3, size 32, offset 0, fullsize 32, next NULL
-
--
-+
- In order to solve the system of set constraints, the following is
- done:
-
- 1. Each constraint variable x has a solution set associated with it,
- Sol(x).
--
+--- gcc/testsuite/gcc.dg/tree-ssa/pr51583.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/tree-ssa/pr51583.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,34 @@
++/* { dg-do compile } */
++/* { dg-options "-O1" } */
+
- 2. Constraints are separated into direct, copy, and complex.
- Direct constraints are ADDRESSOF constraints that require no extra
- processing, such as P = &Q
- Copy constraints are those of the form P = Q.
-- Complex constraints are all the constraints involving dereferences.
--
-+ Complex constraints are all the constraints involving dereferences
-+ and offsets (including offsetted copies).
++typedef __complex__ double Value;
+
- 3. All direct constraints of the form P = &Q are processed, such
-- that Q is added to Sol(P)
-+ that Q is added to Sol(P)
-
- 4. All complex constraints for a given constraint variable are stored in a
-- linked list attached to that variable's node.
-+ linked list attached to that variable's node.
-
- 5. A directed graph is built out of the copy constraints. Each
-- constraint variable is a node in the graph, and an edge from
-+ constraint variable is a node in the graph, and an edge from
- Q to P is added for each copy constraint of the form P = Q
--
++union U
++{
++ Value v;
++ char c[sizeof(Value)];
++};
+
- 6. The graph is then walked, and solution sets are
- propagated along the copy edges, such that an edge from Q to P
- causes Sol(P) <- Sol(P) union Sol(Q).
--
++struct S
++{
++ union U u;
++ int i,j;
++};
+
- 7. As we visit each node, all complex constraints associated with
- that node are processed by adding appropriate copy edges to the graph, or the
-- appropriate variables to the solution set.
-+ appropriate variables to the solution set.
-
- 8. The process of walking the graph is iterated until no solution
- sets change.
-
- Prior to walking the graph in steps 6 and 7, We perform static
-- cycle elimination on the constraint graph, as well
-+ cycle elimination on the constraint graph, as well
- as off-line variable substitution.
--
++Value gv;
++int gi, gj;
+
- TODO: Adding offsets to pointer-to-structures can be handled (IE not punted
- on and turned into anything), but isn't. You can just see what offset
- inside the pointed-to struct it's going to access.
--
++Value foo (void)
++{
++ struct S s,t;
+
- TODO: Constant bounded arrays can be handled as if they were structs of the
-- same number of elements.
-+ same number of elements.
-
- TODO: Modeling heap and incoming pointers becomes much better if we
- add fields to them as we discover them, which we could do.
-@@ -161,20 +163,29 @@
- TODO: We could handle unions, but to be honest, it's probably not
- worth the pain or slowdown. */
-
--static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map)))
--htab_t heapvar_for_stmt;
-+static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) htab_t heapvar_for_stmt;
-
- /* One variable to represent all non-local accesses. */
- tree nonlocal_all;
-
- static bool use_field_sensitive = true;
- static int in_ipa_mode = 0;
++ t.i = gi;
++ t.j = gj;
++ t.u.v = gv;
++ t.u.c[0] = 0;
+
-+/* Used for predecessor bitmaps. */
- static bitmap_obstack predbitmap_obstack;
--static bitmap_obstack ptabitmap_obstack;
++ s = t;
++ __imag__ s.u.v += s.i;
+
-+/* Used for points-to sets. */
-+static bitmap_obstack pta_obstack;
++ return s.u.v;
++}
+Index: gcc/testsuite/gcc.dg/delay-slot-2.c
+===================================================================
+--- gcc/testsuite/gcc.dg/delay-slot-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/gcc.dg/delay-slot-2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,116 @@
++/* PR rtl-optimization/51187 */
++/* Reported by Jurij Smakov <jurij@wooyd.org> */
+
-+/* Used for oldsolution members of variables. */
-+static bitmap_obstack oldpta_obstack;
++/* { dg-do compile } */
++/* { dg-options "-g -O2" } */
+
-+/* Used for per-solver-iteration bitmaps. */
- static bitmap_obstack iteration_obstack;
-
- static unsigned int create_variable_info_for (tree, const char *);
--static void build_constraint_graph (void);
-+typedef struct constraint_graph *constraint_graph_t;
-+static void unify_nodes (constraint_graph_t, unsigned int, unsigned int, bool);
-
- DEF_VEC_P(constraint_t);
- DEF_VEC_ALLOC_P(constraint_t,heap);
-@@ -186,11 +197,13 @@
- static struct constraint_stats
- {
- unsigned int total_vars;
-- unsigned int collapsed_vars;
-+ unsigned int nonpointer_vars;
- unsigned int unified_vars_static;
- unsigned int unified_vars_dynamic;
- unsigned int iterations;
- unsigned int num_edges;
-+ unsigned int num_implicit_edges;
-+ unsigned int points_to_sets_created;
- } stats;
-
- struct variable_info
-@@ -205,7 +218,7 @@
- tree decl;
-
- /* Offset of this variable, in bits, from the base variable */
-- unsigned HOST_WIDE_INT offset;
-+ unsigned HOST_WIDE_INT offset;
-
- /* Size of the variable, in bits. */
- unsigned HOST_WIDE_INT size;
-@@ -216,34 +229,21 @@
- /* A link to the variable for the next field in this structure. */
- struct variable_info *next;
-
-- /* Node in the graph that represents the constraints and points-to
-- solution for the variable. */
-- unsigned int node;
--
-- /* True if the address of this variable is taken. Needed for
-- variable substitution. */
-- unsigned int address_taken:1;
--
-- /* True if this variable is the target of a dereference. Needed for
-- variable substitution. */
-- unsigned int indirect_target:1;
--
- /* True if the variable is directly the target of a dereference.
- This is used to track which variables are *actually* dereferenced
-- so we can prune their points to listed. This is equivalent to the
-- indirect_target flag when no merging of variables happens. */
-+ so we can prune their points to listed. */
- unsigned int directly_dereferenced:1;
-
- /* True if this is a variable created by the constraint analysis, such as
- heap variables and constraints we had to break up. */
- unsigned int is_artificial_var:1;
--
++extern int printf (__const char *__restrict __format, ...);
++extern void print_c_condition (const char *);
+
- /* True if this is a special variable whose solution set should not be
- changed. */
- unsigned int is_special_var:1;
-
- /* True for variables whose size is not known or variable. */
-- unsigned int is_unknown_size_var:1;
-+ unsigned int is_unknown_size_var:1;
-
- /* True for variables that have unions somewhere in them. */
- unsigned int has_union:1;
-@@ -254,16 +254,15 @@
- /* Points-to set for this variable. */
- bitmap solution;
-
-+ /* Old points-to set for this variable. */
-+ bitmap oldsolution;
++enum decision_type
++{
++ DT_num_insns,
++ DT_mode, DT_code, DT_veclen,
++ DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe,
++ DT_const_int,
++ DT_veclen_ge, DT_dup, DT_pred, DT_c_test,
++ DT_accept_op, DT_accept_insn
++};
+
- /* Variable ids represented by this node. */
- bitmap variables;
-
-- /* Vector of complex constraints for this node. Complex
-- constraints are those involving dereferences. */
-- VEC(constraint_t,heap) *complex;
--
-- /* Variable id this was collapsed to due to type unsafety.
-- This should be unused completely after build_constraint_graph, or
-- something is broken. */
-+ /* Variable id this was collapsed to due to type unsafety. This
-+ should be unused completely after build_succ_graph, or something
-+ is broken. */
- struct variable_info *collapsed_to;
- };
- typedef struct variable_info *varinfo_t;
-@@ -277,8 +276,8 @@
-
- DEF_VEC_ALLOC_P(varinfo_t, heap);
-
--/* Table of variable info structures for constraint variables. Indexed directly
-- by variable info id. */
-+/* Table of variable info structures for constraint variables.
-+ Indexed directly by variable info id. */
- static VEC(varinfo_t,heap) *varmap;
-
- /* Return the varmap element N */
-@@ -286,7 +285,7 @@
- static inline varinfo_t
- get_varinfo (unsigned int n)
- {
-- return VEC_index(varinfo_t, varmap, n);
-+ return VEC_index (varinfo_t, varmap, n);
- }
-
- /* Return the varmap element N, following the collapsed_to link. */
-@@ -294,7 +293,7 @@
- static inline varinfo_t
- get_varinfo_fc (unsigned int n)
- {
-- varinfo_t v = VEC_index(varinfo_t, varmap, n);
-+ varinfo_t v = VEC_index (varinfo_t, varmap, n);
-
- if (v->collapsed_to)
- return v->collapsed_to;
-@@ -331,10 +330,9 @@
- /* Variable that represents non-local variables before we expand it to
- one for each type. */
- static unsigned int nonlocal_vars_id;
--
- /* Lookup a heap var for FROM, and return it if we find one. */
-
--static tree
-+static tree
- heapvar_lookup (tree from)
- {
- struct tree_map *h, in;
-@@ -367,25 +365,21 @@
- named NAME, and using constraint graph node NODE. */
-
- static varinfo_t
--new_var_info (tree t, unsigned int id, const char *name, unsigned int node)
-+new_var_info (tree t, unsigned int id, const char *name)
- {
- varinfo_t ret = pool_alloc (variable_info_pool);
-
- ret->id = id;
- ret->name = name;
- ret->decl = t;
-- ret->node = node;
-- ret->address_taken = false;
-- ret->indirect_target = false;
- ret->directly_dereferenced = false;
- ret->is_artificial_var = false;
- ret->is_heap_var = false;
- ret->is_special_var = false;
- ret->is_unknown_size_var = false;
- ret->has_union = false;
-- ret->solution = BITMAP_ALLOC (&ptabitmap_obstack);
-- ret->variables = BITMAP_ALLOC (&ptabitmap_obstack);
-- ret->complex = NULL;
-+ ret->solution = BITMAP_ALLOC (&pta_obstack);
-+ ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
- ret->next = NULL;
- ret->collapsed_to = NULL;
- return ret;
-@@ -395,7 +389,7 @@
-
- /* An expression that appears in a constraint. */
-
--struct constraint_expr
-+struct constraint_expr
- {
- /* Constraint type. */
- constraint_expr_type type;
-@@ -418,7 +412,7 @@
- static void do_deref (VEC (ce_s, heap) **);
-
- /* Our set constraints are made up of two constraint expressions, one
-- LHS, and one RHS.
-+ LHS, and one RHS.
-
- As described in the introduction, our set constraints each represent an
- operation between set valued variables.
-@@ -434,63 +428,98 @@
- static VEC(constraint_t,heap) *constraints;
- static alloc_pool constraint_pool;
-
--/* An edge in the weighted constraint graph. The edges are weighted,
-- with a bit set in weights meaning their is an edge with that
-- weight.
-- We don't keep the src in the edge, because we always know what it
-- is. */
-
--struct constraint_edge
-+DEF_VEC_I(int);
-+DEF_VEC_ALLOC_I(int, heap);
-+
-+/* The constraint graph is represented as an array of bitmaps
-+ containing successor nodes. */
-+
-+struct constraint_graph
- {
-- unsigned int dest;
-- bitmap weights;
--};
-+ /* Size of this graph, which may be different than the number of
-+ nodes in the variable map. */
-+ unsigned int size;
-
--typedef struct constraint_edge *constraint_edge_t;
--static alloc_pool constraint_edge_pool;
-+ /* Explicit successors of each node. */
-+ bitmap *succs;
-
--/* Return a new constraint edge from SRC to DEST. */
-+ /* Implicit predecessors of each node (Used for variable
-+ substitution). */
-+ bitmap *implicit_preds;
-
--static constraint_edge_t
--new_constraint_edge (unsigned int dest)
--{
-- constraint_edge_t ret = pool_alloc (constraint_edge_pool);
-- ret->dest = dest;
-- ret->weights = NULL;
-- return ret;
--}
-+ /* Explicit predecessors of each node (Used for variable substitution). */
-+ bitmap *preds;
-
--DEF_VEC_P(constraint_edge_t);
--DEF_VEC_ALLOC_P(constraint_edge_t,heap);
-+ /* Indirect cycle representatives, or -1 if the node has no indirect
-+ cycles. */
-+ int *indirect_cycles;
-
-+ /* Representative node for a node. rep[a] == a unless the node has
-+ been unified. */
-+ unsigned int *rep;
-
--/* The constraint graph is represented internally in two different
-- ways. The overwhelming majority of edges in the constraint graph
-- are zero weigh edges, and thus, using a vector of contrainst_edge_t
-- is a waste of time and memory, since they have no weights. We
-- simply use a bitmap to store the preds and succs for each node.
-- The weighted edges are stored as a set of adjacency vectors, one
-- per variable. succs[x] is the vector of successors for variable x,
-- and preds[x] is the vector of predecessors for variable x. IOW,
-- all edges are "forward" edges, which is not like our CFG. So
-- remember that preds[x]->src == x, and succs[x]->src == x. */
-+ /* Equivalence class representative for a node. This is used for
-+ variable substitution. */
-+ int *eq_rep;
-
--struct constraint_graph
--{
-- bitmap *zero_weight_succs;
-- bitmap *zero_weight_preds;
-- VEC(constraint_edge_t,heap) **succs;
-- VEC(constraint_edge_t,heap) **preds;
-+ /* Label for each node, used during variable substitution. */
-+ unsigned int *label;
-+
-+ /* Bitmap of nodes where the bit is set if the node is a direct
-+ node. Used for variable substitution. */
-+ sbitmap direct_nodes;
-+
-+ /* Vector of complex constraints for each graph node. Complex
-+ constraints are those involving dereferences or offsets that are
-+ not 0. */
-+ VEC(constraint_t,heap) **complex;
- };
-
--typedef struct constraint_graph *constraint_graph_t;
--
- static constraint_graph_t graph;
--static int graph_size;
-
-+/* During variable substitution and the offline version of indirect
-+ cycle finding, we create nodes to represent dereferences and
-+ address taken constraints. These represent where these start and
-+ end. */
-+#define FIRST_REF_NODE (VEC_length (varinfo_t, varmap))
-+#define LAST_REF_NODE (FIRST_REF_NODE + (FIRST_REF_NODE - 1))
-+#define FIRST_ADDR_NODE (LAST_REF_NODE + 1)
-+
-+/* Return the representative node for NODE, if NODE has been unioned
-+ with another NODE.
-+ This function performs path compression along the way to finding
-+ the representative. */
-+
-+static unsigned int
-+find (unsigned int node)
-+{
-+ gcc_assert (node < graph->size);
-+ if (graph->rep[node] != node)
-+ return graph->rep[node] = find (graph->rep[node]);
-+ return node;
-+}
++struct decision_test
++{
++ struct decision_test *next;
++ enum decision_type type;
++
++ union
++ {
++ int num_insns;
+
-+/* Union the TO and FROM nodes to the TO nodes.
-+ Note that at some point in the future, we may want to do
-+ union-by-rank, in which case we are going to have to return the
-+ node we unified to. */
++ struct
++ {
++ const char *name;
++ } pred;
++
++ const char *c_test;
++ int veclen;
++ int dup;
++ long intval;
++ int opno;
++
++ struct {
++ int code_number;
++ int lineno;
++ int num_clobbers_to_add;
++ } insn;
++ } u;
++};
+
-+static bool
-+unite (unsigned int to, unsigned int from)
++enum routine_type {
++ RECOG, SPLIT, PEEPHOLE2
++};
++
++void
++write_cond (struct decision_test *p, int depth,
++ enum routine_type subroutine_type)
+{
-+ gcc_assert (to < graph->size && from < graph->size);
-+ if (to != from && graph->rep[from] != to)
++ switch (p->type)
+ {
-+ graph->rep[from] = to;
-+ return true;
-+ }
-+ return false;
-+}
++ case DT_num_insns:
++ printf ("peep2_current_count >= %d", p->u.num_insns);
++ break;
+
- /* Create a new constraint consisting of LHS and RHS expressions. */
-
--static constraint_t
-+static constraint_t
- new_constraint (const struct constraint_expr lhs,
- const struct constraint_expr rhs)
- {
-@@ -508,7 +537,7 @@
- if (c->lhs.type == ADDRESSOF)
- fprintf (file, "&");
- else if (c->lhs.type == DEREF)
-- fprintf (file, "*");
-+ fprintf (file, "*");
- fprintf (file, "%s", get_varinfo_fc (c->lhs.var)->name);
- if (c->lhs.offset != 0)
- fprintf (file, " + " HOST_WIDE_INT_PRINT_DEC, c->lhs.offset);
-@@ -550,23 +579,24 @@
- dump_constraints (stderr);
- }
-
--/* SOLVER FUNCTIONS
-+/* SOLVER FUNCTIONS
-
- The solver is a simple worklist solver, that works on the following
- algorithm:
--
-- sbitmap changed_nodes = all ones;
-- changed_count = number of nodes;
-- For each node that was already collapsed:
-- changed_count--;
-
-+ sbitmap changed_nodes = all zeroes;
-+ changed_count = 0;
-+ For each node that is not already collapsed:
-+ changed_count++;
-+ set bit in changed nodes
-+
- while (changed_count > 0)
- {
- compute topological ordering for constraint graph
--
++ case DT_code:
++ printf ("GET_CODE (x%d) == ", depth);
++ break;
+
- find and collapse cycles in the constraint graph (updating
- changed if necessary)
--
++ case DT_veclen:
++ printf ("XVECLEN (x%d, 0) == %d", depth, p->u.veclen);
++ break;
+
- for each node (n) in the graph in topological order:
- changed_count--;
-
-@@ -619,11 +649,11 @@
- }
-
- /* Return true if two constraints A and B are equal. */
--
++ case DT_elt_zero_int:
++ printf ("XINT (x%d, 0) == %d", depth, (int) p->u.intval);
++ break;
+
- static bool
- constraint_equal (struct constraint a, struct constraint b)
- {
-- return constraint_expr_equal (a.lhs, b.lhs)
-+ return constraint_expr_equal (a.lhs, b.lhs)
- && constraint_expr_equal (a.rhs, b.rhs);
- }
-
-@@ -634,7 +664,7 @@
- constraint_vec_find (VEC(constraint_t,heap) *vec,
- struct constraint lookfor)
- {
-- unsigned int place;
-+ unsigned int place;
- constraint_t found;
-
- if (vec == NULL)
-@@ -678,30 +708,47 @@
- bitmap result = BITMAP_ALLOC (&iteration_obstack);
- unsigned int i;
- bitmap_iterator bi;
-+ unsigned HOST_WIDE_INT min = -1, max = 0;
-
-+ /* Compute set of vars we can reach from set + offset. */
++ case DT_elt_one_int:
++ printf ("XINT (x%d, 1) == %d", depth, (int) p->u.intval);
++ break;
+
- EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
- {
-+ if (get_varinfo (i)->is_artificial_var
-+ || get_varinfo (i)->has_union
-+ || get_varinfo (i)->is_unknown_size_var)
-+ continue;
++ case DT_elt_zero_wide:
++ case DT_elt_zero_wide_safe:
++ printf ("XWINT (x%d, 0) == ", depth);
++ print_host_wide_int (p->u.intval);
++ break;
+
-+ if (get_varinfo (i)->offset + offset < min)
-+ min = get_varinfo (i)->offset + offset;
-+ if (get_varinfo (i)->offset + get_varinfo (i)->size + offset > max)
-+ {
-+ max = get_varinfo (i)->offset + get_varinfo (i)->size + offset;
-+ if (max > get_varinfo (i)->fullsize)
-+ max = get_varinfo (i)->fullsize;
-+ }
++ case DT_const_int:
++ printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
++ depth, (int) p->u.intval);
++ break;
++
++ case DT_veclen_ge:
++ printf ("XVECLEN (x%d, 0) >= %d", depth, p->u.veclen);
++ break;
++
++ case DT_dup:
++ printf ("rtx_equal_p (x%d, operands[%d])", depth, p->u.dup);
++ break;
++
++ case DT_pred:
++ printf ("%s (x%d)", p->u.pred.name, depth);
++ break;
++
++ case DT_c_test:
++ print_c_condition (p->u.c_test);
++ break;
++
++ case DT_accept_insn:
++ ((void)(__builtin_expect(!(subroutine_type == RECOG), 0) ? __builtin_unreachable(), 0 : 0));
++ ((void)(__builtin_expect(!(p->u.insn.num_clobbers_to_add), 0) ? __builtin_unreachable(), 0 : 0));
++ printf ("pnum_clobbers != NULL");
++ break;
++
++ default:
++ __builtin_unreachable();
+ }
++}
+
-+ EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
-+ {
- /* If this is a properly sized variable, only add offset if it's
- less than end. Otherwise, it is globbed to a single
- variable. */
--
-- if ((get_varinfo (i)->offset + offset) < get_varinfo (i)->fullsize)
++/* { dg-final { scan-assembler "printf" } } */
+Index: gcc/testsuite/ada/acats/overflow.lst
+===================================================================
+--- gcc/testsuite/ada/acats/overflow.lst (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/ada/acats/overflow.lst (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -14,3 +14,4 @@
+ c460008
+ c460011
+ c4a012b
++cb20004
+Index: gcc/testsuite/ChangeLog
+===================================================================
+--- gcc/testsuite/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,411 @@
++2012-01-30 Bin Cheng <bin.cheng@arm.com>
+
-+ if (get_varinfo (i)->offset + get_varinfo (i)->size - 1 >= min
-+ && get_varinfo (i)->offset < max)
- {
-- unsigned HOST_WIDE_INT fieldoffset = get_varinfo (i)->offset + offset;
-- varinfo_t v = first_vi_for_offset (get_varinfo (i), fieldoffset);
-- if (!v)
-- continue;
-- bitmap_set_bit (result, v->id);
-+ bitmap_set_bit (result, i);
- }
-- else if (get_varinfo (i)->is_artificial_var
-+ else if (get_varinfo (i)->is_artificial_var
- || get_varinfo (i)->has_union
- || get_varinfo (i)->is_unknown_size_var)
- {
- bitmap_set_bit (result, i);
- }
- }
--
-- bitmap_copy (set, result);
++ Backport from mainline.
++ 2012-01-30 Bin Cheng <bin.cheng@arm.com>
+
-+ bitmap_copy (set, result);
- BITMAP_FREE (result);
- }
-
-@@ -727,397 +774,149 @@
- }
- }
++ PR target/51835
++ * gcc.target/arm/pr51835.c: New testcase.
++
++2012-01-28 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/52022
++ * gfortran.dg/dummy_procedure_7.f90: New.
++
++2012-01-25 Jason Merrill <jason@redhat.com>
++
++ PR target/51934
++ * g++.dg/torture/pr51344.C: Limit to x86.
++
++2012-01-25 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51966
++ * gfortran.dg/derived_constructor_char_3.f90: New.
++
++2012-01-24 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51948
++ * gfortran.dg/move_alloc_12.f90: New.
++
++2012-01-21 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51913
++ * gfortran.dg/class_47.f90: New.
++
++2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gnat.dg/renaming5.ad[sb]: New test.
++
++2012-01-20 Kai Tietz <ktietz@redhat.com>
++
++ * g++.dg/torture/pr51344.C: Fix typo.
++
++2012-01-19 Kai Tietz <ktietz@redhat.com>
++
++ * g++.dg/torture/pr51344.C: New test.
++
++2012-01-19 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51904
++ * gfortran.dg/intrinsic_size_2.f90: New.
++
++2012-01-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
++
++ PR tree-optimization/49642
++ * gcc.dg/tree-ssa/pr49642.c: New test.
++
++2012-01-16 Jason Merrill <jason@redhat.com>
++
++ PR c++/51854
++ * g++.dg/abi/mangle60.C: New.
++
++ PR c++/51868
++ * g++.dg/cpp0x/rv-bitfield.C: New.
++ * g++.dg/cpp0x/rv-bitfield2.C: New.
++
++2012-01-15 Uros Bizjak <ubizjak@gmail.com>
++
++ PR rtl-optimization/51821
++ * gcc.dg/pr51821.c: New test.
++
++2012-01-14 Tobias Burnus <burnus@net-b.de>
++
++ Backported from mainline
++ 2012-01-14 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51800
++ * gfortran.dg/init_flag_8.f90: New.
++ * gfortran.dg/init_flag_9.f90: New.
++
++2012-01-12 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
++
++ Backport from mainline:
++ 2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
++
++ * testsuite/gcc.c-torture/execute/20120110-1.c: New testcase.
++
++2012-01-10 Joseph Myers <joseph@codesourcery.com>
++
++ * gcc.c-torture/execute/doloop-1.c,
++ gcc.c-torture/execute/doloop-2.c: New tests.
++
++2012-01-09 Martin Jambor <mjambor@suse.cz>
++
++ PR tree-optimization/51759
++ * g++.dg/ipa/pr51759.C: New test.
++
++2012-01-09 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
++
++ Backport from mainline:
++ 2011-11-04 Jiangning Liu <jiangning.liu@arm.com>
++
++ PR rtl-optimization/38644
++ * gcc.target/arm/stack-red-zone.c: New.
++
++2012-01-09 Andrew Stubbs <ams@codesourcery.com>
++
++ Backport from mainline:
++
++ 2012-01-06 Andrew Stubbs <ams@codesourcery.com>
++
++ * gcc.target/arm/headmerge-2.c: Adjust scan pattern.
++
++2012-01-06 Richard Sandiford <richard.sandiford@linaro.org>
++
++ PR middle-end/48660
++ * g++.dg/pr48660.C: New test.
++
++2012-01-06 Eric Botcazou <ebotcazou@adacore.com>
++
++ * ada/acats/overflow.lst: Add cb20004.
++
++2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gcc.c-torture/execute/20120104-1.c: New test.
++
++2012-01-04 Richard Guenther <rguenther@suse.de>
++
++ PR tree-optimization/49651
++ * gcc.dg/tree-ssa/pta-ptrarith-1.c: Adjust.
++ * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
++
++2012-01-03 Richard Guenther <rguenther@suse.de>
++
++ Backport from mainline
++ 2011-11-10 Richard Guenther <rguenther@suse.de>
++
++ PR tree-optimization/51042
++ * gcc.dg/torture/pr51042.c: New testcase.
++
++2012-01-03 Richard Guenther <rguenther@suse.de>
++
++ PR tree-optimization/51070
++ * gcc.dg/torture/pr51070.c: New testcase.
++ * gcc.dg/torture/pr51070-2.c: Likewise.
++
++2011-12-20 Dodji Seketeli <dodji@redhat.com>
++
++ PR debug/49951
++ * g++.dg/gcov/gcov-2.C: Adjust.
++
++2012-01-01 Thomas König <tkoenig@gcc.gnu.org>
++
++ Backport from trunk
++ PR fortran/51502
++ * lib/gcc-dg.exp (scan-module-absence): New function.
++ * gfortran.dg/implicit_pure_2.f90: New test.
++
++2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
++
++ Backport from mainline
++ 2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
++
++ PR target/51623
++ * gcc.target/powerpc/pr51623.c: New file.
++
++2011-12-28 Uros Bizjak <ubizjak@gmail.com>
++
++ * gcc.dg/torture/pr50396.c: Use dg-add-options ieee.
++
++2011-12-23 Richard Guenther <rguenther@suse.de>
++
++ PR rtl-optimization/50396
++ * gcc.dg/torture/pr50396.c: New testcase.
++
++2011-12-22 Doug Kwan <dougkwan@google.com>
++
++ Backport from mainline
++ 2011-11-20 Joey Ye <joey.ye@arm.com>
++
++ * gcc.dg/volatile-bitfields-1.c: New.
++
++2011-12-21 Richard Earnshaw <rearnsha@arm.com>
++
++ PR target/51643
++ * gcc.target/arm/sibcall-2.c: New test.
++
++2011-12-19 Martin Jambor <mjambor@suse.cz>
++
++ PR tree-optimization/51583
++ * gcc.dg/tree-ssa/pr51583.c: New test.
++
++2011-12-16 Jason Merrill <jason@redhat.com>
++
++ PR c++/51416
++ * g++.dg/cpp0x/auto31.C: New.
++
++2011-12-16 Jason Merrill <jason@redhat.com>
++
++ PR c++/51331
++ * g++.dg/init/value10.C: New.
++
++2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
++
++ Backport from mainline.
++ 2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
++
++ PR rtl-optimization/49720
++ * g++.dg/torture/pr49720.C: New test.
++
++2011-12-14 Jason Merrill <jason@redhat.com>
++
++ PR c++/51248
++ * g++.dg/other/enum2.C: New.
++
++2011-12-13 Jason Merrill <jason@redhat.com>
++
++ PR c++/51406
++ PR c++/51161
++ * g++.dg/cpp0x/rv-cast3.C: New.
++ * g++.dg/cpp0x/rv-cast4.C: New.
++
++2011-12-12 Jakub Jelinek <jakub@redhat.com>
++
++ PR testsuite/51511
++ * gcc.dg/pr45819.c: Add -w to dg-options.
++
++ Backported from mainline
++ 2011-12-11 Jakub Jelinek <jakub@redhat.com>
++
++ PR tree-optimization/51485
++ * g++.dg/vect/pr51485.cc: New test.
++
++2011-12-12 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gcc.c-torture/execute/20111212-1.c: New test.
++
++2011-12-11 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/50923
++ * gfortran.dg/warn_function_without_result_2.f90: New.
++
++2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
++
++ PR fortran/51338
++ Backport from trunk
++ * gfortran.dg/assumed_charlen_substring_1.f90: New test.
++
++2011-12-09 Jakub Jelinek <jakub@redhat.com>
++
++ Backport from mainline
++ 2011-12-08 Jakub Jelinek <jakub@redhat.com>
++
++ PR tree-optimization/51466
++ * gcc.c-torture/execute/pr51466.c: New test.
++
++ 2011-11-28 Jakub Jelinek <jakub@redhat.com>
++
++ PR tree-optimization/50078
++ * gcc.dg/pr50078.c: New test.
++
++2011-12-09 Kazu Hirata <kazu@codesourcery.com>
++
++ Backport from mainline:
++
++ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
++
++ PR target/51408
++ * gcc.dg/pr51408.c: New.
++
++2011-12-08 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51448
++ * gfortran.dg/realloc_on_assign_8.f90: New.
++
++2011-12-08 Teresa Johnson <tejohnson@google.com>
++
++ * gcc.target/i386/movdi-rex64.c: Remove unnecessary
++ unused label.
++
++2011-12-08 Teresa Johnson <tejohnson@google.com>
++
++ * gcc.target/i386/movdi-rex64.c: Remove unnecessary
++ -Wwrite-strings option.
++
++2011-12-08 Teresa Johnson <tejohnson@google.com>
++
++ * gcc.target/i386/movdi-rex64.c: New.
++
++2011-12-08 Jakub Jelinek <jakub@redhat.com>
++
++ Backport from mainline
++ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
++
++ PR debug/51410
++ * gcc.dg/debug/dwarf2/pr51410.c: New test.
++
++ PR c/51339
++ * gcc.dg/gomp/pr51339.c: New test.
++
++ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
++ Eric Botcazou <ebotcazou@adacore.com>
++
++ PR middle-end/51323
++ PR middle-end/50074
++ * gcc.c-torture/execute/pr51323.c: New test.
++
++ 2011-11-30 Jakub Jelinek <jakub@redhat.com>
++
++ PR rtl-optimization/48721
++ * gcc.target/i386/pr48721.c: New test.
++
++2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gcc.c-torture/execute/20111208-1.c: New test.
++
++ Backport from mainline
++ 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gnat.dg/frame_overflow.ads: New.
++ * gnat.dg/frame_overflow.adb: Adjust.
++ * gnat.dg/specs/addr1.ads: Likewise.
++
++2011-12-06 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51435
++ * gfortran.dg/default_initialization_5.f90: New.
++
++2011-12-06 Martin Jambor <mjambor@suse.cz>
++
++ PR tree-optimization/50622
++ * g++.dg/tree-ssa/pr50622.C: New test.
++
++2011-12-04 Uros Bizjak <ubizjak@gmail.com>
++ Jérémie Detrey <Jeremie.Detrey@loria.fr>
++
++ PR target/51393
++ * gcc.target/i386/pr51393.c: New test.
++
++2011-12-03 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/50684
++ * gfortran.dg/move_alloc_8.f90: New.
++
++2011-11-25 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/50408
++ * gfortran.dg/whole_file_35.f90: New.
++
++2011-11-24 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51218
++ * resolve.c (pure_subroutine): If called subroutine is
++ impure, unset implicit_pure.
++ (resolve_function): Move impure check to simplify code.
++
++2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/51265
++ * g++.dg/cpp0x/decltype36.C: New.
++
++2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gcc.dg/delay-slot-2.c: New test.
++
++2011-11-18 Joseph Myers <joseph@codesourcery.com>
++
++ * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__.
++
++2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/51150
++ * g++.dg/cpp0x/pr51150.C: New.
++
++2011-11-16 Richard Earnshaw <rearnsha@arm.com>
++ Bernd Schmidt <bernds@coudesourcery.com>
++ Sebastian Huber <sebastian.huber@embedded-brains.de>
++
++ PR target/49641
++ * gcc.target/arm/pr49641.c: New test.
++
++2011-11-10 Jakub Jelinek <jakub@redhat.com>
++
++ PR middle-end/51077
++ * gcc.c-torture/compile/pr51077.c: New test.
++
++2011-11-07 Jason Merrill <jason@redhat.com>
++
++ PR c++/50870
++ * g++.dg/cpp0x/decltype35.C: New.
++
++2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
++
++ * g++.dg/other/offsetof7.C: New test.
++
++2011-11-02 Bernd Schmidt <bernds@codesourcery.com>
++
++ * gcc.c-torture/compile/20110907.c: New file.
++
++2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/50901
++ * g++.dg/cpp0x/pr50901.C: New.
++
++2011-10-27 Uros Bizjak <ubizjak@gmail.com>
++ Steven G. Kargl <kargl@gcc.gnu.org>
++
++ PR target/50875
++ * gfortran.dg/pr50875.f90: New test.
++
+ 2011-10-26 Release Manager
--/* Insert constraint C into the list of complex constraints for VAR. */
-+/* Insert constraint C into the list of complex constraints for graph
-+ node VAR. */
+ * GCC 4.6.2 released.
+@@ -9,9 +417,9 @@
- static void
--insert_into_complex (unsigned int var, constraint_t c)
-+insert_into_complex (constraint_graph_t graph,
-+ unsigned int var, constraint_t c)
- {
-- varinfo_t vi = get_varinfo (var);
-- unsigned int place = VEC_lower_bound (constraint_t, vi->complex, c,
-+ VEC (constraint_t, heap) *complex = graph->complex[var];
-+ unsigned int place = VEC_lower_bound (constraint_t, complex, c,
- constraint_less);
-- VEC_safe_insert (constraint_t, heap, vi->complex, place, c);
--}
+ 2011-10-20 Uros Bizjak <ubizjak@gmail.com>
--
--/* Compare two constraint edges A and B, return true if they are equal. */
--
--static bool
--constraint_edge_equal (struct constraint_edge a, struct constraint_edge b)
--{
-- return a.dest == b.dest;
-+ /* Only insert constraints that do not already exist. */
-+ if (place >= VEC_length (constraint_t, complex)
-+ || !constraint_equal (*c, *VEC_index (constraint_t, complex, place)))
-+ VEC_safe_insert (constraint_t, heap, graph->complex[var], place, c);
- }
+- * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
+- non_strict_align.
+- * gcc.dg/ipa/ipa-sra-6.c: Ditto.
++ * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
++ non_strict_align.
++ * gcc.dg/ipa/ipa-sra-6.c: Ditto.
--/* Compare two constraint edges, return true if A is less than B */
+ 2011-10-19 Jason Merrill <jason@redhat.com>
--static bool
--constraint_edge_less (const constraint_edge_t a, const constraint_edge_t b)
--{
-- if (a->dest < b->dest)
-- return true;
-- return false;
--}
--
--/* Find the constraint edge that matches LOOKFOR, in VEC.
-- Return the edge, if found, NULL otherwise. */
--
--static constraint_edge_t
--constraint_edge_vec_find (VEC(constraint_edge_t,heap) *vec,
-- struct constraint_edge lookfor)
--{
-- unsigned int place;
-- constraint_edge_t edge = NULL;
--
-- place = VEC_lower_bound (constraint_edge_t, vec, &lookfor,
-- constraint_edge_less);
-- if (place >= VEC_length (constraint_edge_t, vec))
-- return NULL;
-- edge = VEC_index (constraint_edge_t, vec, place);
-- if (!constraint_edge_equal (*edge, lookfor))
-- return NULL;
-- return edge;
--}
--
- /* Condense two variable nodes into a single variable node, by moving
- all associated info from SRC to TO. */
-
--static void
--condense_varmap_nodes (unsigned int to, unsigned int src)
-+static void
-+merge_node_constraints (constraint_graph_t graph, unsigned int to,
-+ unsigned int from)
- {
-- varinfo_t tovi = get_varinfo (to);
-- varinfo_t srcvi = get_varinfo (src);
- unsigned int i;
- constraint_t c;
-- bitmap_iterator bi;
--
-- /* the src node, and all its variables, are now the to node. */
-- srcvi->node = to;
-- EXECUTE_IF_SET_IN_BITMAP (srcvi->variables, 0, i, bi)
-- get_varinfo (i)->node = to;
--
-- /* Merge the src node variables and the to node variables. */
-- bitmap_set_bit (tovi->variables, src);
-- bitmap_ior_into (tovi->variables, srcvi->variables);
-- bitmap_clear (srcvi->variables);
--
+Index: gcc/testsuite/g++.dg/vect/pr51485.cc
+===================================================================
+--- gcc/testsuite/g++.dg/vect/pr51485.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/vect/pr51485.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
+
-+ gcc_assert (find (from) == to);
++struct A { A (); unsigned int a; };
++double bar (A a) throw () __attribute__((pure));
+
- /* Move all complex constraints from src node into to node */
-- for (i = 0; VEC_iterate (constraint_t, srcvi->complex, i, c); i++)
-+ for (i = 0; VEC_iterate (constraint_t, graph->complex[from], i, c); i++)
- {
- /* In complex constraints for node src, we may have either
-- a = *src, and *src = a. */
--
-+ a = *src, and *src = a, or an offseted constraint which are
-+ always added to the rhs node's constraints. */
++void
++foo (unsigned int x, double *y, A *z)
++{
++ unsigned int i;
++ for (i = 0; i < x; i++)
++ y[i] = bar (z[i]);
++}
+
- if (c->rhs.type == DEREF)
- c->rhs.var = to;
-+ else if (c->lhs.type == DEREF)
-+ c->lhs.var = to;
- else
-- c->lhs.var = to;
-+ c->rhs.var = to;
- }
-- constraint_set_union (&tovi->complex, &srcvi->complex);
-- VEC_free (constraint_t, heap, srcvi->complex);
-- srcvi->complex = NULL;
-+ constraint_set_union (&graph->complex[to], &graph->complex[from]);
-+ VEC_free (constraint_t, heap, graph->complex[from]);
-+ graph->complex[from] = NULL;
- }
-
--/* Erase an edge from SRC to SRC from GRAPH. This routine only
-- handles self-edges (e.g. an edge from a to a). */
-
--static void
--erase_graph_self_edge (constraint_graph_t graph, unsigned int src)
--{
-- VEC(constraint_edge_t,heap) *predvec = graph->preds[src];
-- VEC(constraint_edge_t,heap) *succvec = graph->succs[src];
-- struct constraint_edge edge;
-- unsigned int place;
--
-- edge.dest = src;
--
-- /* Remove from the successors. */
-- place = VEC_lower_bound (constraint_edge_t, succvec, &edge,
-- constraint_edge_less);
--
-- /* Make sure we found the edge. */
--#ifdef ENABLE_CHECKING
-- {
-- constraint_edge_t tmp = VEC_index (constraint_edge_t, succvec, place);
-- gcc_assert (constraint_edge_equal (*tmp, edge));
-- }
--#endif
-- VEC_ordered_remove (constraint_edge_t, succvec, place);
--
-- /* Remove from the predecessors. */
-- place = VEC_lower_bound (constraint_edge_t, predvec, &edge,
-- constraint_edge_less);
--
-- /* Make sure we found the edge. */
--#ifdef ENABLE_CHECKING
-- {
-- constraint_edge_t tmp = VEC_index (constraint_edge_t, predvec, place);
-- gcc_assert (constraint_edge_equal (*tmp, edge));
-- }
--#endif
-- VEC_ordered_remove (constraint_edge_t, predvec, place);
--}
--
- /* Remove edges involving NODE from GRAPH. */
++/* { dg-final { cleanup-tree-dump "vect" } } */
+Index: gcc/testsuite/g++.dg/pr48660.C
+===================================================================
+--- gcc/testsuite/g++.dg/pr48660.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/pr48660.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,22 @@
++template<int N> struct val { char a[N]; };
++
++class Base
++{
++public:
++ virtual val<1> get1() const = 0;
++ virtual val<2> get2() const = 0;
++ virtual val<3> get3() const = 0;
++ virtual val<4> get4() const = 0;
++};
++
++class Derived : public virtual Base
++{
++public:
++ virtual val<1> get1() const { return foo->get1(); }
++ virtual val<2> get2() const { return foo->get2(); }
++ virtual val<3> get3() const { return foo->get3(); }
++ virtual val<4> get4() const { return foo->get4(); }
++ Base *foo;
++};
++
++Base* make() { return new Derived; }
+Index: gcc/testsuite/g++.dg/abi/mangle60.C
+===================================================================
+--- gcc/testsuite/g++.dg/abi/mangle60.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/abi/mangle60.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,21 @@
++// PR c++/51854
++// { dg-options "" }
++// { dg-excess-errors "" { xfail *-*-* } }
++
++template <unsigned N> struct A;
++
++template <typename U, typename V>
++char foo(U, V);
++
++// { dg-final { scan-assembler "_Z3barIiEvP1AIXszcl3foocvT__ELCi0_42EEEE" } }
++template <typename U>
++void bar(A<sizeof(foo(U(), 42i))> *);
++
++// { dg-final { scan-assembler "_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE" } }
++template <typename U>
++void baz(A<sizeof(foo(U(), 0.0fj))> *);
++
++int main() {
++ bar<int>(0);
++ baz<int>(0);
++}
+Index: gcc/testsuite/g++.dg/init/value10.C
+===================================================================
+--- gcc/testsuite/g++.dg/init/value10.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/init/value10.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,27 @@
++// PR c++/51331
++// { dg-do run }
++
++struct A {
++ A(): x(10) {}
++ virtual ~A() {}
++
++ int x;
++};
++
++struct B: public virtual A {
++};
++
++struct C: public virtual A {
++};
++
++struct D: public B, virtual public C {
++ D(): B(), C() {} // note an explicit call to C() which is auto-generated
++};
++
++int main() {
++ D* d = new D();
++
++ // Crashes here with the following message:
++ // *** glibc detected *** ./test: free(): invalid next size (fast)
++ delete d;
++}
+Index: gcc/testsuite/g++.dg/other/enum2.C
+===================================================================
+--- gcc/testsuite/g++.dg/other/enum2.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/other/enum2.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,3 @@
++// PR c++/51248
++
++enum E { e = sizeof(const E*) };
+Index: gcc/testsuite/g++.dg/other/offsetof7.C
+===================================================================
+--- gcc/testsuite/g++.dg/other/offsetof7.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/other/offsetof7.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++// PR c++/50608
++// Testcase by <dberger@oubliette.org>
++// { dg-do compile }
++
++struct A {
++ int offset;
++};
++
++struct B: public A {
++};
++
++struct C {
++ A a;
++ B b;
++};
++
++int fails = __builtin_offsetof (C, b.offset);
+Index: gcc/testsuite/g++.dg/tree-ssa/pr50622.C
+===================================================================
+--- gcc/testsuite/g++.dg/tree-ssa/pr50622.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/tree-ssa/pr50622.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,30 @@
++// { dg-do compile }
++// { dg-options "-O2" }
++
++typedef __complex__ double Value;
++struct LorentzVector
++{
++ LorentzVector & operator+=(const LorentzVector & a) {
++ theX += a.theX;
++ theY += a.theY;
++ theZ += a.theZ;
++ theT += a.theT;
++ return *this;
++ }
++
++ Value theX;
++ Value theY;
++ Value theZ;
++ Value theT;
++};
++
++inline LorentzVector
++operator+(LorentzVector a, const LorentzVector & b) {
++ return a += b;
++}
++
++Value ex, et;
++LorentzVector sum() {
++ LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et; v1.theT =et;
++ return v1+v1;
++}
+Index: gcc/testsuite/g++.dg/cpp0x/auto31.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/auto31.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/auto31.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,12 @@
++// PR c++/51416
++// { dg-options "-std=c++0x" }
++
++template<typename T, typename... U> void foo(T, U... u)
++{
++ auto foo(u...); // { dg-error "auto" }
++}
++
++void bar()
++{
++ foo(0);
++}
+Index: gcc/testsuite/g++.dg/cpp0x/pr50901.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/pr50901.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/pr50901.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,9 @@
++// { dg-options "-std=c++0x" }
++
++template<class T> int foo(int a)
++{
++ const unsigned b = a < 0 ? -a : a;
++ return 0;
++}
++
++int i = foo<float>(1);
+Index: gcc/testsuite/g++.dg/cpp0x/variadic103.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/variadic103.C (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/g++.dg/cpp0x/variadic103.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -5,7 +5,7 @@
- static void
- clear_edges_for_node (constraint_graph_t graph, unsigned int node)
- {
-- VEC(constraint_edge_t,heap) *succvec = graph->succs[node];
-- VEC(constraint_edge_t,heap) *predvec = graph->preds[node];
-- bitmap_iterator bi;
-- unsigned int j;
-- constraint_edge_t c = NULL;
-- int i;
--
-- /* Walk the successors, erase the associated preds. */
--
-- EXECUTE_IF_IN_NONNULL_BITMAP (graph->zero_weight_succs[node], 0, j, bi)
-- if (j != node)
-- bitmap_clear_bit (graph->zero_weight_preds[j], node);
--
-- for (i = 0; VEC_iterate (constraint_edge_t, succvec, i, c); i++)
-- if (c->dest != node)
-- {
-- unsigned int place;
-- struct constraint_edge lookfor;
-- constraint_edge_t result;
--
-- lookfor.dest = node;
-- place = VEC_lower_bound (constraint_edge_t, graph->preds[c->dest],
-- &lookfor, constraint_edge_less);
-- result = VEC_ordered_remove (constraint_edge_t,
-- graph->preds[c->dest], place);
-- pool_free (constraint_edge_pool, result);
-- }
--
-- /* Walk the preds, erase the associated succs. */
--
-- EXECUTE_IF_IN_NONNULL_BITMAP (graph->zero_weight_preds[node], 0, j, bi)
-- if (j != node)
-- bitmap_clear_bit (graph->zero_weight_succs[j], node);
--
-- for (i =0; VEC_iterate (constraint_edge_t, predvec, i, c); i++)
-- if (c->dest != node)
-- {
-- unsigned int place;
-- struct constraint_edge lookfor;
-- constraint_edge_t result;
--
-- lookfor.dest = node;
-- place = VEC_lower_bound (constraint_edge_t, graph->succs[c->dest],
-- &lookfor, constraint_edge_less);
-- result = VEC_ordered_remove (constraint_edge_t,
-- graph->succs[c->dest], place);
-- pool_free (constraint_edge_pool, result);
--
-- }
--
-- if (graph->zero_weight_preds[node])
-- {
-- BITMAP_FREE (graph->zero_weight_preds[node]);
-- graph->zero_weight_preds[node] = NULL;
-- }
--
-- if (graph->zero_weight_succs[node])
-- {
-- BITMAP_FREE (graph->zero_weight_succs[node]);
-- graph->zero_weight_succs[node] = NULL;
-- }
--
-- VEC_free (constraint_edge_t, heap, graph->preds[node]);
-- VEC_free (constraint_edge_t, heap, graph->succs[node]);
-- graph->preds[node] = NULL;
-- graph->succs[node] = NULL;
-+ if (graph->succs[node])
-+ BITMAP_FREE (graph->succs[node]);
+ template<class T, class... Args>
+ void test() {
+- T t(create<Args>()...); // { dg-error "unknown bound" }
++ T t(create<Args>()...); // { dg-error "incomplete" }
+ (void) t;
}
--static bool edge_added = false;
--
--/* Add edge (src, dest) to the graph. */
--
--static bool
--add_graph_edge (constraint_graph_t graph, unsigned int src, unsigned int dest)
--{
-- unsigned int place;
-- VEC(constraint_edge_t,heap) *vec;
-- struct constraint_edge newe;
-- newe.dest = dest;
--
-- vec = graph->preds[src];
-- place = VEC_lower_bound (constraint_edge_t, vec, &newe,
-- constraint_edge_less);
-- if (place == VEC_length (constraint_edge_t, vec)
-- || VEC_index (constraint_edge_t, vec, place)->dest != dest)
-- {
-- constraint_edge_t edge = new_constraint_edge (dest);
--
-- VEC_safe_insert (constraint_edge_t, heap, graph->preds[src],
-- place, edge);
-- edge = new_constraint_edge (src);
--
-- place = VEC_lower_bound (constraint_edge_t, graph->succs[dest],
-- edge, constraint_edge_less);
-- VEC_safe_insert (constraint_edge_t, heap, graph->succs[dest],
-- place, edge);
-- edge_added = true;
-- stats.num_edges++;
-- return true;
-- }
-- else
-- return false;
--}
--
--
--/* Return the bitmap representing the weights of edge (SRC, DEST). */
--
--static bitmap *
--get_graph_weights (constraint_graph_t graph, unsigned int src,
-- unsigned int dest)
--{
-- constraint_edge_t edge;
-- VEC(constraint_edge_t,heap) *vec;
-- struct constraint_edge lookfor;
--
-- lookfor.dest = dest;
--
-- vec = graph->preds[src];
-- edge = constraint_edge_vec_find (vec, lookfor);
-- gcc_assert (edge != NULL);
-- return &edge->weights;
--}
--
--/* Allocate graph weight bitmap for the edges associated with SRC and
-- DEST in GRAPH. Both the pred and the succ edges share a single
-- bitmap, so we need to set both edges to that bitmap. */
--
--static bitmap
--allocate_graph_weights (constraint_graph_t graph, unsigned int src,
-- unsigned int dest)
--{
-- bitmap result;
-- constraint_edge_t edge;
-- VEC(constraint_edge_t,heap) *vec;
-- struct constraint_edge lookfor;
--
-- result = BITMAP_ALLOC (&ptabitmap_obstack);
--
-- /* Set the pred weight. */
-- lookfor.dest = dest;
-- vec = graph->preds[src];
-- edge = constraint_edge_vec_find (vec, lookfor);
-- gcc_assert (edge != NULL);
-- edge->weights = result;
--
-- /* Set the succ weight. */
-- lookfor.dest = src;
-- vec = graph->succs[dest];
-- edge = constraint_edge_vec_find (vec, lookfor);
-- gcc_assert (edge != NULL);
-- edge->weights = result;
--
-- return result;
--}
--
--
- /* Merge GRAPH nodes FROM and TO into node TO. */
-
- static void
--merge_graph_nodes (constraint_graph_t graph, unsigned int to,
-+merge_graph_nodes (constraint_graph_t graph, unsigned int to,
- unsigned int from)
- {
-- VEC(constraint_edge_t,heap) *succvec = graph->succs[from];
-- VEC(constraint_edge_t,heap) *predvec = graph->preds[from];
-- int i;
-- constraint_edge_t c;
-- unsigned int j;
-- bitmap_iterator bi;
--
-- /* Merge all the zero weighted predecessor edges. */
-- if (graph->zero_weight_preds[from])
-+ if (graph->indirect_cycles[from] != -1)
- {
-- if (!graph->zero_weight_preds[to])
-- graph->zero_weight_preds[to] = BITMAP_ALLOC (&predbitmap_obstack);
--
-- EXECUTE_IF_SET_IN_BITMAP (graph->zero_weight_preds[from], 0, j, bi)
-+ /* If we have indirect cycles with the from node, and we have
-+ none on the to node, the to node has indirect cycles from the
-+ from node now that they are unified.
-+ If indirect cycles exist on both, unify the nodes that they
-+ are in a cycle with, since we know they are in a cycle with
-+ each other. */
-+ if (graph->indirect_cycles[to] == -1)
- {
-- if (j != to)
-- {
-- bitmap_clear_bit (graph->zero_weight_succs[j], from);
-- bitmap_set_bit (graph->zero_weight_succs[j], to);
-- }
-+ graph->indirect_cycles[to] = graph->indirect_cycles[from];
- }
-- bitmap_ior_into (graph->zero_weight_preds[to],
-- graph->zero_weight_preds[from]);
-- }
-+ else
-+ {
-+ unsigned int tonode = find (graph->indirect_cycles[to]);
-+ unsigned int fromnode = find (graph->indirect_cycles[from]);
-
-- /* Merge all the zero weighted successor edges. */
-- if (graph->zero_weight_succs[from])
-- {
-- if (!graph->zero_weight_succs[to])
-- graph->zero_weight_succs[to] = BITMAP_ALLOC (&ptabitmap_obstack);
-- EXECUTE_IF_SET_IN_BITMAP (graph->zero_weight_succs[from], 0, j, bi)
-- {
-- bitmap_clear_bit (graph->zero_weight_preds[j], from);
-- bitmap_set_bit (graph->zero_weight_preds[j], to);
-+ if (unite (tonode, fromnode))
-+ unify_nodes (graph, tonode, fromnode, true);
- }
-- bitmap_ior_into (graph->zero_weight_succs[to],
-- graph->zero_weight_succs[from]);
- }
-
-- /* Merge all the nonzero weighted predecessor edges. */
-- for (i = 0; VEC_iterate (constraint_edge_t, predvec, i, c); i++)
-+ /* Merge all the successor edges. */
-+ if (graph->succs[from])
- {
-- unsigned int d = c->dest;
-- bitmap temp;
-- bitmap *weights;
-+ if (!graph->succs[to])
-+ graph->succs[to] = BITMAP_ALLOC (&pta_obstack);
-+ bitmap_ior_into (graph->succs[to],
-+ graph->succs[from]);
-+ }
-
-- if (c->dest == from)
-- d = to;
-+ clear_edges_for_node (graph, from);
+Index: gcc/testsuite/g++.dg/cpp0x/decltype35.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/decltype35.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/decltype35.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,15 @@
++// PR c++/50870
++// { dg-options -std=c++0x }
++
++template <class V>
++ struct impl
++ {
++ template <class T> static T create();
++ };
++
++template <class T, class U, class V, class
++ = decltype(impl<V>::template create<T>()
++ -> impl<V>::template create<U>())>
++struct tester { };
++
++tester<impl<float>*, int, float> ti;
+Index: gcc/testsuite/g++.dg/cpp0x/decltype36.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/decltype36.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/decltype36.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,21 @@
++// PR c++/51265
++// { dg-options -std=c++0x }
++
++struct Funny
++{
++ int print(int);
++};
++
++template<typename X>
++void c();
++
++template<typename X, X ff>
++void xx()
++{
++ c<decltype(ff)>();
+}
-
-- add_graph_edge (graph, to, d);
-
-- temp = *(get_graph_weights (graph, from, c->dest));
-- if (temp)
-- {
-- weights = get_graph_weights (graph, to, d);
-- if (!*weights)
-- *weights = allocate_graph_weights (graph, to, d);
--
-- bitmap_ior_into (*weights, temp);
-- }
--
-- }
--
-- /* Merge all the nonzero weighted successor edges. */
-- for (i = 0; VEC_iterate (constraint_edge_t, succvec, i, c); i++)
-- {
-- unsigned int d = c->dest;
-- bitmap temp;
-- bitmap *weights;
-+/* Add an indirect graph edge to GRAPH, going from TO to FROM if
-+ it doesn't exist in the graph already. */
-
-- if (c->dest == from)
-- d = to;
-+static void
-+add_implicit_graph_edge (constraint_graph_t graph, unsigned int to,
-+ unsigned int from)
++
++int main()
++{
++ xx<int(Funny::*)(int), &Funny::print>();
++}
+Index: gcc/testsuite/g++.dg/cpp0x/pr51150.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/pr51150.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/pr51150.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,20 @@
++// PR c++/51150
++// { dg-options "-std=c++0x" }
++
++struct Clock {
++ double Now();
++};
++template <class T> void Foo(Clock* clock) {
++ const int now = clock->Now();
++}
++
++template void Foo<float>(Clock*);
++
++template <class T> void Boo(int val) {
++ const int now1 = (double)(val);
++ const int now2 = const_cast<double>(val); // { dg-error "invalid" }
++ const int now3 = static_cast<double>(val);
++ const int now4 = reinterpret_cast<double>(val); // { dg-error "invalid" }
++}
++
++template void Boo<float>(int);
+Index: gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,17 @@
++// PR c++/51868
++// { dg-options -std=c++0x }
++
++struct A {
++ A() {}
++ A(const A&) {}
++ A(A&&) {}
++};
++
++struct B {
++ A a;
++ int f : 1;
++};
++
++B func() {
++ return B();
++}
+Index: gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,12 @@
++// { dg-options -std=c++0x }
++
++struct A
++{
++ int i : 1;
++};
++
++int main()
++{
++ A a;
++ static_cast<int&&>(a.i);
++}
+Index: gcc/testsuite/g++.dg/cpp0x/rv-cast3.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/rv-cast3.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/rv-cast3.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,18 @@
++// PR c++/51406
++// { dg-do run }
++// { dg-options "-std=c++0x" }
++
++extern "C" int printf(const char *,...);
++extern "C" void abort();
++
++struct A { int a; A() : a(1) {} };
++struct B { int b; B() : b(2) {} };
++struct X : A, B {};
++
++int main() {
++ X x;
++ int a=static_cast<A&&>(x).a;
++ int b=static_cast<B&&>(x).b;
++ // printf ("%d %d\n", a, b);
++ if (a!=1 || b!=2) abort();
++}
+Index: gcc/testsuite/g++.dg/cpp0x/rv-cast4.C
+===================================================================
+--- gcc/testsuite/g++.dg/cpp0x/rv-cast4.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/cpp0x/rv-cast4.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,13 @@
++// PR c++/51161
++// { dg-options "-std=c++0x" }
++
++struct A{};
++struct B : A{};
++struct C : A{};
++struct D : B, C{};
++
++int main()
+{
-+ if (to == from)
-+ return;
-
-- add_graph_edge (graph, d, to);
-+ if (!graph->implicit_preds[to])
-+ graph->implicit_preds[to] = BITMAP_ALLOC (&predbitmap_obstack);
++ D d;
++ static_cast<A &&>(d); // { dg-error "ambiguous" }
++}
+Index: gcc/testsuite/g++.dg/gcov/gcov-2.C
+===================================================================
+--- gcc/testsuite/g++.dg/gcov/gcov-2.C (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/testsuite/g++.dg/gcov/gcov-2.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -20,7 +20,7 @@
-- temp = *(get_graph_weights (graph, c->dest, from));
-- if (temp)
-- {
-- weights = get_graph_weights (graph, d, to);
-- if (!*weights)
-- *weights = allocate_graph_weights (graph, d, to);
-- bitmap_ior_into (*weights, temp);
-- }
-+ if (!bitmap_bit_p (graph->implicit_preds[to], from))
-+ {
-+ stats.num_implicit_edges++;
-+ bitmap_set_bit (graph->implicit_preds[to], from);
- }
-- clear_edges_for_node (graph, from);
+ void foo()
+ {
+- C c; /* count(2) */
++ C c; /* count(1) */
+ c.seti (1); /* count(1) */
}
--/* Add a graph edge to GRAPH, going from TO to FROM, with WEIGHT, if
-+/* Add a predecessor graph edge to GRAPH, going from TO to FROM if
- it doesn't exist in the graph already.
- Return false if the edge already existed, true otherwise. */
-
-+static void
-+add_pred_graph_edge (constraint_graph_t graph, unsigned int to,
-+ unsigned int from)
+Index: gcc/testsuite/g++.dg/torture/pr51344.C
+===================================================================
+--- gcc/testsuite/g++.dg/torture/pr51344.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/torture/pr51344.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,11 @@
++/* { dg-do compile { target { i?86-*-* && ilp32 } } } */
++class A;
++
++template <class T>
++class B
++{
++ friend __attribute__((cdecl)) A& operator >>(A& a, B& b)
++ {
++ return a;
++ }
++};
+Index: gcc/testsuite/g++.dg/torture/pr49720.C
+===================================================================
+--- gcc/testsuite/g++.dg/torture/pr49720.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/torture/pr49720.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,8 @@
++/* { dg-do compile } */
++
++extern char t_start[], t_end[], t_size[];
++bool foo (void)
+{
-+ if (!graph->preds[to])
-+ graph->preds[to] = BITMAP_ALLOC (&predbitmap_obstack);
-+ if (!bitmap_bit_p (graph->preds[to], from))
-+ bitmap_set_bit (graph->preds[to], from);
++ long size = reinterpret_cast<long>(t_size);
++ return (size == t_end - t_start);
+}
+Index: gcc/testsuite/g++.dg/ipa/pr51759.C
+===================================================================
+--- gcc/testsuite/g++.dg/ipa/pr51759.C (.../tags/gcc_4_6_2_release) (wersja 0)
++++ gcc/testsuite/g++.dg/ipa/pr51759.C (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,26 @@
++/* { dg-do run } */
++/* { dg-options "-O2" } */
+
-+/* Add a graph edge to GRAPH, going from FROM to TO if
-+ it doesn't exist in the graph already.
-+ Return false if the edge already existed, true otherwise. */
++extern "C" void abort (void);
++struct S
++{
++ void __attribute__((noinline)) set(unsigned val)
++ {
++ data = val;
++ if (data != val)
++ abort ();
++ }
++ int pad0;
++ unsigned pad1 : 8;
++ unsigned data : 24;
++ int pad2;
++};
++int main()
++{
++ S s;
++ s.pad2 = -1;
++ s.set(0);
++ if (s.pad2 != -1)
++ abort ();
++}
+
- static bool
--int_add_graph_edge (constraint_graph_t graph, unsigned int to,
-- unsigned int from, unsigned HOST_WIDE_INT weight)
-+add_graph_edge (constraint_graph_t graph, unsigned int to,
-+ unsigned int from)
- {
-- if (to == from && weight == 0)
-+ if (to == from)
+Index: gcc/cp/typeck.c
+===================================================================
+--- gcc/cp/typeck.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/typeck.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4835,9 +4835,7 @@
+ && TREE_CONSTANT (TREE_OPERAND (val, 0)))
{
- return false;
+ tree type = build_pointer_type (argtype);
+- tree op0 = fold_convert (type, TREE_OPERAND (val, 0));
+- tree op1 = fold_convert (sizetype, fold_offsetof (arg, val));
+- return fold_build2 (POINTER_PLUS_EXPR, type, op0, op1);
++ return fold_convert (type, fold_offsetof_1 (arg));
}
-@@ -1125,41 +924,15 @@
- {
- bool r = false;
-- if (weight == 0)
-+ if (!graph->succs[from])
-+ graph->succs[from] = BITMAP_ALLOC (&pta_obstack);
-+ if (!bitmap_bit_p (graph->succs[from], to))
- {
-- if (!graph->zero_weight_preds[to])
-- graph->zero_weight_preds[to] = BITMAP_ALLOC (&predbitmap_obstack);
-- if (!graph->zero_weight_succs[from])
-- graph->zero_weight_succs[from] = BITMAP_ALLOC (&ptabitmap_obstack);
-- if (!bitmap_bit_p (graph->zero_weight_succs[from], to))
-- {
-- edge_added = true;
-- r = true;
-- stats.num_edges++;
-- bitmap_set_bit (graph->zero_weight_preds[to], from);
-- bitmap_set_bit (graph->zero_weight_succs[from], to);
-- }
-+ r = true;
-+ if (to < FIRST_REF_NODE && from < FIRST_REF_NODE)
-+ stats.num_edges++;
-+ bitmap_set_bit (graph->succs[from], to);
- }
-- else
-- {
-- bitmap *weights;
--
-- r = add_graph_edge (graph, to, from);
-- weights = get_graph_weights (graph, to, from);
--
-- if (!*weights)
-- {
-- r = true;
-- *weights = allocate_graph_weights (graph, to, from);
-- bitmap_set_bit (*weights, weight);
-- }
-- else
-- {
-- r |= !bitmap_bit_p (*weights, weight);
-- bitmap_set_bit (*weights, weight);
-- }
-- }
--
- return r;
+ /* Handle complex lvalues (when permitted)
+@@ -5698,11 +5696,12 @@
+ {
+ tree intype;
+ tree result;
++ cp_lvalue_kind clk;
+
+ /* Assume the cast is valid. */
+ *valid_p = true;
+
+- intype = TREE_TYPE (expr);
++ intype = unlowered_expr_type (expr);
+
+ /* Save casted types in the function's used types hash table. */
+ used_types_insert (type);
+@@ -5768,12 +5767,29 @@
+ cv2 T2 if cv2 T2 is reference-compatible with cv1 T1 (8.5.3)." */
+ if (TREE_CODE (type) == REFERENCE_TYPE
+ && TYPE_REF_IS_RVALUE (type)
+- && real_lvalue_p (expr)
++ && (clk = real_lvalue_p (expr))
+ && reference_related_p (TREE_TYPE (type), intype)
+ && (c_cast_p || at_least_as_qualified_p (TREE_TYPE (type), intype)))
+ {
+- expr = build_typed_address (expr, type);
+- return convert_from_reference (expr);
++ if (clk == clk_ordinary)
++ {
++ /* Handle the (non-bit-field) lvalue case here by casting to
++ lvalue reference and then changing it to an rvalue reference.
++ Casting an xvalue to rvalue reference will be handled by the
++ main code path. */
++ tree lref = cp_build_reference_type (TREE_TYPE (type), false);
++ result = (perform_direct_initialization_if_possible
++ (lref, expr, c_cast_p, complain));
++ result = cp_fold_convert (type, result);
++ /* Make sure we don't fold back down to a named rvalue reference,
++ because that would be an lvalue. */
++ if (DECL_P (result))
++ result = build1 (NON_LVALUE_EXPR, type, result);
++ return convert_from_reference (result);
++ }
++ else
++ /* For a bit-field or packed field, bind to a temporary. */
++ expr = rvalue (expr);
}
- }
-@@ -1168,46 +941,51 @@
- /* Return true if {DEST.SRC} is an existing graph edge in GRAPH. */
- static bool
--valid_graph_edge (constraint_graph_t graph, unsigned int src,
-+valid_graph_edge (constraint_graph_t graph, unsigned int src,
- unsigned int dest)
+ /* Resolve overloaded address here rather than once in
+Index: gcc/cp/init.c
+===================================================================
+--- gcc/cp/init.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/init.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -141,7 +141,9 @@
+ zero-initialization does not simply mean filling the storage with
+ zero bytes. FIELD_SIZE, if non-NULL, is the bit size of the field,
+ subfields with bit positions at or above that bit size shouldn't
+- be added. */
++ be added. Note that this only works when the result is assigned
++ to a base COMPONENT_REF; if we only have a pointer to the base subobject,
++ expand_assignment will end up clearing the full size of TYPE. */
+
+ static tree
+ build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
+@@ -368,6 +370,12 @@
+ tree
+ build_value_init_noctor (tree type, tsubst_flags_t complain)
{
-- struct constraint_edge lookfor;
-- lookfor.dest = src;
--
-- return (graph->zero_weight_succs[dest]
-- && bitmap_bit_p (graph->zero_weight_succs[dest], src))
-- || constraint_edge_vec_find (graph->succs[dest], lookfor) != NULL;
-+ return (graph->succs[dest]
-+ && bitmap_bit_p (graph->succs[dest], src));
- }
++ if (!COMPLETE_TYPE_P (type))
++ {
++ if (complain & tf_error)
++ error ("value-initialization of incomplete type %qT", type);
++ return error_mark_node;
++ }
+ if (CLASS_TYPE_P (type))
+ {
+ gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type));
+Index: gcc/cp/class.c
+===================================================================
+--- gcc/cp/class.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/class.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -464,7 +464,14 @@
+ /* Is this the base field created by build_base_field? */
+ if (TREE_CODE (field) == FIELD_DECL
+ && DECL_FIELD_IS_BASE (field)
+- && TREE_TYPE (field) == type)
++ && TREE_TYPE (field) == type
++ /* If we're looking for a field in the most-derived class,
++ also check the field offset; we can have two base fields
++ of the same type if one is an indirect virtual base and one
++ is a direct non-virtual base. */
++ && (BINFO_INHERITANCE_CHAIN (d_binfo)
++ || tree_int_cst_equal (byte_position (field),
++ BINFO_OFFSET (binfo))))
+ {
+ /* We don't use build_class_member_access_expr here, as that
+ has unnecessary checks, and more importantly results in
+@@ -541,6 +548,10 @@
+ {
+ tree pointer_type;
--/* Return true if {DEST, SRC} is an existing weighted graph edge (IE has
-- a weight other than 0) in GRAPH. */
--static bool
--valid_weighted_graph_edge (constraint_graph_t graph, unsigned int src,
-- unsigned int dest)
--{
-- struct constraint_edge lookfor;
-- lookfor.dest = src;
--
-- return graph->preds[src]
-- && constraint_edge_vec_find (graph->succs[dest], lookfor) != NULL;
--}
-+/* Build the constraint graph, adding only predecessor edges right now. */
++ /* If this is a non-empty base, use a COMPONENT_REF. */
++ if (!is_empty_class (BINFO_TYPE (base)))
++ return build_simple_base_path (expr, base);
++
+ pointer_type = build_pointer_type (expr_type);
--
--/* Build the constraint graph. */
--
+ /* We use fold_build2 and fold_convert below to simplify the trees
+Index: gcc/cp/decl.c
+===================================================================
+--- gcc/cp/decl.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/decl.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -11540,15 +11540,19 @@
static void
--build_constraint_graph (void)
-+build_pred_graph (void)
+ copy_type_enum (tree dst, tree src)
{
-- int i = 0;
-+ int i;
- constraint_t c;
-+ unsigned int j;
-
- graph = XNEW (struct constraint_graph);
-- graph_size = VEC_length (varinfo_t, varmap) + 1;
-- graph->succs = XCNEWVEC (VEC(constraint_edge_t,heap) *, graph_size);
-- graph->preds = XCNEWVEC (VEC(constraint_edge_t,heap) *, graph_size);
-- graph->zero_weight_succs = XCNEWVEC (bitmap, graph_size);
-- graph->zero_weight_preds = XCNEWVEC (bitmap, graph_size);
-+ graph->size = (VEC_length (varinfo_t, varmap)) * 3;
-+ graph->succs = XCNEWVEC (bitmap, graph->size);
-+ graph->implicit_preds = XCNEWVEC (bitmap, graph->size);
-+ graph->preds = XCNEWVEC (bitmap, graph->size);
-+ graph->indirect_cycles = XNEWVEC (int, VEC_length (varinfo_t, varmap));
-+ graph->label = XCNEWVEC (unsigned int, graph->size);
-+ graph->rep = XNEWVEC (unsigned int, graph->size);
-+ graph->eq_rep = XNEWVEC (int, graph->size);
-+ graph->complex = XCNEWVEC (VEC(constraint_t, heap) *,
-+ VEC_length (varinfo_t, varmap));
-+ graph->direct_nodes = sbitmap_alloc (graph->size);
-+ sbitmap_zero (graph->direct_nodes);
-
-+ for (j = 0; j < FIRST_REF_NODE; j++)
+- TYPE_MIN_VALUE (dst) = TYPE_MIN_VALUE (src);
+- TYPE_MAX_VALUE (dst) = TYPE_MAX_VALUE (src);
+- TYPE_SIZE (dst) = TYPE_SIZE (src);
+- TYPE_SIZE_UNIT (dst) = TYPE_SIZE_UNIT (src);
+- SET_TYPE_MODE (dst, TYPE_MODE (src));
+- TYPE_PRECISION (dst) = TYPE_PRECISION (src);
+- TYPE_ALIGN (dst) = TYPE_ALIGN (src);
+- TYPE_USER_ALIGN (dst) = TYPE_USER_ALIGN (src);
+- TYPE_UNSIGNED (dst) = TYPE_UNSIGNED (src);
++ tree t;
++ for (t = dst; t; t = TYPE_NEXT_VARIANT (t))
+ {
-+ if (!get_varinfo (j)->is_special_var)
-+ SET_BIT (graph->direct_nodes, j);
++ TYPE_MIN_VALUE (t) = TYPE_MIN_VALUE (src);
++ TYPE_MAX_VALUE (t) = TYPE_MAX_VALUE (src);
++ TYPE_SIZE (t) = TYPE_SIZE (src);
++ TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (src);
++ SET_TYPE_MODE (dst, TYPE_MODE (src));
++ TYPE_PRECISION (t) = TYPE_PRECISION (src);
++ TYPE_ALIGN (t) = TYPE_ALIGN (src);
++ TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (src);
++ TYPE_UNSIGNED (t) = TYPE_UNSIGNED (src);
+ }
+ }
+
+ /* Begin compiling the definition of an enumeration type.
+@@ -11903,9 +11907,12 @@
+ return;
+ }
+
+- /* Here there should not be any variants of this type. */
++ /* If this is a forward declaration, there should not be any variants,
++ though we can get a variant in the middle of an enum-specifier with
++ wacky code like 'enum E { e = sizeof(const E*) };' */
+ gcc_assert (enumtype == TYPE_MAIN_VARIANT (enumtype)
+- && !TYPE_NEXT_VARIANT (enumtype));
++ && (TYPE_VALUES (enumtype)
++ || !TYPE_NEXT_VARIANT (enumtype)));
+ }
+
+ /* Build and install a CONST_DECL for an enumeration constant of the
+@@ -13356,8 +13363,17 @@
+ cleanup = call;
+ }
+
++ /* build_delete sets the location of the destructor call to the
++ current location, even though the destructor is going to be
++ called later, at the end of the current scope. This can lead to
++ a "jumpy" behaviour for users of debuggers when they step around
++ the end of the block. So let's unset the location of the
++ destructor call instead. */
++ if (cleanup != NULL && EXPR_P (cleanup))
++ SET_EXPR_LOCATION (cleanup, UNKNOWN_LOCATION);
+ return cleanup;
+ }
+
-+ for (j = 0; j < graph->size; j++)
-+ {
-+ graph->rep[j] = j;
-+ graph->eq_rep[j] = -1;
-+ }
+ \f
+ /* When a stmt has been parsed, this function is called. */
+
+Index: gcc/cp/ChangeLog
+===================================================================
+--- gcc/cp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,79 @@
++2012-01-19 Kai Tietz <ktietz@redhat.com>
+
-+ for (j = 0; j < VEC_length (varinfo_t, varmap); j++)
-+ graph->indirect_cycles[j] = -1;
++ PR c++/51344
++ * decl2.c (save_template_attributes): Use merge_attributes
++ instead of chaining up via TREE_CHAIN.
+
- for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++)
- {
- struct constraint_expr lhs = c->lhs;
-@@ -1217,31 +995,92 @@
-
- if (lhs.type == DEREF)
- {
-- /* *x = y or *x = &y (complex) */
-- if (rhs.type == ADDRESSOF || rhsvar > anything_id)
-- insert_into_complex (lhsvar, c);
-+ /* *x = y. */
-+ if (rhs.offset == 0 && lhs.offset == 0 && rhs.type == SCALAR)
-+ add_pred_graph_edge (graph, FIRST_REF_NODE + lhsvar, rhsvar);
-+ if (rhs.type == ADDRESSOF)
-+ RESET_BIT (graph->direct_nodes, rhsvar);
- }
- else if (rhs.type == DEREF)
- {
-- /* !special var= *y */
-- if (!(get_varinfo (lhsvar)->is_special_var))
-- insert_into_complex (rhsvar, c);
-+ /* x = *y */
-+ if (rhs.offset == 0 && lhs.offset == 0 && lhs.type == SCALAR)
-+ add_pred_graph_edge (graph, lhsvar, FIRST_REF_NODE + rhsvar);
-+ else
-+ RESET_BIT (graph->direct_nodes, lhsvar);
- }
- else if (rhs.type == ADDRESSOF)
- {
- /* x = &y */
-+ add_pred_graph_edge (graph, lhsvar, FIRST_ADDR_NODE + rhsvar);
-+ /* Implicitly, *x = y */
-+ add_implicit_graph_edge (graph, FIRST_REF_NODE + lhsvar, rhsvar);
++2012-01-16 Jakub Jelinek <jakub@redhat.com>
+
-+ RESET_BIT (graph->direct_nodes, rhsvar);
-+ }
-+ else if (lhsvar > anything_id
-+ && lhsvar != rhsvar && lhs.offset == 0 && rhs.offset == 0)
-+ {
-+ /* x = y */
-+ add_pred_graph_edge (graph, lhsvar, rhsvar);
-+ /* Implicitly, *x = *y */
-+ add_implicit_graph_edge (graph, FIRST_REF_NODE + lhsvar,
-+ FIRST_REF_NODE + rhsvar);
-+ }
-+ else if (lhs.offset != 0 || rhs.offset != 0)
-+ {
-+ if (rhs.offset != 0)
-+ RESET_BIT (graph->direct_nodes, lhs.var);
-+ if (lhs.offset != 0)
-+ RESET_BIT (graph->direct_nodes, rhs.var);
-+ }
-+ }
-+}
++ PR c++/51854
++ * mangle.c (write_template_arg_literal): Sorry instead of aborting.
+
-+/* Build the constraint graph, adding successor edges. */
++2012-01-16 Jason Merrill <jason@redhat.com>
+
-+static void
-+build_succ_graph (void)
-+{
-+ int i;
-+ constraint_t c;
++ PR c++/51868
++ * typeck.c (build_static_cast_1): Handle bit-fields properly.
+
-+ for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++)
-+ {
-+ struct constraint_expr lhs;
-+ struct constraint_expr rhs;
-+ unsigned int lhsvar;
-+ unsigned int rhsvar;
++2011-12-20 Dodji Seketeli <dodji@redhat.com>
+
-+ if (!c)
-+ continue;
++ PR debug/49951
++ * decl.c (cxx_maybe_build_cleanup): Don't set location of the call
++ to the destructor.
+
-+ lhs = c->lhs;
-+ rhs = c->rhs;
-+ lhsvar = find (get_varinfo_fc (lhs.var)->id);
-+ rhsvar = find (get_varinfo_fc (rhs.var)->id);
++2011-12-16 Jason Merrill <jason@redhat.com>
+
-+ if (lhs.type == DEREF)
-+ {
-+ if (rhs.offset == 0 && lhs.offset == 0 && rhs.type == SCALAR)
-+ add_graph_edge (graph, FIRST_REF_NODE + lhsvar, rhsvar);
-+ }
-+ else if (rhs.type == DEREF)
-+ {
-+ if (rhs.offset == 0 && lhs.offset == 0 && lhs.type == SCALAR)
-+ add_graph_edge (graph, lhsvar, FIRST_REF_NODE + rhsvar);
-+ }
-+ else if (rhs.type == ADDRESSOF)
-+ {
-+ /* x = &y */
-+ gcc_assert (find (get_varinfo_fc (rhs.var)->id)
-+ == get_varinfo_fc (rhs.var)->id);
- bitmap_set_bit (get_varinfo (lhsvar)->solution, rhsvar);
- }
-- else if (lhsvar > anything_id)
-+ else if (lhsvar > anything_id
-+ && lhsvar != rhsvar && lhs.offset == 0 && rhs.offset == 0)
- {
-- /* Ignore 0 weighted self edges, as they can't possibly contribute
-- anything */
-- if (lhsvar != rhsvar || rhs.offset != 0 || lhs.offset != 0)
-- {
-- /* x = y (simple) */
-- int_add_graph_edge (graph, lhs.var, rhs.var, rhs.offset);
-- }
--
-+ add_graph_edge (graph, lhsvar, rhsvar);
- }
++ PR c++/51416
++ * init.c (build_value_init_noctor): Check for incomplete type.
++
++2011-12-16 Jason Merrill <jason@redhat.com>
++
++ PR c++/51331
++ * class.c (convert_to_base_statically): Just call
++ build_simple_base_path.
++ (build_simple_base_path): Check field offset.
++
++2011-12-14 Jason Merrill <jason@redhat.com>
++
++ PR c++/51248
++ * decl.c (copy_type_enum): Also update variants.
++ (finish_enum): Allow variants of complete enums.
++
++2011-12-13 Jason Merrill <jason@redhat.com>
++
++ PR c++/51406
++ PR c++/51161
++ * typeck.c (build_static_cast_1): Fix cast of lvalue to
++ base rvalue reference.
++
++2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/51265
++ * semantics.c (finish_decltype_type): Handle PTRMEM_CST.
++
++2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/51150
++ * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR.
++
++2011-11-07 Jason Merrill <jason@redhat.com>
++
++ PR c++/50870
++ * pt.c (tsubst_copy): Handle NAMESPACE_DECL.
++ (tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
++ object.
++
++2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
++
++ PR c++/50608
++ * semantics.c (finish_offsetof): Adjust call to fold_offsetof.
++ * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1.
++
++2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR c++/50901
++ * call.c (build_new_op_1): Handle ABS_EXPR together with the
++ other unary EXPR.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: gcc/cp/pt.c
+===================================================================
+--- gcc/cp/pt.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/pt.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -11439,6 +11439,9 @@
+ mark_used (t);
+ return t;
+
++ case NAMESPACE_DECL:
++ return t;
++
+ case OVERLOAD:
+ /* An OVERLOAD will always be a non-dependent overload set; an
+ overload set from function scope will just be represented with an
+@@ -12704,6 +12707,10 @@
+ return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)),
+ complain);
+
++ case FIX_TRUNC_EXPR:
++ return cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)),
++ 0, complain);
++
+ case ADDR_EXPR:
+ op1 = TREE_OPERAND (t, 0);
+ if (TREE_CODE (op1) == LABEL_DECL)
+@@ -13179,7 +13186,9 @@
+ if (member == error_mark_node)
+ return error_mark_node;
+
+- if (object_type && !CLASS_TYPE_P (object_type))
++ if (type_dependent_expression_p (object))
++ /* We can't do much here. */;
++ else if (!CLASS_TYPE_P (object_type))
+ {
+ if (SCALAR_TYPE_P (object_type))
+ {
+Index: gcc/cp/semantics.c
+===================================================================
+--- gcc/cp/semantics.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/semantics.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3348,7 +3348,7 @@
}
+ if (TREE_CODE (expr) == INDIRECT_REF && REFERENCE_REF_P (expr))
+ expr = TREE_OPERAND (expr, 0);
+- return fold_offsetof (expr, NULL_TREE);
++ return fold_offsetof (expr);
}
-@@ -1260,20 +1099,20 @@
- struct scc_info
- {
- sbitmap visited;
-- sbitmap in_component;
-+ sbitmap roots;
-+ unsigned int *dfs;
-+ unsigned int *node_mapping;
- int current_index;
-- unsigned int *visited_index;
- VEC(unsigned,heap) *scc_stack;
-- VEC(unsigned,heap) *unification_queue;
- };
+ /* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR. This
+@@ -4927,8 +4927,9 @@
+ gcc_unreachable ();
- /* Recursive routine to find strongly connected components in GRAPH.
- SI is the SCC info to store the information in, and N is the id of current
- graph node we are processing.
--
-+
- This is Tarjan's strongly connected component finding algorithm, as
-- modified by Nuutila to keep only non-root nodes on the stack.
-+ modified by Nuutila to keep only non-root nodes on the stack.
- The algorithm can be found in "On finding the strongly connected
- connected components in a directed graph" by Esko Nuutila and Eljas
- Soisalon-Soininen, in Information Processing Letters volume 49,
-@@ -1284,188 +1123,144 @@
+ case INTEGER_CST:
++ case PTRMEM_CST:
+ /* We can get here when the id-expression refers to an
+- enumerator. */
++ enumerator or non-type template parameter. */
+ type = TREE_TYPE (expr);
+ break;
+
+Index: gcc/cp/decl2.c
+===================================================================
+--- gcc/cp/decl2.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/decl2.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1185,9 +1185,9 @@
+
+ old_attrs = *q;
+
+- /* Place the late attributes at the beginning of the attribute
++ /* Merge the late attributes at the beginning with the attribute
+ list. */
+- TREE_CHAIN (tree_last (late_attrs)) = *q;
++ late_attrs = merge_attributes (late_attrs, *q);
+ *q = late_attrs;
+
+ if (!DECL_P (*decl_p) && *decl_p == TYPE_MAIN_VARIANT (*decl_p))
+Index: gcc/cp/call.c
+===================================================================
+--- gcc/cp/call.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/call.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4996,6 +4996,7 @@
+ case POSTDECREMENT_EXPR:
+ case REALPART_EXPR:
+ case IMAGPART_EXPR:
++ case ABS_EXPR:
+ return cp_build_unary_op (code, arg1, candidates != 0, complain);
+
+ case ARRAY_REF:
+Index: gcc/cp/mangle.c
+===================================================================
+--- gcc/cp/mangle.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cp/mangle.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2770,7 +2770,8 @@
+ break;
+
+ default:
+- gcc_unreachable ();
++ sorry ("mangling %C", TREE_CODE (value));
++ break;
+ }
+
+ write_char ('E');
+Index: gcc/lto-cgraph.c
+===================================================================
+--- gcc/lto-cgraph.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto-cgraph.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1792,9 +1792,9 @@
{
+ const struct lto_function_header *header =
+ (const struct lto_function_header *) data;
+- const int32_t cfg_offset = sizeof (struct lto_function_header);
+- const int32_t main_offset = cfg_offset + header->cfg_size;
+- const int32_t string_offset = main_offset + header->main_size;
++ const int cfg_offset = sizeof (struct lto_function_header);
++ const int main_offset = cfg_offset + header->cfg_size;
++ const int string_offset = main_offset + header->main_size;
+ struct data_in *data_in;
+ struct lto_input_block ib_main;
unsigned int i;
- bitmap_iterator bi;
-+ unsigned int my_dfs;
+Index: gcc/lto-streamer-out.c
+===================================================================
+--- gcc/lto-streamer-out.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto-streamer-out.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2408,7 +2408,7 @@
+ enum gcc_plugin_symbol_kind kind;
+ enum gcc_plugin_symbol_visibility visibility;
+ int slot_num;
+- uint64_t size;
++ unsigned HOST_WIDEST_INT size;
+ const char *comdat;
+ unsigned char c;
+
+@@ -2466,7 +2466,7 @@
+ when symbol has attribute (visibility("hidden")) specified.
+ targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
+ right. */
+-
++
+ if (DECL_EXTERNAL (t)
+ && !targetm.binds_local_p (t))
+ visibility = GCCPV_DEFAULT;
+@@ -2488,14 +2488,9 @@
+ }
-- gcc_assert (get_varinfo (n)->node == n);
- SET_BIT (si->visited, n);
-- RESET_BIT (si->in_component, n);
-- si->visited_index[n] = si->current_index ++;
--
-+ si->dfs[n] = si->current_index ++;
-+ my_dfs = si->dfs[n];
+ if (kind == GCCPK_COMMON
+- && DECL_SIZE (t)
+- && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
+- {
+- size = (HOST_BITS_PER_WIDE_INT >= 64)
+- ? (uint64_t) int_size_in_bytes (TREE_TYPE (t))
+- : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
+- | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
+- }
++ && DECL_SIZE_UNIT (t)
++ && TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST)
++ size = TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
+ else
+ size = 0;
+
+Index: gcc/dwarf2out.c
+===================================================================
+--- gcc/dwarf2out.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/dwarf2out.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4431,6 +4431,11 @@
+ const char *section; /* Section this loclist is relative to */
+ dw_loc_descr_ref expr;
+ hashval_t hash;
++ /* True if all addresses in this and subsequent lists are known to be
++ resolved. */
++ bool resolved_addr;
++ /* True if this list has been replaced by dw_loc_next. */
++ bool replaced;
+ bool emitted;
+ } dw_loc_list_node;
+
+@@ -6091,6 +6096,19 @@
+ /* Table of decl location linked lists. */
+ static GTY ((param_is (var_loc_list))) htab_t decl_loc_table;
+
++/* A cached location list. */
++struct GTY (()) cached_dw_loc_list_def {
++ /* The DECL_UID of the decl that this entry describes. */
++ unsigned int decl_id;
++
++ /* The cached location list. */
++ dw_loc_list_ref loc_list;
++};
++typedef struct cached_dw_loc_list_def cached_dw_loc_list;
++
++/* Table of cached location lists. */
++static GTY ((param_is (cached_dw_loc_list))) htab_t cached_dw_loc_list_table;
++
+ /* A pointer to the base of a list of references to DIE's that
+ are uniquely identified by their tag, presence/absence of
+ children DIE's, and list of attribute/value pairs. */
+@@ -6439,7 +6457,7 @@
+ static void insert_double (double_int, unsigned char *);
+ static void insert_float (const_rtx, unsigned char *);
+ static rtx rtl_for_decl_location (tree);
+-static bool add_location_or_const_value_attribute (dw_die_ref, tree,
++static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool,
+ enum dwarf_attribute);
+ static bool tree_add_const_value_attribute (dw_die_ref, tree);
+ static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree);
+@@ -8173,6 +8191,24 @@
+ htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
+ }
+
++/* Returns a hash value for X (which really is a cached_dw_loc_list_list). */
+
- /* Visit all the successors. */
-- EXECUTE_IF_IN_NONNULL_BITMAP (graph->zero_weight_succs[n], 0, i, bi)
-+ EXECUTE_IF_IN_NONNULL_BITMAP (graph->succs[n], 0, i, bi)
- {
-- unsigned int w = i;
-+ unsigned int w;
++static hashval_t
++cached_dw_loc_list_table_hash (const void *x)
++{
++ return (hashval_t) ((const cached_dw_loc_list *) x)->decl_id;
++}
+
-+ if (i > LAST_REF_NODE)
-+ break;
++/* Return nonzero if decl_id of cached_dw_loc_list X is the same as
++ UID of decl *Y. */
+
-+ w = find (i);
-+ if (TEST_BIT (si->roots, w))
-+ continue;
++static int
++cached_dw_loc_list_table_eq (const void *x, const void *y)
++{
++ return (((const cached_dw_loc_list *) x)->decl_id
++ == DECL_UID ((const_tree) y));
++}
+
- if (!TEST_BIT (si->visited, w))
- scc_visit (graph, si, w);
-- if (!TEST_BIT (si->in_component, w))
-- {
-- unsigned int t = get_varinfo (w)->node;
-- unsigned int nnode = get_varinfo (n)->node;
-- if (si->visited_index[t] < si->visited_index[nnode])
-- get_varinfo (n)->node = t;
-- }
-+ {
-+ unsigned int t = find (w);
-+ unsigned int nnode = find (n);
-+ gcc_assert (nnode == n);
+ /* Equate a DIE to a particular declaration. */
+
+ static void
+@@ -16995,15 +17031,22 @@
+ these things can crop up in other ways also.) Note that one type of
+ constant value which can be passed into an inlined function is a constant
+ pointer. This can happen for example if an actual argument in an inlined
+- function call evaluates to a compile-time constant address. */
++ function call evaluates to a compile-time constant address.
+
++ CACHE_P is true if it is worth caching the location list for DECL,
++ so that future calls can reuse it rather than regenerate it from scratch.
++ This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
++ since we will need to refer to them each time the function is inlined. */
+
-+ if (si->dfs[t] < si->dfs[nnode])
-+ si->dfs[n] = si->dfs[t];
-+ }
+ static bool
+-add_location_or_const_value_attribute (dw_die_ref die, tree decl,
++add_location_or_const_value_attribute (dw_die_ref die, tree decl, bool cache_p,
+ enum dwarf_attribute attr)
+ {
+ rtx rtl;
+ dw_loc_list_ref list;
+ var_loc_list *loc_list;
++ cached_dw_loc_list *cache;
++ void **slot;
+
+ if (TREE_CODE (decl) == ERROR_MARK)
+ return false;
+@@ -17040,7 +17083,33 @@
+ && add_const_value_attribute (die, rtl))
+ return true;
}
--
-+
- /* See if any components have been identified. */
-- if (get_varinfo (n)->node == n)
-+ if (si->dfs[n] == my_dfs)
+- list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
++ /* If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its
++ list several times. See if we've already cached the contents. */
++ list = NULL;
++ if (loc_list == NULL || cached_dw_loc_list_table == NULL)
++ cache_p = false;
++ if (cache_p)
++ {
++ cache = (cached_dw_loc_list *)
++ htab_find_with_hash (cached_dw_loc_list_table, decl, DECL_UID (decl));
++ if (cache)
++ list = cache->loc_list;
++ }
++ if (list == NULL)
++ {
++ list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
++ /* It is usually worth caching this result if the decl is from
++ BLOCK_NONLOCALIZED_VARS and if the list has at least two elements. */
++ if (cache_p && list && list->dw_loc_next)
++ {
++ slot = htab_find_slot_with_hash (cached_dw_loc_list_table, decl,
++ DECL_UID (decl), INSERT);
++ cache = ggc_alloc_cleared_cached_dw_loc_list ();
++ cache->decl_id = DECL_UID (decl);
++ cache->loc_list = list;
++ *slot = cache;
++ }
++ }
+ if (list)
{
-- unsigned int t = si->visited_index[n];
-- SET_BIT (si->in_component, n);
-- while (VEC_length (unsigned, si->scc_stack) != 0
-- && t < si->visited_index[VEC_last (unsigned, si->scc_stack)])
-+ if (VEC_length (unsigned, si->scc_stack) > 0
-+ && si->dfs[VEC_last (unsigned, si->scc_stack)] >= my_dfs)
- {
-- unsigned int w = VEC_pop (unsigned, si->scc_stack);
-- get_varinfo (w)->node = n;
-- SET_BIT (si->in_component, w);
-- /* Mark this node for collapsing. */
-- VEC_safe_push (unsigned, heap, si->unification_queue, w);
-- }
-- }
-- else
-- VEC_safe_push (unsigned, heap, si->scc_stack, n);
--}
-+ bitmap scc = BITMAP_ALLOC (NULL);
-+ bool have_ref_node = n >= FIRST_REF_NODE;
-+ unsigned int lowest_node;
-+ bitmap_iterator bi;
-
-+ bitmap_set_bit (scc, n);
+ add_AT_location_description (die, attr, list);
+@@ -18738,7 +18807,7 @@
+ equate_decl_number_to_die (node, parm_die);
+ if (! DECL_ABSTRACT (node_or_origin))
+ add_location_or_const_value_attribute (parm_die, node_or_origin,
+- DW_AT_location);
++ node == NULL, DW_AT_location);
--/* Collapse two variables into one variable. */
-+ while (VEC_length (unsigned, si->scc_stack) != 0
-+ && si->dfs[VEC_last (unsigned, si->scc_stack)] >= my_dfs)
-+ {
-+ unsigned int w = VEC_pop (unsigned, si->scc_stack);
-
--static void
--collapse_nodes (constraint_graph_t graph, unsigned int to, unsigned int from)
--{
-- bitmap tosol, fromsol;
-+ bitmap_set_bit (scc, w);
-+ if (w >= FIRST_REF_NODE)
-+ have_ref_node = true;
-+ }
+ break;
-- condense_varmap_nodes (to, from);
-- tosol = get_varinfo (to)->solution;
-- fromsol = get_varinfo (from)->solution;
-- bitmap_ior_into (tosol, fromsol);
-- merge_graph_nodes (graph, to, from);
--
-- if (valid_graph_edge (graph, to, to))
-- {
-- if (graph->zero_weight_preds[to])
-- {
-- bitmap_clear_bit (graph->zero_weight_preds[to], to);
-- bitmap_clear_bit (graph->zero_weight_succs[to], to);
-+ lowest_node = bitmap_first_set_bit (scc);
-+ gcc_assert (lowest_node < FIRST_REF_NODE);
-+ EXECUTE_IF_SET_IN_BITMAP (scc, 0, i, bi)
-+ {
-+ if (i < FIRST_REF_NODE)
-+ {
-+ /* Mark this node for collapsing. */
-+ if (unite (lowest_node, i))
-+ unify_nodes (graph, lowest_node, i, false);
-+ }
-+ else
-+ {
-+ unite (lowest_node, i);
-+ graph->indirect_cycles[i - FIRST_REF_NODE] = lowest_node;
-+ }
-+ }
- }
-- if (valid_weighted_graph_edge (graph, to, to))
-- {
-- bitmap weights = *(get_graph_weights (graph, to, to));
-- if (!weights || bitmap_empty_p (weights))
-- erase_graph_self_edge (graph, to);
-- }
-+ SET_BIT (si->roots, n);
- }
-- BITMAP_FREE (fromsol);
-- get_varinfo (to)->address_taken |= get_varinfo (from)->address_taken;
-- get_varinfo (to)->indirect_target |= get_varinfo (from)->indirect_target;
-+ else
-+ VEC_safe_push (unsigned, heap, si->scc_stack, n);
+@@ -18923,6 +18992,7 @@
+ tree context;
+ int was_abstract;
+ htab_t old_decl_loc_table;
++ htab_t old_cached_dw_loc_list_table;
+
+ /* Make sure we have the actual abstract inline, not a clone. */
+ decl = DECL_ORIGIN (decl);
+@@ -18937,6 +19007,8 @@
+ get locations in abstract instantces. */
+ old_decl_loc_table = decl_loc_table;
+ decl_loc_table = NULL;
++ old_cached_dw_loc_list_table = cached_dw_loc_list_table;
++ cached_dw_loc_list_table = NULL;
+
+ /* Be sure we've emitted the in-class declaration DIE (if any) first, so
+ we don't get confused by DECL_ABSTRACT. */
+@@ -18961,6 +19033,7 @@
+
+ current_function_decl = save_fn;
+ decl_loc_table = old_decl_loc_table;
++ cached_dw_loc_list_table = old_cached_dw_loc_list_table;
+ pop_cfun ();
}
-+/* Unify node FROM into node TO, updating the changed count if
-+ necessary when UPDATE_CHANGED is true. */
+@@ -19745,9 +19818,8 @@
+ && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin)))
+ defer_location (decl_or_origin, var_die);
+ else
+- add_location_or_const_value_attribute (var_die,
+- decl_or_origin,
+- DW_AT_location);
++ add_location_or_const_value_attribute (var_die, decl_or_origin,
++ decl == NULL, DW_AT_location);
+ add_pubname (decl_or_origin, var_die);
+ }
+ else
+@@ -21534,6 +21606,7 @@
+ dwarf2out_decl (decl);
--/* Unify nodes in GRAPH that we have found to be part of a cycle.
-- SI is the Strongly Connected Components information structure that tells us
-- what components to unify.
-- UPDATE_CHANGED should be set to true if the changed sbitmap and changed
-- count should be updated to reflect the unification. */
--
- static void
--process_unification_queue (constraint_graph_t graph, struct scc_info *si,
-- bool update_changed)
-+unify_nodes (constraint_graph_t graph, unsigned int to, unsigned int from,
-+ bool update_changed)
- {
-- size_t i = 0;
-- bitmap tmp = BITMAP_ALLOC (update_changed ? &iteration_obstack : NULL);
-- bitmap_clear (tmp);
-
-- /* We proceed as follows:
-+ gcc_assert (to != from && find (to) == to);
-+ if (dump_file && (dump_flags & TDF_DETAILS))
-+ fprintf (dump_file, "Unifying %s to %s\n",
-+ get_varinfo (from)->name,
-+ get_varinfo (to)->name);
-
-- For each component in the queue (components are delineated by
-- when current_queue_element->node != next_queue_element->node):
-+ if (update_changed)
-+ stats.unified_vars_dynamic++;
-+ else
-+ stats.unified_vars_static++;
+ htab_empty (decl_loc_table);
++ htab_empty (cached_dw_loc_list_table);
+ }
-- rep = representative node for component
-+ merge_graph_nodes (graph, to, from);
-+ merge_node_constraints (graph, to, from);
+ /* Output a marker (i.e. a label) for the beginning of the generated code for
+@@ -22267,6 +22340,11 @@
+ decl_loc_table = htab_create_ggc (10, decl_loc_table_hash,
+ decl_loc_table_eq, NULL);
-- For each node (tounify) to be unified in the component,
-- merge the solution for tounify into tmp bitmap
--
-- clear solution for tounify
--
-- merge edges from tounify into rep
--
-- merge complex constraints from tounify into rep
--
-- update changed count to note that tounify will never change
-- again
--
-- Merge tmp into solution for rep, marking rep changed if this
-- changed rep's solution.
--
-- Delete any 0 weighted self-edges we now have for rep. */
-- while (i != VEC_length (unsigned, si->unification_queue))
-+ if (update_changed && TEST_BIT (changed, from))
- {
-- unsigned int tounify = VEC_index (unsigned, si->unification_queue, i);
-- unsigned int n = get_varinfo (tounify)->node;
--
-- if (dump_file && (dump_flags & TDF_DETAILS))
-- fprintf (dump_file, "Unifying %s to %s\n",
-- get_varinfo (tounify)->name,
-- get_varinfo (n)->name);
-- if (update_changed)
-- stats.unified_vars_dynamic++;
-+ RESET_BIT (changed, from);
-+ if (!TEST_BIT (changed, to))
-+ SET_BIT (changed, to);
- else
-- stats.unified_vars_static++;
-- bitmap_ior_into (tmp, get_varinfo (tounify)->solution);
-- merge_graph_nodes (graph, n, tounify);
-- condense_varmap_nodes (n, tounify);
--
-- if (update_changed && TEST_BIT (changed, tounify))
- {
-- RESET_BIT (changed, tounify);
-- if (!TEST_BIT (changed, n))
-- SET_BIT (changed, n);
-- else
-- {
-- gcc_assert (changed_count > 0);
-- changed_count--;
-- }
-+ gcc_assert (changed_count > 0);
-+ changed_count--;
- }
-+ }
++ /* Allocate the cached_dw_loc_list_table. */
++ cached_dw_loc_list_table
++ = htab_create_ggc (10, cached_dw_loc_list_table_hash,
++ cached_dw_loc_list_table_eq, NULL);
++
+ /* Allocate the initial hunk of the decl_scope_table. */
+ decl_scope_table = VEC_alloc (tree, gc, 256);
-- bitmap_clear (get_varinfo (tounify)->solution);
-- ++i;
--
-- /* If we've either finished processing the entire queue, or
-- finished processing all nodes for component n, update the solution for
-- n. */
-- if (i == VEC_length (unsigned, si->unification_queue)
-- || get_varinfo (VEC_index (unsigned, si->unification_queue, i))->node != n)
-+ /* If the solution changes because of the merging, we need to mark
-+ the variable as changed. */
-+ if (bitmap_ior_into (get_varinfo (to)->solution,
-+ get_varinfo (from)->solution))
-+ {
-+ if (update_changed && !TEST_BIT (changed, to))
- {
-- /* If the solution changes because of the merging, we need to mark
-- the variable as changed. */
-- if (bitmap_ior_into (get_varinfo (n)->solution, tmp))
-- {
-- if (update_changed && !TEST_BIT (changed, n))
-- {
-- SET_BIT (changed, n);
-- changed_count++;
-- }
-- }
-- bitmap_clear (tmp);
--
-- if (valid_graph_edge (graph, n, n))
-- {
-- if (graph->zero_weight_succs[n])
-- {
-- if (graph->zero_weight_preds[n])
-- bitmap_clear_bit (graph->zero_weight_preds[n], n);
-- bitmap_clear_bit (graph->zero_weight_succs[n], n);
-- }
-- if (valid_weighted_graph_edge (graph, n, n))
-- {
-- bitmap weights = *(get_graph_weights (graph, n, n));
-- if (!weights || bitmap_empty_p (weights))
-- erase_graph_self_edge (graph, n);
-- }
-- }
-+ SET_BIT (changed, to);
-+ changed_count++;
- }
+@@ -22907,30 +22985,53 @@
+ {
+ dw_die_ref c;
+ dw_attr_ref a;
+- dw_loc_list_ref *curr;
++ dw_loc_list_ref *curr, *start, loc;
+ unsigned ix;
+
+ FOR_EACH_VEC_ELT (dw_attr_node, die->die_attr, ix, a)
+ switch (AT_class (a))
+ {
+ case dw_val_class_loc_list:
+- curr = AT_loc_list_ptr (a);
+- while (*curr)
++ start = curr = AT_loc_list_ptr (a);
++ loc = *curr;
++ gcc_assert (loc);
++ /* The same list can be referenced more than once. See if we have
++ already recorded the result from a previous pass. */
++ if (loc->replaced)
++ *curr = loc->dw_loc_next;
++ else if (!loc->resolved_addr)
+ {
+- if (!resolve_addr_in_expr ((*curr)->expr))
++ /* As things stand, we do not expect or allow one die to
++ reference a suffix of another die's location list chain.
++ References must be identical or completely separate.
++ There is therefore no need to cache the result of this
++ pass on any list other than the first; doing so
++ would lead to unnecessary writes. */
++ while (*curr)
+ {
+- dw_loc_list_ref next = (*curr)->dw_loc_next;
+- if (next && (*curr)->ll_symbol)
++ gcc_assert (!(*curr)->replaced && !(*curr)->resolved_addr);
++ if (!resolve_addr_in_expr ((*curr)->expr))
+ {
+- gcc_assert (!next->ll_symbol);
+- next->ll_symbol = (*curr)->ll_symbol;
++ dw_loc_list_ref next = (*curr)->dw_loc_next;
++ if (next && (*curr)->ll_symbol)
++ {
++ gcc_assert (!next->ll_symbol);
++ next->ll_symbol = (*curr)->ll_symbol;
++ }
++ *curr = next;
+ }
+- *curr = next;
++ else
++ curr = &(*curr)->dw_loc_next;
+ }
++ if (loc == *start)
++ loc->resolved_addr = 1;
+ else
+- curr = &(*curr)->dw_loc_next;
++ {
++ loc->replaced = 1;
++ loc->dw_loc_next = *start;
++ }
+ }
+- if (!AT_loc_list (a))
++ if (!*start)
+ {
+ remove_AT (die, a->dw_attr);
+ ix--;
+@@ -23359,6 +23460,7 @@
+ add_location_or_const_value_attribute (
+ VEC_index (deferred_locations, deferred_locations_list, i)->die,
+ VEC_index (deferred_locations, deferred_locations_list, i)->variable,
++ false,
+ DW_AT_location);
}
-- BITMAP_FREE (tmp);
+
+Index: gcc/expr.c
+===================================================================
+--- gcc/expr.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/expr.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2180,6 +2180,111 @@
+ return tgtblk;
+ }
+
++/* Copy BLKmode value SRC into a register of mode MODE. Return the
++ register if it contains any data, otherwise return null.
+
-+ BITMAP_FREE (get_varinfo (from)->solution);
-+ BITMAP_FREE (get_varinfo (from)->oldsolution);
++ This is used on targets that return BLKmode values in registers. */
+
-+ if (stats.iterations > 0)
++rtx
++copy_blkmode_to_reg (enum machine_mode mode, tree src)
++{
++ int i, n_regs;
++ unsigned HOST_WIDE_INT bitpos, xbitpos, padding_correction = 0, bytes;
++ unsigned int bitsize;
++ rtx *dst_words, dst, x, src_word = NULL_RTX, dst_word = NULL_RTX;
++ enum machine_mode dst_mode;
++
++ gcc_assert (TYPE_MODE (TREE_TYPE (src)) == BLKmode);
++
++ x = expand_normal (src);
++
++ bytes = int_size_in_bytes (TREE_TYPE (src));
++ if (bytes == 0)
++ return NULL_RTX;
++
++ /* If the structure doesn't take up a whole number of words, see
++ whether the register value should be padded on the left or on
++ the right. Set PADDING_CORRECTION to the number of padding
++ bits needed on the left side.
++
++ In most ABIs, the structure will be returned at the least end of
++ the register, which translates to right padding on little-endian
++ targets and left padding on big-endian targets. The opposite
++ holds if the structure is returned at the most significant
++ end of the register. */
++ if (bytes % UNITS_PER_WORD != 0
++ && (targetm.calls.return_in_msb (TREE_TYPE (src))
++ ? !BYTES_BIG_ENDIAN
++ : BYTES_BIG_ENDIAN))
++ padding_correction = (BITS_PER_WORD - ((bytes % UNITS_PER_WORD)
++ * BITS_PER_UNIT));
++
++ n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
++ dst_words = XALLOCAVEC (rtx, n_regs);
++ bitsize = MIN (TYPE_ALIGN (TREE_TYPE (src)), BITS_PER_WORD);
++
++ /* Copy the structure BITSIZE bits at a time. */
++ for (bitpos = 0, xbitpos = padding_correction;
++ bitpos < bytes * BITS_PER_UNIT;
++ bitpos += bitsize, xbitpos += bitsize)
+ {
-+ BITMAP_FREE (get_varinfo (to)->oldsolution);
-+ get_varinfo (to)->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
++ /* We need a new destination pseudo each time xbitpos is
++ on a word boundary and when xbitpos == padding_correction
++ (the first time through). */
++ if (xbitpos % BITS_PER_WORD == 0
++ || xbitpos == padding_correction)
++ {
++ /* Generate an appropriate register. */
++ dst_word = gen_reg_rtx (word_mode);
++ dst_words[xbitpos / BITS_PER_WORD] = dst_word;
++
++ /* Clear the destination before we move anything into it. */
++ emit_move_insn (dst_word, CONST0_RTX (word_mode));
++ }
++
++ /* We need a new source operand each time bitpos is on a word
++ boundary. */
++ if (bitpos % BITS_PER_WORD == 0)
++ src_word = operand_subword_force (x, bitpos / BITS_PER_WORD, BLKmode);
++
++ /* Use bitpos for the source extraction (left justified) and
++ xbitpos for the destination store (right justified). */
++ store_bit_field (dst_word, bitsize, xbitpos % BITS_PER_WORD, word_mode,
++ extract_bit_field (src_word, bitsize,
++ bitpos % BITS_PER_WORD, 1, false,
++ NULL_RTX, word_mode, word_mode));
+ }
+
-+ if (valid_graph_edge (graph, to, to))
++ if (mode == BLKmode)
+ {
-+ if (graph->succs[to])
-+ bitmap_clear_bit (graph->succs[to], to);
++ /* Find the smallest integer mode large enough to hold the
++ entire structure. */
++ for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
++ mode != VOIDmode;
++ mode = GET_MODE_WIDER_MODE (mode))
++ /* Have we found a large enough mode? */
++ if (GET_MODE_SIZE (mode) >= bytes)
++ break;
++
++ /* A suitable mode should have been found. */
++ gcc_assert (mode != VOIDmode);
+ }
- }
-
--
- /* Information needed to compute the topological ordering of a graph. */
++
++ if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (word_mode))
++ dst_mode = word_mode;
++ else
++ dst_mode = mode;
++ dst = gen_reg_rtx (dst_mode);
++
++ for (i = 0; i < n_regs; i++)
++ emit_move_insn (operand_subword (dst, i, 0, dst_mode), dst_words[i]);
++
++ if (mode != dst_mode)
++ dst = gen_lowpart (mode, dst);
++
++ return dst;
++}
++
+ /* Add a USE expression for REG to the (possibly empty) list pointed
+ to by CALL_FUSAGE. REG must denote a hard register. */
+
+@@ -4382,7 +4487,9 @@
+ if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from)
+ && COMPLETE_TYPE_P (TREE_TYPE (from))
+ && TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST
+- && ! (((TREE_CODE (to) == VAR_DECL || TREE_CODE (to) == PARM_DECL)
++ && ! (((TREE_CODE (to) == VAR_DECL
++ || TREE_CODE (to) == PARM_DECL
++ || TREE_CODE (to) == RESULT_DECL)
+ && REG_P (DECL_RTL (to)))
+ || TREE_CODE (to) == SSA_NAME))
+ {
+@@ -4428,12 +4535,15 @@
+ rtx temp;
- struct topo_info
-@@ -1509,37 +1304,24 @@
- topo_visit (constraint_graph_t graph, struct topo_info *ti,
- unsigned int n)
- {
-- VEC(constraint_edge_t,heap) *succs = graph->succs[n];
-- bitmap temp;
- bitmap_iterator bi;
-- constraint_edge_t c;
-- int i;
- unsigned int j;
-
- SET_BIT (ti->visited, n);
-- if (VEC_length (constraint_edge_t, succs) != 0)
-- {
-- temp = BITMAP_ALLOC (&iteration_obstack);
-- if (graph->zero_weight_succs[n])
-- bitmap_ior_into (temp, graph->zero_weight_succs[n]);
-- for (i = 0; VEC_iterate (constraint_edge_t, succs, i, c); i++)
-- bitmap_set_bit (temp, c->dest);
-- }
-- else
-- temp = graph->zero_weight_succs[n];
+ push_temp_slots ();
+- temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL);
++ if (REG_P (to_rtx) && TYPE_MODE (TREE_TYPE (from)) == BLKmode)
++ temp = copy_blkmode_to_reg (GET_MODE (to_rtx), from);
++ else
++ temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL);
-- if (temp)
-- EXECUTE_IF_SET_IN_BITMAP (temp, 0, j, bi)
-+ if (graph->succs[n])
-+ EXECUTE_IF_SET_IN_BITMAP (graph->succs[n], 0, j, bi)
- {
- if (!TEST_BIT (ti->visited, j))
- topo_visit (graph, ti, j);
- }
-+
- VEC_safe_push (unsigned, heap, ti->topo_order, n);
- }
+ if (GET_CODE (to_rtx) == PARALLEL)
+ emit_group_load (to_rtx, temp, TREE_TYPE (from),
+ int_size_in_bytes (TREE_TYPE (from)));
+- else
++ else if (temp)
+ emit_move_insn (to_rtx, temp);
- /* Return true if variable N + OFFSET is a legal field of N. */
+ preserve_temp_slots (to_rtx);
+@@ -8533,10 +8643,15 @@
+ return temp;
+ }
--static bool
-+static bool
- type_safe (unsigned int n, unsigned HOST_WIDE_INT *offset)
- {
- varinfo_t ninfo = get_varinfo (n);
-@@ -1582,10 +1364,10 @@
- v = first_vi_for_offset (get_varinfo (j), fieldoffset);
- if (!v)
- continue;
-- t = v->node;
-+ t = find (v->id);
- sol = get_varinfo (t)->solution;
- if (!bitmap_bit_p (sol, rhs))
-- {
+- /* If the mode of DECL_RTL does not match that of the decl, it
+- must be a promoted value. We return a SUBREG of the wanted mode,
+- but mark it so that we know that it was already extended. */
+- if (REG_P (decl_rtl) && GET_MODE (decl_rtl) != DECL_MODE (exp))
++ /* If the mode of DECL_RTL does not match that of the decl,
++ there are two cases: we are dealing with a BLKmode value
++ that is returned in a register, or we are dealing with
++ a promoted value. In the latter case, return a SUBREG
++ of the wanted mode, but mark it so that we know that it
++ was already extended. */
++ if (REG_P (decl_rtl)
++ && DECL_MODE (exp) != BLKmode
++ && GET_MODE (decl_rtl) != DECL_MODE (exp))
+ {
+ enum machine_mode pmode;
+
+@@ -9189,8 +9304,16 @@
+ && modifier != EXPAND_CONST_ADDRESS
+ && modifier != EXPAND_INITIALIZER)
+ /* If the field is volatile, we always want an aligned
+- access. */
+- || (volatilep && flag_strict_volatile_bitfields > 0)
++ access. Do this in following two situations:
++ 1. the access is not already naturally
++ aligned, otherwise "normal" (non-bitfield) volatile fields
++ become non-addressable.
++ 2. the bitsize is narrower than the access size. Need
++ to extract bitfields from the access. */
++ || (volatilep && flag_strict_volatile_bitfields > 0
++ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0
++ || (mode1 != BLKmode
++ && bitsize < GET_MODE_SIZE (mode1) * BITS_PER_UNIT)))
+ /* If the field isn't aligned enough to fetch as a memref,
+ fetch it as a bit field. */
+ || (mode1 != BLKmode
+@@ -9486,10 +9609,32 @@
+ results. */
+ if (MEM_P (op0))
+ {
++ enum insn_code icode;
++
+ op0 = copy_rtx (op0);
+
+ if (TYPE_ALIGN_OK (type))
+ set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type)));
++ else if (mode != BLKmode
++ && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode)
++ /* If the target does have special handling for unaligned
++ loads of mode then use them. */
++ && ((icode = optab_handler (movmisalign_optab, mode))
++ != CODE_FOR_nothing))
+ {
- bitmap_set_bit (sol, rhs);
- if (!TEST_BIT (changed, t))
- {
-@@ -1596,7 +1378,7 @@
- }
- else if (0 && dump_file && !(get_varinfo (j)->is_special_var))
- fprintf (dump_file, "Untypesafe usage in do_da_constraint.\n");
--
-+
- }
- }
++ rtx reg, insn;
++
++ op0 = adjust_address (op0, mode, 0);
++ /* We've already validated the memory, and we're creating a
++ new pseudo destination. The predicates really can't
++ fail. */
++ reg = gen_reg_rtx (mode);
++
++ /* Nor can the insn generator. */
++ insn = GEN_FCN (icode) (reg, op0);
++ emit_insn (insn);
++ return reg;
++ }
+ else if (STRICT_ALIGNMENT
+ && mode != BLKmode
+ && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode))
+Index: gcc/expr.h
+===================================================================
+--- gcc/expr.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/expr.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -324,6 +324,8 @@
+ /* Copy BLKmode object from a set of registers. */
+ extern rtx copy_blkmode_from_reg (rtx, rtx, tree);
+
++extern rtx copy_blkmode_to_reg (enum machine_mode, tree);
++
+ /* Mark REG as holding a parameter for the next CALL_INSN. */
+ extern void use_reg (rtx *, rtx);
+
+Index: gcc/recog.c
+===================================================================
+--- gcc/recog.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/recog.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3023,6 +3023,7 @@
+ static int search_ofs;
+ enum reg_class cl;
+ HARD_REG_SET live;
++ df_ref *def_rec;
+ int i;
-@@ -1607,7 +1389,7 @@
- do_sd_constraint (constraint_graph_t graph, constraint_t c,
- bitmap delta)
- {
-- unsigned int lhs = get_varinfo (c->lhs.var)->node;
-+ unsigned int lhs = find (c->lhs.var);
- bool flag = false;
- bitmap sol = get_varinfo (lhs)->solution;
- unsigned int j;
-@@ -1620,7 +1402,7 @@
- bitmap_set_bit (sol, anything_id);
- goto done;
- }
-- /* For each variable j in delta (Sol(y)), add
-+ /* For each variable j in delta (Sol(y)), add
- an edge in the graph from j to x, and union Sol(j) into Sol(x). */
- EXECUTE_IF_SET_IN_BITMAP (delta, 0, j, bi)
+ gcc_assert (from < MAX_INSNS_PER_PEEP2 + 1);
+@@ -3036,12 +3037,14 @@
+
+ while (from != to)
{
-@@ -1634,18 +1416,18 @@
- v = first_vi_for_offset (get_varinfo (j), fieldoffset);
- if (!v)
- continue;
-- t = v->node;
-+ t = find (v->id);
-
- /* Adding edges from the special vars is pointless.
- They don't have sets that can change. */
- if (get_varinfo (t) ->is_special_var)
- flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
-- else if (int_add_graph_edge (graph, lhs, t, 0))
-+ else if (add_graph_edge (graph, lhs, t))
- flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
- }
- else if (0 && dump_file && !(get_varinfo (j)->is_special_var))
- fprintf (dump_file, "Untypesafe usage in do_sd_constraint\n");
--
-+
+- HARD_REG_SET this_live;
++ gcc_assert (peep2_insn_data[from].insn != NULL_RTX);
+
++ /* Don't use registers set or clobbered by the insn. */
++ for (def_rec = DF_INSN_DEFS (peep2_insn_data[from].insn);
++ *def_rec; def_rec++)
++ SET_HARD_REG_BIT (live, DF_REF_REGNO (*def_rec));
++
+ from = peep2_buf_position (from + 1);
+- gcc_assert (peep2_insn_data[from].insn != NULL_RTX);
+- REG_SET_TO_HARD_REG_SET (this_live, peep2_insn_data[from].live_before);
+- IOR_HARD_REG_SET (live, this_live);
}
- done:
-@@ -1658,15 +1440,15 @@
- SET_BIT (changed, lhs);
- changed_count++;
- }
-- }
-+ }
- }
+ cl = (class_str[0] == 'r' ? GENERAL_REGS
+Index: gcc/ada/mlib-tgt-specific-darwin.adb
+===================================================================
+--- gcc/ada/mlib-tgt-specific-darwin.adb (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/mlib-tgt-specific-darwin.adb (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -36,8 +36,6 @@
- /* Process a constraint C that represents *x = y. */
+ -- Non default subprograms
- static void
--do_ds_constraint (constraint_graph_t graph, constraint_t c, bitmap delta)
-+do_ds_constraint (constraint_t c, bitmap delta)
- {
-- unsigned int rhs = get_varinfo (c->rhs.var)->node;
-+ unsigned int rhs = find (c->rhs.var);
- unsigned HOST_WIDE_INT roff = c->rhs.offset;
- bitmap sol = get_varinfo (rhs)->solution;
- unsigned int j;
-@@ -1685,8 +1467,8 @@
- v = first_vi_for_offset (get_varinfo (j), fieldoffset);
- if (!v)
- continue;
-- t = v->node;
--
-+ t = find (v->id);
-+
- if (!bitmap_bit_p (get_varinfo (t)->solution, anything_id))
- {
- bitmap_set_bit (get_varinfo (t)->solution, anything_id);
-@@ -1705,40 +1487,39 @@
- EXECUTE_IF_SET_IN_BITMAP (delta, 0, j, bi)
- {
- unsigned HOST_WIDE_INT loff = c->lhs.offset;
-- if (type_safe (j, &loff) && !(get_varinfo(j)->is_special_var))
-+ if (type_safe (j, &loff) && !(get_varinfo (j)->is_special_var))
- {
- varinfo_t v;
- unsigned int t;
- unsigned HOST_WIDE_INT fieldoffset = get_varinfo (j)->offset + loff;
-+ bitmap tmp;
-
- v = first_vi_for_offset (get_varinfo (j), fieldoffset);
- if (!v)
- continue;
-- t = v->node;
-- if (int_add_graph_edge (graph, t, rhs, roff))
-+ t = find (v->id);
-+ tmp = get_varinfo (t)->solution;
-+
-+ if (set_union_with_increment (tmp, sol, roff))
- {
-- bitmap tmp = get_varinfo (t)->solution;
-- if (set_union_with_increment (tmp, sol, roff))
-+ get_varinfo (t)->solution = tmp;
-+ if (t == rhs)
-+ sol = get_varinfo (rhs)->solution;
-+ if (!TEST_BIT (changed, t))
- {
-- get_varinfo (t)->solution = tmp;
-- if (t == rhs)
-- sol = get_varinfo (rhs)->solution;
-- if (!TEST_BIT (changed, t))
-- {
-- SET_BIT (changed, t);
-- changed_count++;
-- }
-+ SET_BIT (changed, t);
-+ changed_count++;
- }
- }
-- }
-+ }
- else if (0 && dump_file && !(get_varinfo (j)->is_special_var))
- fprintf (dump_file, "Untypesafe usage in do_ds_constraint\n");
- }
+- function Archive_Indexer_Options return String_List_Access;
+-
+ procedure Build_Dynamic_Library
+ (Ofiles : Argument_List;
+ Options : Argument_List;
+@@ -67,15 +65,6 @@
+ (1 => Flat_Namespace'Access,
+ 2 => Shared_Libgcc'Access);
+
+- -----------------------------
+- -- Archive_Indexer_Options --
+- -----------------------------
+-
+- function Archive_Indexer_Options return String_List_Access is
+- begin
+- return new String_List'(1 => new String'("-c"));
+- end Archive_Indexer_Options;
+-
+ ---------------------------
+ -- Build_Dynamic_Library --
+ ---------------------------
+@@ -180,7 +169,6 @@
+ end Is_Archive_Ext;
+
+ begin
+- Archive_Indexer_Options_Ptr := Archive_Indexer_Options'Access;
+ Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access;
+ DLL_Ext_Ptr := DLL_Ext'Access;
+ Dynamic_Option_Ptr := Dynamic_Option'Access;
+Index: gcc/ada/init.c
+===================================================================
+--- gcc/ada/init.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/init.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2216,12 +2216,33 @@
+ return 0;
}
--/* Handle a non-simple (simple meaning requires no iteration), non-copy
-- constraint (IE *x = &y, x = *y, and *x = y). */
--
-+/* Handle a non-simple (simple meaning requires no iteration),
-+ constraint (IE *x = &y, x = *y, *x = y, and x = y with offsets involved). */
++#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
++
++void
++__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
++ void *ucontext ATTRIBUTE_UNUSED)
++{
++#if defined (__x86_64__)
++ /* Work around radar #10302855/pr50678, where the unwinders (libunwind or
++ libgcc_s depending on the system revision) and the DWARF unwind data for
++ the sigtramp have different ideas about register numbering (causing rbx
++ and rdx to be transposed).. */
++ ucontext_t *uc = (ucontext_t *)ucontext ;
++ unsigned long t = uc->uc_mcontext->__ss.__rbx;
++
++ uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
++ uc->uc_mcontext->__ss.__rdx = t;
++#endif
++}
+
static void
- do_complex_constraint (constraint_graph_t graph, constraint_t c, bitmap delta)
+-__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED)
++__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
{
-@@ -1752,33 +1533,62 @@
- else
- {
- /* *x = y */
-- do_ds_constraint (graph, c, delta);
-+ do_ds_constraint (c, delta);
- }
- }
-- else
-+ else if (c->rhs.type == DEREF)
+ struct Exception_Data *exception;
+ const char *msg;
+
++ __gnat_adjust_context_for_raise (sig, ucontext);
++
+ switch (sig)
{
- /* x = *y */
- if (!(get_varinfo (c->lhs.var)->is_special_var))
- do_sd_constraint (graph, c, delta);
- }
-+ else
-+ {
-+ bitmap tmp;
-+ bitmap solution;
-+ bool flag = false;
-+ unsigned int t;
+ case SIGSEGV:
+Index: gcc/ada/ChangeLog
+===================================================================
+--- gcc/ada/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,56 @@
++2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
-+ gcc_assert (c->rhs.type == SCALAR && c->lhs.type == SCALAR);
-+ t = find (c->rhs.var);
-+ solution = get_varinfo (t)->solution;
-+ t = find (c->lhs.var);
-+ tmp = get_varinfo (t)->solution;
++ PR ada/46192
++ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
++ renaming, preserve the volatileness through the indirection, if any.
+
-+ flag = set_union_with_increment (tmp, solution, c->rhs.offset);
++2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
+
-+ if (flag)
-+ {
-+ get_varinfo (t)->solution = tmp;
-+ if (!TEST_BIT (changed, t))
-+ {
-+ SET_BIT (changed, t);
-+ changed_count++;
-+ }
-+ }
-+ }
- }
-
- /* Initialize and return a new SCC info structure. */
-
- static struct scc_info *
--init_scc_info (void)
-+init_scc_info (size_t size)
++ * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
++
++2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gnatvsn.ads (Current_Year): Bump to 2011.
++
++2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
++
++ PR tree-optimization/51315
++ Backport from mainline
++ 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
++
++ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
++ the alignment if this doesn't prevent BLKmode access to the object.
++
++2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
++
++ Backport from mainline r181474
++ PR target/50678
++ * init.c (__gnat_error_handler) [Darwin]: Move work-around to the
++ bug filed as radar #10302855 from __gnat_error_handler ...
++ ... to (__gnat_adjust_context_for_raise) [Darwin]: New.
++ (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
++ (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise.
++
++2011-11-18 Tristan Gingold <gingold@adacore.com>
++ Iain Sandoe <iains@gcc.gnu.org>
++
++ PR target/49992
++ * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
++ * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing
++ for Darwin.
++
++2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
++
++ Backport from mainline r181319
++ * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
++ s-oscons.ads.
++ (OSCONS_CPP, OSCONS_EXTRACT): New.
++ (./bldtools/oscons/xoscons): New Target.
++ ($(RTSDIR)/s-oscons.ads): New Target.
++ (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
++ * Make-generated.in: Remove machinery to generate xoscons and
++ ada/s-oscons.ads.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: gcc/ada/gnatvsn.ads
+===================================================================
+--- gcc/ada/gnatvsn.ads (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/gnatvsn.ads (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6,7 +6,7 @@
+ -- --
+ -- S p e c --
+ -- --
+--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
++-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+ -- --
+ -- GNAT is free software; you can redistribute it and/or modify it under --
+ -- terms of the GNU General Public License as published by the Free Soft- --
+@@ -92,7 +92,7 @@
+ Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version;
+ -- Version string stored in e.g. ALI files
+
+- Current_Year : constant String := "2010";
++ Current_Year : constant String := "2011";
+ -- Used in printing copyright messages
+
+ end Gnatvsn;
+Index: gcc/ada/gcc-interface/Makefile.in
+===================================================================
+--- gcc/ada/gcc-interface/Makefile.in (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/gcc-interface/Makefile.in (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2189,7 +2189,6 @@
+
+ EH_MECHANISM=-gcc
+ GNATLIB_SHARED = gnatlib-shared-darwin
+- RANLIB = ranlib -c
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ soext = .dylib
+@@ -2447,21 +2446,52 @@
+ $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
+ $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
+ $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
+-# Copy generated target dependent sources
+- $(RM) $(RTSDIR)/s-oscons.ads
+- (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
++# Copy tsystem.h
++ $(CP) $(srcdir)/tsystem.h $(RTSDIR)
+ $(RM) ../stamp-gnatlib-$(RTSDIR)
+ touch ../stamp-gnatlib1-$(RTSDIR)
+
+ # GNULLI End #############################################################
+
++ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
++OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
++ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
++
++OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
++ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
++ ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
++ ./s-oscons-tmplt.exe > s-oscons-tmplt.s
++
++else
++# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
++# for running it from $(RTSDIR)
++OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
++ | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
++OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
++ -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
++OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
++endif
++
++./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
++ -$(MKDIR) ./bldtools/oscons
++ $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
++ $(CP) $^ ./bldtools/oscons
++ (cd ./bldtools/oscons ; gnatmake -q xoscons)
++
++$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
++ $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
++ (cd $(RTSDIR) ; \
++ $(OSCONS_CPP) ; \
++ $(OSCONS_EXTRACT) ; \
++ ../bldtools/oscons/xoscons)
++
+ # Don't use semicolon separated shell commands that involve list expansions.
+ # The semicolon triggers a call to DCL on VMS and DCL can't handle command
+ # line lengths in excess of 256 characters.
+ # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
+ # is guaranteed to overflow the buffer.
+
+-gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
++gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
+ $(MAKE) -C $(RTSDIR) \
+ CC="`echo \"$(GCC_FOR_TARGET)\" \
+ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
+Index: gcc/ada/gcc-interface/decl.c
+===================================================================
+--- gcc/ada/gcc-interface/decl.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/gcc-interface/decl.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -808,16 +808,30 @@
+ && No (Address_Clause (gnat_entity))))
+ && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST)
+ {
+- /* No point in jumping through all the hoops needed in order
++ unsigned int size_cap, align_cap;
++
++ /* No point in promoting the alignment if this doesn't prevent
++ BLKmode access to the object, in particular block copy, as
++ this will for example disable the NRV optimization for it.
++ No point in jumping through all the hoops needed in order
+ to support BIGGEST_ALIGNMENT if we don't really have to.
+ So we cap to the smallest alignment that corresponds to
+ a known efficient memory access pattern of the target. */
+- unsigned int align_cap = Is_Atomic (gnat_entity)
+- ? BIGGEST_ALIGNMENT
+- : get_mode_alignment (ptr_mode);
++ if (Is_Atomic (gnat_entity))
++ {
++ size_cap = UINT_MAX;
++ align_cap = BIGGEST_ALIGNMENT;
++ }
++ else
++ {
++ size_cap = MAX_FIXED_MODE_SIZE;
++ align_cap = get_mode_alignment (ptr_mode);
++ }
+
+ if (!host_integerp (TYPE_SIZE (gnu_type), 1)
+- || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0)
++ || compare_tree_int (TYPE_SIZE (gnu_type), size_cap) > 0)
++ align = 0;
++ else if (compare_tree_int (TYPE_SIZE (gnu_type), align_cap) > 0)
+ align = align_cap;
+ else
+ align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1));
+@@ -1009,6 +1023,14 @@
+ entity is always accessed indirectly through it. */
+ else
+ {
++ /* We need to preserve the volatileness of the renamed
++ object through the indirection. */
++ if (TREE_THIS_VOLATILE (gnu_expr)
++ && !TYPE_VOLATILE (gnu_type))
++ gnu_type
++ = build_qualified_type (gnu_type,
++ (TYPE_QUALS (gnu_type)
++ | TYPE_QUAL_VOLATILE));
+ gnu_type = build_reference_type (gnu_type);
+ inner_const_flag = TREE_READONLY (gnu_expr);
+ const_flag = true;
+Index: gcc/ada/gcc-interface/trans.c
+===================================================================
+--- gcc/ada/gcc-interface/trans.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/gcc-interface/trans.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6,7 +6,7 @@
+ * *
+ * C Implementation File *
+ * *
+- * Copyright (C) 1992-2011, Free Software Foundation, Inc. *
++ * Copyright (C) 1992-2012, Free Software Foundation, Inc. *
+ * *
+ * GNAT is free software; you can redistribute it and/or modify it under *
+ * terms of the GNU General Public License as published by the Free Soft- *
+@@ -7409,7 +7409,7 @@
+ || DECL_ALIGN (TREE_OPERAND (gnu_expr, 1))
+ >= TYPE_ALIGN (TREE_TYPE (gnu_expr))))
+ /* The field of a padding record is always addressable. */
+- || TYPE_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0))))
++ || TYPE_IS_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0))))
+ && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
+
+ case ARRAY_REF: case ARRAY_RANGE_REF:
+Index: gcc/ada/Make-generated.in
+===================================================================
+--- gcc/ada/Make-generated.in (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ada/Make-generated.in (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -64,37 +64,6 @@
+ $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s
+ (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads )
+
+-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
+-OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
+- -DTARGET='""$(target)""' s-oscons-tmplt.c
+-
+-OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
+- -DTARGET='""$(target)""' s-oscons-tmplt.c ; \
+- ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
+- ./s-oscons-tmplt.exe > s-oscons-tmplt.s
+-
+-else
+-# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust
+-# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons
+-OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
+- | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'`
+-OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
+- -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
+-OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
+-endif
+-
+-$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
+- -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
+- $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
+- $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
+- (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \
+- $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
+- $(OSCONS_CPP) ; \
+- $(OSCONS_EXTRACT) ; \
+- ./xoscons ; \
+- $(RM) ../../s-oscons.ads ; \
+- $(CP) s-oscons.ads s-oscons.h ../../)
+-
+ $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
+ $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
+ $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
+Index: gcc/lto-streamer-in.c
+===================================================================
+--- gcc/lto-streamer-in.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto-streamer-in.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1366,9 +1366,9 @@
{
- struct scc_info *si = XNEW (struct scc_info);
-- size_t size = VEC_length (varinfo_t, varmap);
-+ size_t i;
-
- si->current_index = 0;
- si->visited = sbitmap_alloc (size);
- sbitmap_zero (si->visited);
-- si->in_component = sbitmap_alloc (size);
-- sbitmap_ones (si->in_component);
-- si->visited_index = XCNEWVEC (unsigned int, size + 1);
-+ si->roots = sbitmap_alloc (size);
-+ sbitmap_zero (si->roots);
-+ si->node_mapping = XNEWVEC (unsigned int, size);
-+ si->dfs = XCNEWVEC (unsigned int, size);
-+
-+ for (i = 0; i < size; i++)
-+ si->node_mapping[i] = i;
-+
- si->scc_stack = VEC_alloc (unsigned, heap, 1);
-- si->unification_queue = VEC_alloc (unsigned, heap, 1);
- return si;
+ const struct lto_function_header *header;
+ struct data_in *data_in;
+- int32_t cfg_offset;
+- int32_t main_offset;
+- int32_t string_offset;
++ int cfg_offset;
++ int main_offset;
++ int string_offset;
+ struct lto_input_block ib_cfg;
+ struct lto_input_block ib_main;
+
+Index: gcc/c-decl.c
+===================================================================
+--- gcc/c-decl.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-decl.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -721,7 +721,7 @@
+
+ complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
+
+- layout_decl (decl, 0);
++ relayout_decl (decl);
+ }
+ }
}
+@@ -1200,7 +1200,7 @@
+ DECL_CHAIN (p) = BLOCK_VARS (block);
+ BLOCK_VARS (block) = p;
+ }
+- else if (VAR_OR_FUNCTION_DECL_P (p))
++ else if (VAR_OR_FUNCTION_DECL_P (p) && scope != file_scope)
+ {
+ /* For block local externs add a special
+ DECL_EXTERNAL decl for debug info generation. */
+@@ -4261,7 +4261,7 @@
+ if (DECL_INITIAL (decl))
+ TREE_TYPE (DECL_INITIAL (decl)) = type;
+
+- layout_decl (decl, 0);
++ relayout_decl (decl);
+ }
-@@ -1786,209 +1596,430 @@
-
- static void
- free_scc_info (struct scc_info *si)
--{
-+{
- sbitmap_free (si->visited);
-- sbitmap_free (si->in_component);
-- free (si->visited_index);
-+ sbitmap_free (si->roots);
-+ free (si->node_mapping);
-+ free (si->dfs);
- VEC_free (unsigned, heap, si->scc_stack);
-- VEC_free (unsigned, heap, si->unification_queue);
-- free(si);
-+ free (si);
+ if (TREE_CODE (decl) == VAR_DECL)
+@@ -9782,6 +9782,9 @@
+ collect_source_ref (LOCATION_FILE (decl_sloc (decl, false)));
}
-
--/* Find cycles in GRAPH that occur, using strongly connected components, and
-- collapse the cycles into a single representative node. if UPDATE_CHANGED
-- is true, then update the changed sbitmap to note those nodes whose
-- solutions have changed as a result of collapsing. */
-+/* Find indirect cycles in GRAPH that occur, using strongly connected
-+ components, and note them in the indirect cycles map.
-
-+ This technique comes from Ben Hardekopf and Calvin Lin,
-+ "It Pays to be Lazy: Fast and Accurate Pointer Analysis for Millions of
-+ Lines of Code", submitted to PLDI 2007. */
++/* Preserve the external declarations scope across a garbage collect. */
++static GTY(()) tree ext_block;
+
+ /* Collect all references relevant to SOURCE_FILE. */
+
static void
--find_and_collapse_graph_cycles (constraint_graph_t graph, bool update_changed)
-+find_indirect_cycles (constraint_graph_t graph)
- {
- unsigned int i;
-- unsigned int size = VEC_length (varinfo_t, varmap);
-- struct scc_info *si = init_scc_info ();
-+ unsigned int size = graph->size;
-+ struct scc_info *si = init_scc_info (size);
-
-- for (i = 0; i != size; ++i)
-- if (!TEST_BIT (si->visited, i) && get_varinfo (i)->node == i)
-+ for (i = 0; i < MIN (LAST_REF_NODE, size); i ++ )
-+ if (!TEST_BIT (si->visited, i) && find (i) == i)
- scc_visit (graph, si, i);
--
-- process_unification_queue (graph, si, update_changed);
+@@ -9792,6 +9795,8 @@
+
+ FOR_EACH_VEC_ELT (tree, all_translation_units, i, t)
+ collect_ada_nodes (BLOCK_VARS (DECL_INITIAL (t)), source_file);
+
- free_scc_info (si);
++ collect_ada_nodes (BLOCK_VARS (ext_block), source_file);
}
- /* Compute a topological ordering for GRAPH, and store the result in the
- topo_info structure TI. */
-
--static void
-+static void
- compute_topo_order (constraint_graph_t graph,
- struct topo_info *ti)
- {
- unsigned int i;
- unsigned int size = VEC_length (varinfo_t, varmap);
--
+ /* Iterate over all global declarations and call CALLBACK. */
+@@ -9810,11 +9815,11 @@
+ for (decl = BLOCK_VARS (decls); decl; decl = TREE_CHAIN (decl))
+ callback (decl);
+ }
+
- for (i = 0; i != size; ++i)
-- if (!TEST_BIT (ti->visited, i) && get_varinfo (i)->node == i)
-+ if (!TEST_BIT (ti->visited, i) && find (i) == i)
- topo_visit (graph, ti, i);
++ for (decl = BLOCK_VARS (ext_block); decl; decl = TREE_CHAIN (decl))
++ callback (decl);
}
--/* Return true if bitmap B is empty, or a bitmap other than bit 0 is set. */
-+/* Perform offline variable substitution.
-
--static bool
--bitmap_other_than_zero_bit_set (bitmap b)
--{
-- unsigned int i;
-- bitmap_iterator bi;
--
-- if (bitmap_empty_p (b))
-- return false;
-- EXECUTE_IF_SET_IN_BITMAP (b, 1, i, bi)
-- return true;
-- return false;
--}
+-/* Preserve the external declarations scope across a garbage collect. */
+-static GTY(()) tree ext_block;
-
--/* Perform offline variable substitution.
--
- This is a linear time way of identifying variables that must have
- equivalent points-to sets, including those caused by static cycles,
- and single entry subgraphs, in the constraint graph.
-
- The technique is described in "Off-line variable substitution for
- scaling points-to analysis" by Atanas Rountev and Satish Chandra,
-- in "ACM SIGPLAN Notices" volume 35, number 5, pages 47-56. */
-+ in "ACM SIGPLAN Notices" volume 35, number 5, pages 47-56.
-
-+ There is an optimal way to do this involving hash based value
-+ numbering, once the technique is published i will implement it
-+ here.
-+
-+ The general method of finding equivalence classes is as follows:
-+ Add fake nodes (REF nodes) and edges for *a = b and a = *b constraints.
-+ Add fake nodes (ADDRESS nodes) and edges for a = &b constraints.
-+ Initialize all non-REF/ADDRESS nodes to be direct nodes
-+ For each SCC in the predecessor graph:
-+ for each member (x) of the SCC
-+ if x is not a direct node:
-+ set rootnode(SCC) to be not a direct node
-+ collapse node x into rootnode(SCC).
-+ if rootnode(SCC) is not a direct node:
-+ label rootnode(SCC) with a new equivalence class
-+ else:
-+ if all labeled predecessors of rootnode(SCC) have the same
-+ label:
-+ label rootnode(SCC) with this label
-+ else:
-+ label rootnode(SCC) with a new equivalence class
-+
-+ All direct nodes with the same equivalence class can be replaced
-+ with a single representative node.
-+ All unlabeled nodes (label == 0) are not pointers and all edges
-+ involving them can be eliminated.
-+ We perform these optimizations during move_complex_constraints.
-+*/
-+
-+static int equivalence_class;
-+
-+/* Recursive routine to find strongly connected components in GRAPH,
-+ and label it's nodes with equivalence classes.
-+ This is used during variable substitution to find cycles involving
-+ the regular or implicit predecessors, and label them as equivalent.
-+ The SCC finding algorithm used is the same as that for scc_visit. */
-+
- static void
--perform_var_substitution (constraint_graph_t graph)
-+label_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
+ void
+ c_write_global_declarations (void)
{
-- struct topo_info *ti = init_topo_info ();
--
-- bitmap_obstack_initialize (&iteration_obstack);
-- /* Compute the topological ordering of the graph, then visit each
-- node in topological order. */
-- compute_topo_order (graph, ti);
--
-- while (VEC_length (unsigned, ti->topo_order) != 0)
-+ unsigned int i;
-+ bitmap_iterator bi;
-+ unsigned int my_dfs;
-+
-+ gcc_assert (si->node_mapping[n] == n);
-+ SET_BIT (si->visited, n);
-+ si->dfs[n] = si->current_index ++;
-+ my_dfs = si->dfs[n];
+Index: gcc/fortran/interface.c
+===================================================================
+--- gcc/fortran/interface.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/interface.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1535,7 +1535,7 @@
+ return 0;
+ }
+
+- /* F2003, 12.5.2.5. */
++ /* F2008, 12.5.2.5. */
+ if (formal->ts.type == BT_CLASS
+ && (CLASS_DATA (formal)->attr.class_pointer
+ || CLASS_DATA (formal)->attr.allocatable))
+@@ -1547,8 +1547,8 @@
+ formal->name, &actual->where);
+ return 0;
+ }
+- if (CLASS_DATA (actual)->ts.u.derived
+- != CLASS_DATA (formal)->ts.u.derived)
++ if (!gfc_compare_derived_types (CLASS_DATA (actual)->ts.u.derived,
++ CLASS_DATA (formal)->ts.u.derived))
+ {
+ if (where)
+ gfc_error ("Actual argument to '%s' at %L must have the same "
+Index: gcc/fortran/trans-expr.c
+===================================================================
+--- gcc/fortran/trans-expr.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/trans-expr.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3064,7 +3064,8 @@
+ || (fsym->attr.proc_pointer
+ && e->expr_type == EXPR_VARIABLE
+ && gfc_is_proc_ptr_comp (e, NULL))
+- || fsym->attr.allocatable))
++ || (fsym->attr.allocatable
++ && fsym->attr.flavor != FL_PROCEDURE)))
+ {
+ /* Scalar pointer dummy args require an extra level of
+ indirection. The null pointer already contains
+Index: gcc/fortran/trans-array.c
+===================================================================
+--- gcc/fortran/trans-array.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/trans-array.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6772,8 +6772,17 @@
+ gfc_array_index_type, cond,
+ lbound, gfc_index_one_node);
+ }
+- else if (expr->expr_type == EXPR_VARIABLE)
+
-+ /* Visit all the successors. */
-+ EXECUTE_IF_IN_NONNULL_BITMAP (graph->preds[n], 0, i, bi)
++ if (expr->expr_type == EXPR_FUNCTION)
{
-- unsigned int i = VEC_pop (unsigned, ti->topo_order);
-- unsigned int pred;
-- varinfo_t vi = get_varinfo (i);
-- bool okay_to_elim = false;
-- unsigned int root = VEC_length (varinfo_t, varmap);
-- VEC(constraint_edge_t,heap) *predvec = graph->preds[i];
-- constraint_edge_t ce = NULL;
-- bitmap tmp;
-- unsigned int k;
-- bitmap_iterator bi;
-+ unsigned int w = si->node_mapping[i];
-
-- /* We can't eliminate things whose address is taken, or which is
-- the target of a dereference. */
-- if (vi->address_taken || vi->indirect_target)
-+ if (TEST_BIT (si->roots, w))
- continue;
-
-- /* See if all predecessors of I are ripe for elimination */
-- EXECUTE_IF_IN_NONNULL_BITMAP (graph->zero_weight_preds[i], 0, k, bi)
-- {
-- unsigned int w;
-- w = get_varinfo (k)->node;
-+ if (!TEST_BIT (si->visited, w))
-+ label_visit (graph, si, w);
-+ {
-+ unsigned int t = si->node_mapping[w];
-+ unsigned int nnode = si->node_mapping[n];
-+ gcc_assert (nnode == n);
-
-- /* We can't eliminate the node if one of the predecessors is
-- part of a different strongly connected component. */
-- if (!okay_to_elim)
-- {
-- root = w;
-- okay_to_elim = true;
-- }
-- else if (w != root)
-- {
-- okay_to_elim = false;
-- break;
-- }
-+ if (si->dfs[t] < si->dfs[nnode])
-+ si->dfs[n] = si->dfs[t];
-+ }
-+ }
-
-- /* Theorem 4 in Rountev and Chandra: If i is a direct node,
-- then Solution(i) is a subset of Solution (w), where w is a
-- predecessor in the graph.
-- Corollary: If all predecessors of i have the same
-- points-to set, then i has that same points-to set as
-- those predecessors. */
-- tmp = BITMAP_ALLOC (NULL);
-- bitmap_and_compl (tmp, get_varinfo (i)->solution,
-- get_varinfo (w)->solution);
-- if (!bitmap_empty_p (tmp))
-- {
-- okay_to_elim = false;
-- BITMAP_FREE (tmp);
-- break;
-- }
-- BITMAP_FREE (tmp);
-- }
-+ /* Visit all the implicit predecessors. */
-+ EXECUTE_IF_IN_NONNULL_BITMAP (graph->implicit_preds[n], 0, i, bi)
-+ {
-+ unsigned int w = si->node_mapping[i];
-
-- if (okay_to_elim)
-- for (pred = 0;
-- VEC_iterate (constraint_edge_t, predvec, pred, ce);
-- pred++)
-- {
-- bitmap weight;
-- unsigned int w;
-- weight = *(get_graph_weights (graph, i, ce->dest));
-+ if (TEST_BIT (si->roots, w))
-+ continue;
-
-- /* We can't eliminate variables that have nonzero weighted
-- edges between them. */
-- if (weight && bitmap_other_than_zero_bit_set (weight))
-- {
-- okay_to_elim = false;
-- break;
-- }
-- w = get_varinfo (ce->dest)->node;
-+ if (!TEST_BIT (si->visited, w))
-+ label_visit (graph, si, w);
-+ {
-+ unsigned int t = si->node_mapping[w];
-+ unsigned int nnode = si->node_mapping[n];
-+ gcc_assert (nnode == n);
-
-- /* We can't eliminate the node if one of the predecessors is
-- part of a different strongly connected component. */
-- if (!okay_to_elim)
-- {
-- root = w;
-- okay_to_elim = true;
-- }
-- else if (w != root)
-- {
-- okay_to_elim = false;
-- break;
-- }
-+ if (si->dfs[t] < si->dfs[nnode])
-+ si->dfs[n] = si->dfs[t];
-+ }
++ /* A conversion function, so use the argument. */
++ gcc_assert (expr->value.function.isym
++ && expr->value.function.isym->conversion);
++ expr = expr->value.function.actual->expr;
+ }
-
-- /* Theorem 4 in Rountev and Chandra: If i is a direct node,
-- then Solution(i) is a subset of Solution (w), where w is a
-- predecessor in the graph.
-- Corollary: If all predecessors of i have the same
-- points-to set, then i has that same points-to set as
-- those predecessors. */
-- tmp = BITMAP_ALLOC (NULL);
-- bitmap_and_compl (tmp, get_varinfo (i)->solution,
-- get_varinfo (w)->solution);
-- if (!bitmap_empty_p (tmp))
-- {
-- okay_to_elim = false;
-- BITMAP_FREE (tmp);
-- break;
-- }
-- BITMAP_FREE (tmp);
-- }
-+ /* See if any components have been identified. */
-+ if (si->dfs[n] == my_dfs)
-+ {
-+ while (VEC_length (unsigned, si->scc_stack) != 0
-+ && si->dfs[VEC_last (unsigned, si->scc_stack)] >= my_dfs)
-+ {
-+ unsigned int w = VEC_pop (unsigned, si->scc_stack);
-+ si->node_mapping[w] = n;
-
-- /* See if the root is different than the original node.
-- If so, we've found an equivalence. */
-- if (root != get_varinfo (i)->node && okay_to_elim)
-+ if (!TEST_BIT (graph->direct_nodes, w))
-+ RESET_BIT (graph->direct_nodes, n);
-+ }
-+ SET_BIT (si->roots, n);
+
-+ if (!TEST_BIT (graph->direct_nodes, n))
++ if (expr->expr_type == EXPR_VARIABLE)
++ {
+ tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl);
+ for (ref = expr->ref; ref; ref = ref->next)
{
-- /* Found an equivalence */
-- get_varinfo (i)->node = root;
-- collapse_nodes (graph, root, i);
-+ graph->label[n] = equivalence_class++;
-+ }
-+ else
-+ {
-+ unsigned int size = 0;
-+ unsigned int firstlabel = ~0;
-+
-+ EXECUTE_IF_IN_NONNULL_BITMAP (graph->preds[n], 0, i, bi)
-+ {
-+ unsigned int j = si->node_mapping[i];
+@@ -6785,15 +6794,6 @@
+ }
+ return GFC_TYPE_ARRAY_LBOUND(tmp, dim);
+ }
+- else if (expr->expr_type == EXPR_FUNCTION)
+- {
+- /* A conversion function, so use the argument. */
+- expr = expr->value.function.actual->expr;
+- if (expr->expr_type != EXPR_VARIABLE)
+- return gfc_index_one_node;
+- desc = TREE_TYPE (expr->symtree->n.sym->backend_decl);
+- return get_std_lbound (expr, desc, dim, assumed_size);
+- }
+
+ return gfc_index_one_node;
+ }
+Index: gcc/fortran/ChangeLog
+===================================================================
+--- gcc/fortran/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,121 @@
++2012-01-28 Tobias Burnus <burnus@net-b.de>
+
-+ if (j == n || graph->label[j] == 0)
-+ continue;
++ PR fortran/52022
++ * trans-expr.c (gfc_conv_procedure_call): Fix passing
++ of functions, which return allocatables.
+
-+ if (firstlabel == (unsigned int)~0)
-+ {
-+ firstlabel = graph->label[j];
-+ size++;
-+ }
-+ else if (graph->label[j] != firstlabel)
-+ size++;
-+ }
++2012-01-25 Tobias Burnus <burnus@net-b.de>
+
-+ if (size == 0)
-+ graph->label[n] = 0;
-+ else if (size == 1)
-+ graph->label[n] = firstlabel;
-+ else
-+ graph->label[n] = equivalence_class++;
-+ }
-+ }
-+ else
-+ VEC_safe_push (unsigned, heap, si->scc_stack, n);
-+}
++ PR fortran/51966
++ * resolve.c (resolve_structure_cons): Only create an
++ array constructors for nonscalars.
+
-+/* Perform offline variable substitution, discovering equivalence
-+ classes, and eliminating non-pointer variables. */
++2012-01-24 Tobias Burnus <burnus@net-b.de>
+
-+static struct scc_info *
-+perform_var_substitution (constraint_graph_t graph)
-+{
-+ unsigned int i;
-+ unsigned int size = graph->size;
-+ struct scc_info *si = init_scc_info (size);
++ PR fortran/51948
++ * check.c (variable_check): Fix checking for
++ result variables and deeply nested BLOCKs.
+
-+ bitmap_obstack_initialize (&iteration_obstack);
-+ equivalence_class = 0;
++2012-01-21 Tobias Burnus <burnus@net-b.de>
+
-+ /* We only need to visit the non-address nodes for labeling
-+ purposes, as the address nodes will never have any predecessors,
-+ because &x never appears on the LHS of a constraint. */
-+ for (i = 0; i < LAST_REF_NODE; i++)
-+ if (!TEST_BIT (si->visited, si->node_mapping[i]))
-+ label_visit (graph, si, si->node_mapping[i]);
++ PR fortran/51913
++ * interface.c (compare_parameter): Fix CLASS comparison.
+
-+ if (dump_file && (dump_flags & TDF_DETAILS))
-+ for (i = 0; i < FIRST_REF_NODE; i++)
-+ {
-+ bool direct_node = TEST_BIT (graph->direct_nodes, i);
-+ fprintf (dump_file,
-+ "Equivalence class for %s node id %d:%s is %d\n",
-+ direct_node ? "Direct node" : "Indirect node", i,
-+ get_varinfo (i)->name,
-+ graph->label[si->node_mapping[i]]);
-+ }
++2012-01-19 Tobias Burnus <burnus@net-b.de>
+
-+ /* Quickly eliminate our non-pointer variables. */
++ PR fortran/51904
++ *expr.c (gfc_build_intrinsic_call): Also set the symtree.
+
-+ for (i = 0; i < FIRST_REF_NODE; i++)
-+ {
-+ unsigned int node = si->node_mapping[i];
++2012-01-14 Tobias Burnus <burnus@net-b.de>
+
-+ if (graph->label[node] == 0 && TEST_BIT (graph->direct_nodes, node))
-+ {
- if (dump_file && (dump_flags & TDF_DETAILS))
-- fprintf (dump_file, "Collapsing %s into %s\n",
-- get_varinfo (i)->name,
-- get_varinfo (root)->name);
-- stats.collapsed_vars++;
-+ fprintf (dump_file,
-+ "%s is a non-pointer variable, eliminating edges.\n",
-+ get_varinfo (node)->name);
-+ stats.nonpointer_vars++;
-+ clear_edges_for_node (graph, node);
- }
- }
-+ return si;
-+}
-
-+/* Free information that was only necessary for variable
-+ substitution. */
++ Backported from mainline
++ 2012-01-14 Tobias Burnus <burnus@net-b.de>
+
-+static void
-+free_var_substitution_info (struct scc_info *si)
-+{
-+ free_scc_info (si);
-+ free (graph->label);
-+ free (graph->eq_rep);
-+ sbitmap_free (graph->direct_nodes);
- bitmap_obstack_release (&iteration_obstack);
-- free_topo_info (ti);
- }
-
-+/* Return an existing node that is equivalent to NODE, which has
-+ equivalence class LABEL, if one exists. Return NODE otherwise. */
++ PR fortran/51800
++ * resolve.c (build_default_init_expr): Also initialize
++ nonconstant-length strings with -finit-character=<n>.
+
-+static unsigned int
-+find_equivalent_node (constraint_graph_t graph,
-+ unsigned int node, unsigned int label)
-+{
-+ /* If the address version of this variable is unused, we can
-+ substitute it for anything else with the same label.
-+ Otherwise, we know the pointers are equivalent, but not the
-+ locations. */
++2012-01-01 Thomas König <tkoenig@gcc.gnu.org>
+
-+ if (graph->label[FIRST_ADDR_NODE + node] == 0)
-+ {
-+ gcc_assert (label < graph->size);
++ Backport from trunk
++ PR fortran/51502
++ * expr.c (gfc_check_vardef_context): When determining
++ implicit pure status, also check for variable definition
++ context. Walk up namespaces until a procedure is
++ found to reset the implict pure attribute.
++ * resolve.c (gfc_implicit_pure): Walk up namespaces
++ until a procedure is found.
+
-+ if (graph->eq_rep[label] != -1)
-+ {
-+ /* Unify the two variables since we know they are equivalent. */
-+ if (unite (graph->eq_rep[label], node))
-+ unify_nodes (graph, graph->eq_rep[label], node, false);
-+ return graph->eq_rep[label];
-+ }
-+ else
-+ {
-+ graph->eq_rep[label] = node;
-+ }
-+ }
-+ return node;
-+}
++2011-12-22 Toon Moene <toon@moene.org>
+
-+/* Move complex constraints to the appropriate nodes, and collapse
-+ variables we've discovered are equivalent during variable
-+ substitution. SI is the SCC_INFO that is the result of
-+ perform_variable_substitution. */
++ PR fortran/51310
++ * resolve.c (build_default_init_expr): Allow non-allocatable,
++ non-compile-time-constant-shape arrays to have a default
++ initializer.
++ * invoke.texi: Delete the restriction on automatic arrays not
++ being initialized by -finit-<type>=<constant>.
+
-+static void
-+move_complex_constraints (constraint_graph_t graph,
-+ struct scc_info *si)
-+{
-+ int i;
-+ unsigned int j;
-+ constraint_t c;
++2011-12-15 Tobias Burnus <burnus@net-b.de>
+
-+ for (j = 0; j < graph->size; j++)
-+ gcc_assert (find (j) == j);
++ PR fortran/51550
++ PR fortran/47545
++ PR fortran/49050
++ PR fortran/51075
++ * resolve.c (resolve_fl_derived0): Print not-implemented error
++ for deferred-length character components.
+
-+ for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++)
-+ {
-+ struct constraint_expr lhs = c->lhs;
-+ struct constraint_expr rhs = c->rhs;
-+ unsigned int lhsvar = find (get_varinfo_fc (lhs.var)->id);
-+ unsigned int rhsvar = find (get_varinfo_fc (rhs.var)->id);
-+ unsigned int lhsnode, rhsnode;
-+ unsigned int lhslabel, rhslabel;
-+
-+ lhsnode = si->node_mapping[lhsvar];
-+ rhsnode = si->node_mapping[rhsvar];
-+ lhslabel = graph->label[lhsnode];
-+ rhslabel = graph->label[rhsnode];
-+
-+ /* See if it is really a non-pointer variable, and if so, ignore
-+ the constraint. */
-+ if (lhslabel == 0)
-+ {
-+ if (!TEST_BIT (graph->direct_nodes, lhsnode))
-+ lhslabel = graph->label[lhsnode] = equivalence_class++;
-+ else
-+ {
-+ if (dump_file && (dump_flags & TDF_DETAILS))
-+ {
++2011-12-11 Tobias Burnus <burnus@net-b.de>
+
-+ fprintf (dump_file, "%s is a non-pointer variable,"
-+ "ignoring constraint:",
-+ get_varinfo (lhs.var)->name);
-+ dump_constraint (dump_file, c);
-+ }
-+ VEC_replace (constraint_t, constraints, i, NULL);
-+ continue;
-+ }
-+ }
++ PR fortran/50923
++ * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
++ if the front end has printed a warning.
++ (gfc_generate_function_code): Fix unset-result warning.
+
-+ if (rhslabel == 0)
-+ {
-+ if (!TEST_BIT (graph->direct_nodes, rhsnode))
-+ rhslabel = graph->label[rhsnode] = equivalence_class++;
-+ else
-+ {
-+ if (dump_file && (dump_flags & TDF_DETAILS))
-+ {
++2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
-+ fprintf (dump_file, "%s is a non-pointer variable,"
-+ "ignoring constraint:",
-+ get_varinfo (rhs.var)->name);
-+ dump_constraint (dump_file, c);
-+ }
-+ VEC_replace (constraint_t, constraints, i, NULL);
-+ continue;
-+ }
-+ }
++ PR fortran/51338
++ Backport from trunk
++ * dependency.c (are_identical_variables): Handle case where
++ end fields of substring references are NULL.
+
-+ lhsvar = find_equivalent_node (graph, lhsvar, lhslabel);
-+ rhsvar = find_equivalent_node (graph, rhsvar, rhslabel);
-+ c->lhs.var = lhsvar;
-+ c->rhs.var = rhsvar;
++2011-12-08 Toon Moene <toon@moene.org>
+
-+ if (lhs.type == DEREF)
-+ {
-+ if (rhs.type == ADDRESSOF || rhsvar > anything_id)
-+ insert_into_complex (graph, lhsvar, c);
-+ }
-+ else if (rhs.type == DEREF)
-+ {
-+ if (!(get_varinfo (lhsvar)->is_special_var))
-+ insert_into_complex (graph, rhsvar, c);
-+ }
-+ else if (rhs.type != ADDRESSOF && lhsvar > anything_id
-+ && (lhs.offset != 0 || rhs.offset != 0))
-+ {
-+ insert_into_complex (graph, rhsvar, c);
-+ }
++ PR fortran/51310
++ * invoke.texi: Itemize the cases for which
++ -finit-<type>=<constant> doesn't work.
+
-+ }
-+}
++2011-12-08 Tobias Burnus <burnus@net-b.de>
+
-+/* Eliminate indirect cycles involving NODE. Return true if NODE was
-+ part of an SCC, false otherwise. */
++ PR fortran/51448
++ * fortran/trans-array.c (get_std_lbound): Fix handling of
++ conversion functions.
+
-+static bool
-+eliminate_indirect_cycles (unsigned int node)
-+{
-+ if (graph->indirect_cycles[node] != -1
-+ && !bitmap_empty_p (get_varinfo (node)->solution))
-+ {
-+ unsigned int i;
-+ VEC(unsigned,heap) *queue = NULL;
-+ int queuepos;
-+ unsigned int to = find (graph->indirect_cycles[node]);
-+ bitmap_iterator bi;
++2011-12-06 Tobias Burnus <burnus@net-b.de>
+
-+ /* We can't touch the solution set and call unify_nodes
-+ at the same time, because unify_nodes is going to do
-+ bitmap unions into it. */
++ PR fortran/51435
++ * expr.c (gfc_has_default_initializer): Fix handling of
++ DT with initialized pointer components.
+
-+ EXECUTE_IF_SET_IN_BITMAP (get_varinfo (node)->solution, 0, i, bi)
-+ {
-+ if (find (i) == i && i != to)
-+ {
-+ if (unite (to, i))
-+ VEC_safe_push (unsigned, heap, queue, i);
-+ }
-+ }
++2011-12-03 Tobias Burnus <burnus@net-b.de>
+
-+ for (queuepos = 0;
-+ VEC_iterate (unsigned, queue, queuepos, i);
-+ queuepos++)
-+ {
-+ unify_nodes (graph, to, i, true);
-+ }
-+ VEC_free (unsigned, heap, queue);
-+ return true;
-+ }
-+ return false;
-+}
++ PR fortran/50684
++ * check.c (variable_check): Fix intent(in) check.
+
- /* Solve the constraint graph GRAPH using our worklist solver.
- This is based on the PW* family of solvers from the "Efficient Field
- Sensitive Pointer Analysis for C" paper.
-@@ -2001,17 +2032,28 @@
- {
- unsigned int size = VEC_length (varinfo_t, varmap);
- unsigned int i;
-+ bitmap pts;
-
-- changed_count = size;
-+ changed_count = 0;
- changed = sbitmap_alloc (size);
-- sbitmap_ones (changed);
--
-- /* The already collapsed/unreachable nodes will never change, so we
-- need to account for them in changed_count. */
-+ sbitmap_zero (changed);
-+
-+ /* Mark all initial non-collapsed nodes as changed. */
- for (i = 0; i < size; i++)
-- if (get_varinfo (i)->node != i)
-- changed_count--;
--
-+ {
-+ varinfo_t ivi = get_varinfo (i);
-+ if (find (i) == i && !bitmap_empty_p (ivi->solution)
-+ && ((graph->succs[i] && !bitmap_empty_p (graph->succs[i]))
-+ || VEC_length (constraint_t, graph->complex[i]) > 0))
-+ {
-+ SET_BIT (changed, i);
-+ changed_count++;
-+ }
-+ }
++2011-11-25 Tobias Burnus <burnus@net-b.de>
+
-+ /* Allocate a bitmap to be used to store the changed bits. */
-+ pts = BITMAP_ALLOC (&pta_obstack);
++ PR fortran/50408
++ * trans-decl.c (gfc_get_module_backend_decl): Also copy
++ ts.u.derived from the gsym if the ts.type is BT_CLASS.
++ (gfc_get_extern_function_decl): Copy also the backend_decl
++ for the symbol's ts.u.{derived,cl} from the gsym.
++ * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
++ return if "from" and "to" are the same.
+
- while (changed_count > 0)
- {
- unsigned int i;
-@@ -2019,41 +2061,45 @@
- stats.iterations++;
-
- bitmap_obstack_initialize (&iteration_obstack);
--
-- if (edge_added)
-- {
-- /* We already did cycle elimination once, when we did
-- variable substitution, so we don't need it again for the
-- first iteration. */
-- if (stats.iterations > 1)
-- find_and_collapse_graph_cycles (graph, true);
++2011-11-24 Tobias Burnus <burnus@net-b.de>
++
++ PR fortran/51218
++ * gfortran.dg/implicit_pure_1.f90: New.
++
+ 2011-10-26 Release Manager
-- edge_added = false;
-- }
--
- compute_topo_order (graph, ti);
+ * GCC 4.6.2 released.
+Index: gcc/fortran/expr.c
+===================================================================
+--- gcc/fortran/expr.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/expr.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3679,6 +3679,8 @@
+ if (!c->attr.pointer
+ && gfc_has_default_initializer (c->ts.u.derived))
+ return true;
++ if (c->attr.pointer && c->initializer)
++ return true;
+ }
+ else
+ {
+@@ -3689,6 +3691,7 @@
+ return false;
+ }
- while (VEC_length (unsigned, ti->topo_order) != 0)
- {
+
- i = VEC_pop (unsigned, ti->topo_order);
-- gcc_assert (get_varinfo (i)->node == i);
+ /* Get an expression for a default initializer. */
-+ /* If this variable is not a representative, skip it. */
-+ if (find (i) != i)
-+ continue;
-+
-+ /* In certain indirect cycle cases, we may merge this
-+ variable to another. */
-+ if (eliminate_indirect_cycles (i) && find (i) != i)
-+ continue;
+ gfc_expr *
+@@ -4360,6 +4363,11 @@
+ result->value.function.name = name;
+ result->value.function.isym = isym;
+
++ result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
++ gcc_assert (result->symtree
++ && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
++ || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
+
- /* If the node has changed, we need to process the
- complex constraints and outgoing edges again. */
- if (TEST_BIT (changed, i))
- {
- unsigned int j;
- constraint_t c;
-- constraint_edge_t e = NULL;
- bitmap solution;
-- bitmap_iterator bi;
-- VEC(constraint_t,heap) *complex = get_varinfo (i)->complex;
-- VEC(constraint_edge_t,heap) *succs;
-+ VEC(constraint_t,heap) *complex = graph->complex[i];
- bool solution_empty;
-
- RESET_BIT (changed, i);
- changed_count--;
-
-+ /* Compute the changed set of solution bits. */
-+ bitmap_and_compl (pts, get_varinfo (i)->solution,
-+ get_varinfo (i)->oldsolution);
-+
-+ if (bitmap_empty_p (pts))
-+ continue;
-+
-+ bitmap_ior_into (get_varinfo (i)->oldsolution, pts);
-+
- solution = get_varinfo (i)->solution;
- solution_empty = bitmap_empty_p (solution);
-
-@@ -2065,52 +2111,38 @@
- is a constraint where the lhs side is receiving
- some set from elsewhere. */
- if (!solution_empty || c->lhs.type != DEREF)
-- do_complex_constraint (graph, c, solution);
-+ do_complex_constraint (graph, c, pts);
- }
+ va_start (ap, numarg);
+ atail = NULL;
+ for (i = 0; i < numarg; ++i)
+@@ -4520,9 +4528,24 @@
+ return FAILURE;
+ }
- solution_empty = bitmap_empty_p (solution);
+- if (!pointer && gfc_implicit_pure (NULL) && gfc_impure_variable (sym))
+- gfc_current_ns->proc_name->attr.implicit_pure = 0;
++ if (!pointer && context && gfc_implicit_pure (NULL)
++ && gfc_impure_variable (sym))
++ {
++ gfc_namespace *ns;
++ gfc_symbol *sym;
- if (!solution_empty)
- {
-+ bitmap_iterator bi;
-+
- /* Propagate solution to all successors. */
-- succs = graph->succs[i];
--
-- EXECUTE_IF_IN_NONNULL_BITMAP (graph->zero_weight_succs[i],
-+ EXECUTE_IF_IN_NONNULL_BITMAP (graph->succs[i],
- 0, j, bi)
- {
-- bitmap tmp = get_varinfo (j)->solution;
-- bool flag = false;
--
-- flag = set_union_with_increment (tmp, solution, 0);
--
-- if (flag)
-- {
-- get_varinfo (j)->solution = tmp;
-- if (!TEST_BIT (changed, j))
-- {
-- SET_BIT (changed, j);
-- changed_count++;
-- }
-- }
-- }
-- for (j = 0; VEC_iterate (constraint_edge_t, succs, j, e); j++)
-- {
-- bitmap tmp = get_varinfo (e->dest)->solution;
-- bool flag = false;
-- unsigned int k;
-- bitmap weights = e->weights;
-- bitmap_iterator bi;
-+ bitmap tmp;
-+ bool flag;
-
-- gcc_assert (weights && !bitmap_empty_p (weights));
-- EXECUTE_IF_SET_IN_BITMAP (weights, 0, k, bi)
-- flag |= set_union_with_increment (tmp, solution, k);
-+ unsigned int to = find (j);
-+ tmp = get_varinfo (to)->solution;
-+ flag = false;
-
-+ /* Don't try to propagate to ourselves. */
-+ if (to == i)
-+ continue;
-+
-+ flag = set_union_with_increment (tmp, pts, 0);
-+
- if (flag)
- {
-- get_varinfo (e->dest)->solution = tmp;
-- if (!TEST_BIT (changed, e->dest))
-+ get_varinfo (to)->solution = tmp;
-+ if (!TEST_BIT (changed, to))
- {
-- SET_BIT (changed, e->dest);
-+ SET_BIT (changed, to);
- changed_count++;
- }
- }
-@@ -2122,74 +2154,37 @@
- bitmap_obstack_release (&iteration_obstack);
++ for (ns = gfc_current_ns; ns; ns = ns->parent)
++ {
++ sym = ns->proc_name;
++ if (sym == NULL)
++ break;
++ if (sym->attr.flavor == FL_PROCEDURE)
++ {
++ sym->attr.implicit_pure = 0;
++ break;
++ }
++ }
++ }
+ /* Check variable definition context for associate-names. */
+ if (!pointer && sym->assoc)
+ {
+Index: gcc/fortran/invoke.texi
+===================================================================
+--- gcc/fortran/invoke.texi (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/invoke.texi (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1438,10 +1438,16 @@
+ the real and imaginary parts of local @code{COMPLEX} variables),
+ @option{-finit-logical=@var{<true|false>}}, and
+ @option{-finit-character=@var{n}} (where @var{n} is an ASCII character
+-value) options. These options do not initialize components of derived
+-type variables, nor do they initialize variables that appear in an
+-@code{EQUIVALENCE} statement. (This limitation may be removed in
+-future releases).
++value) options. These options do not initialize
++@itemize @bullet
++@item
++allocatable arrays
++@item
++components of derived type variables
++@item
++variables that appear in an @code{EQUIVALENCE} statement.
++@end itemize
++(These limitations may be removed in future releases).
+
+ Note that the @option{-finit-real=nan} option initializes @code{REAL}
+ and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
+Index: gcc/fortran/trans-types.c
+===================================================================
+--- gcc/fortran/trans-types.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/trans-types.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2092,6 +2092,9 @@
+ gfc_component *to_cm;
+ gfc_component *from_cm;
+
++ if (from == to)
++ return 1;
++
+ if (from->backend_decl == NULL
+ || !gfc_compare_derived_types (from, to))
+ return 0;
+Index: gcc/fortran/resolve.c
+===================================================================
+--- gcc/fortran/resolve.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/resolve.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1053,6 +1053,7 @@
+ && comp->ts.u.cl->length->expr_type == EXPR_CONSTANT
+ && cons->expr->ts.u.cl && cons->expr->ts.u.cl->length
+ && cons->expr->ts.u.cl->length->expr_type == EXPR_CONSTANT
++ && cons->expr->rank != 0
+ && mpz_cmp (cons->expr->ts.u.cl->length->value.integer,
+ comp->ts.u.cl->length->value.integer) != 0)
+ {
+@@ -3132,11 +3133,11 @@
+ "procedure within a PURE procedure", name, &expr->where);
+ t = FAILURE;
+ }
++
++ if (gfc_implicit_pure (NULL))
++ gfc_current_ns->proc_name->attr.implicit_pure = 0;
}
-+ BITMAP_FREE (pts);
- sbitmap_free (changed);
-+ bitmap_obstack_release (&oldpta_obstack);
+- if (!pure_function (expr, &name) && name && gfc_implicit_pure (NULL))
+- gfc_current_ns->proc_name->attr.implicit_pure = 0;
+-
+ /* Functions without the RECURSIVE attribution are not allowed to
+ * call themselves. */
+ if (expr->value.function.esym && !expr->value.function.esym->attr.recursive)
+@@ -3195,6 +3196,9 @@
+ else if (gfc_pure (NULL))
+ gfc_error ("Subroutine call to '%s' at %L is not PURE", sym->name,
+ &c->loc);
++
++ if (gfc_implicit_pure (NULL))
++ gfc_current_ns->proc_name->attr.implicit_pure = 0;
}
-+/* Map from trees to variable infos. */
-+static struct pointer_map_t *vi_for_tree;
--/* CONSTRAINT AND VARIABLE GENERATION FUNCTIONS */
-
--/* Map from trees to variable ids. */
--static htab_t id_for_tree;
-+/* Insert ID as the variable id for tree T in the vi_for_tree map. */
+@@ -9687,7 +9691,7 @@
+ int i;
--typedef struct tree_id
-+static void
-+insert_vi_for_tree (tree t, varinfo_t vi)
- {
-- tree t;
-- unsigned int id;
--} *tree_id_t;
--
--/* Hash a tree id structure. */
--
--static hashval_t
--tree_id_hash (const void *p)
--{
-- const tree_id_t ta = (tree_id_t) p;
-- return htab_hash_pointer (ta->t);
--}
--
--/* Return true if the tree in P1 and the tree in P2 are the same. */
--
--static int
--tree_id_eq (const void *p1, const void *p2)
--{
-- const tree_id_t ta1 = (tree_id_t) p1;
-- const tree_id_t ta2 = (tree_id_t) p2;
-- return ta1->t == ta2->t;
--}
--
--/* Insert ID as the variable id for tree T in the hashtable. */
--
--static void
--insert_id_for_tree (tree t, int id)
--{
-- void **slot;
-- struct tree_id finder;
-- tree_id_t new_pair;
--
-- finder.t = t;
-- slot = htab_find_slot (id_for_tree, &finder, INSERT);
-+ void **slot = pointer_map_insert (vi_for_tree, t);
-+ gcc_assert (vi);
- gcc_assert (*slot == NULL);
-- new_pair = XNEW (struct tree_id);
-- new_pair->t = t;
-- new_pair->id = id;
-- *slot = (void *)new_pair;
-+ *slot = vi;
- }
+ /* These symbols should never have a default initialization. */
+- if ((sym->attr.dimension && !gfc_is_compile_time_shape (sym->as))
++ if (sym->attr.allocatable
+ || sym->attr.external
+ || sym->attr.dummy
+ || sym->attr.pointer
+@@ -9811,6 +9815,26 @@
+ gfc_free_expr (init_expr);
+ init_expr = NULL;
+ }
++ if (!init_expr && gfc_option.flag_init_character == GFC_INIT_CHARACTER_ON
++ && sym->ts.u.cl->length)
++ {
++ gfc_actual_arglist *arg;
++ init_expr = gfc_get_expr ();
++ init_expr->where = sym->declared_at;
++ init_expr->ts = sym->ts;
++ init_expr->expr_type = EXPR_FUNCTION;
++ init_expr->value.function.isym =
++ gfc_intrinsic_function_by_id (GFC_ISYM_REPEAT);
++ init_expr->value.function.name = "repeat";
++ arg = gfc_get_actual_arglist ();
++ arg->expr = gfc_get_character_expr (sym->ts.kind, &sym->declared_at,
++ NULL, 1);
++ arg->expr->value.character.string[0]
++ = gfc_option.flag_init_character_value;
++ arg->next = gfc_get_actual_arglist ();
++ arg->next->expr = gfc_copy_expr (sym->ts.u.cl->length);
++ init_expr->value.function.actual = arg;
++ }
+ break;
+
+ default:
+@@ -9837,10 +9861,12 @@
+ if (init == NULL)
+ return;
--/* Find the variable id for tree T in ID_FOR_TREE. If T does not
-- exist in the hash table, return false, otherwise, return true and
-- set *ID to the id we found. */
-+/* Find the variable info for tree T in VI_FOR_TREE. If T does not
-+ exist in the map, return NULL, otherwise, return the varinfo we found. */
+- /* For saved variables, we don't want to add an initializer at
+- function entry, so we just add a static initializer. */
++ /* For saved variables, we don't want to add an initializer at function
++ entry, so we just add a static initializer. Note that automatic variables
++ are stack allocated even with -fno-automatic. */
+ if (sym->attr.save || sym->ns->save_all
+- || gfc_option.flag_max_stack_var_size == 0)
++ || (gfc_option.flag_max_stack_var_size == 0
++ && (!sym->attr.dimension || !is_non_constant_shape_array (sym))))
+ {
+ /* Don't clobber an existing initializer! */
+ gcc_assert (sym->value == NULL);
+@@ -11394,6 +11420,14 @@
--static bool
--lookup_id_for_tree (tree t, unsigned int *id)
-+static varinfo_t
-+lookup_vi_for_tree (tree t)
+ for (c = sym->components; c != NULL; c = c->next)
+ {
++ /* See PRs 51550, 47545, 48654, 49050, 51075 - and 45170. */
++ if (c->ts.type == BT_CHARACTER && c->ts.deferred)
++ {
++ gfc_error ("Deferred-length character component '%s' at %L is not "
++ "yet supported", c->name, &c->loc);
++ return FAILURE;
++ }
++
+ /* F2008, C442. */
+ if (c->attr.codimension /* FIXME: c->as check due to PR 43412. */
+ && (!c->attr.allocatable || (c->as && c->as->type != AS_DEFERRED)))
+@@ -12925,24 +12959,25 @@
+ int
+ gfc_implicit_pure (gfc_symbol *sym)
{
-- tree_id_t pair;
-- struct tree_id finder;
-+ void **slot = pointer_map_contains (vi_for_tree, t);
-+ if (slot == NULL)
-+ return NULL;
-
-- finder.t = t;
-- pair = htab_find (id_for_tree, &finder);
-- if (pair == NULL)
-- return false;
-- *id = pair->id;
-- return true;
-+ return (varinfo_t) *slot;
- }
-
- /* Return a printable name for DECL */
-@@ -2210,7 +2205,7 @@
+- symbol_attribute attr;
++ gfc_namespace *ns;
- if (TREE_CODE (decl) == SSA_NAME)
+ if (sym == NULL)
{
-- num_printed = asprintf (&temp, "%s_%u",
-+ num_printed = asprintf (&temp, "%s_%u",
- alias_get_name (SSA_NAME_VAR (decl)),
- SSA_NAME_VERSION (decl));
+- /* Check if the current namespace is implicit_pure. */
+- sym = gfc_current_ns->proc_name;
+- if (sym == NULL)
+- return 0;
+- attr = sym->attr;
+- if (attr.flavor == FL_PROCEDURE
+- && attr.implicit_pure && !attr.pure)
+- return 1;
+- return 0;
++ /* Check if the current procedure is implicit_pure. Walk up
++ the procedure list until we find a procedure. */
++ for (ns = gfc_current_ns; ns; ns = ns->parent)
++ {
++ sym = ns->proc_name;
++ if (sym == NULL)
++ return 0;
++
++ if (sym->attr.flavor == FL_PROCEDURE)
++ break;
++ }
}
-@@ -2226,21 +2221,17 @@
- return res;
- }
-
--/* Find the variable id for tree T in the hashtable.
-- If T doesn't exist in the hash table, create an entry for it. */
-+/* Find the variable id for tree T in the map.
-+ If T doesn't exist in the map, create an entry for it and return it. */
-
--static unsigned int
--get_id_for_tree (tree t)
-+static varinfo_t
-+get_vi_for_tree (tree t)
- {
-- tree_id_t pair;
-- struct tree_id finder;
-+ void **slot = pointer_map_contains (vi_for_tree, t);
-+ if (slot == NULL)
-+ return get_varinfo (create_variable_info_for (t, alias_get_name (t)));
-
-- finder.t = t;
-- pair = htab_find (id_for_tree, &finder);
-- if (pair == NULL)
-- return create_variable_info_for (t, alias_get_name (t));
--
-- return pair->id;
-+ return (varinfo_t) *slot;
+-
+- attr = sym->attr;
+-
+- return attr.flavor == FL_PROCEDURE && attr.implicit_pure && !attr.pure;
++
++ return sym->attr.flavor == FL_PROCEDURE && sym->attr.implicit_pure
++ && !sym->attr.pure;
}
- /* Get a constraint expression from an SSA_VAR_P node. */
-@@ -2254,14 +2245,14 @@
- /* For parameters, get at the points-to set for the actual parm
- decl. */
-- if (TREE_CODE (t) == SSA_NAME
-- && TREE_CODE (SSA_NAME_VAR (t)) == PARM_DECL
-+ if (TREE_CODE (t) == SSA_NAME
-+ && TREE_CODE (SSA_NAME_VAR (t)) == PARM_DECL
- && default_def (SSA_NAME_VAR (t)) == t)
- return get_constraint_exp_from_ssa_var (SSA_NAME_VAR (t));
+Index: gcc/fortran/trans-decl.c
+===================================================================
+--- gcc/fortran/trans-decl.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/trans-decl.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -677,7 +677,7 @@
+ }
+ else if (s->backend_decl)
+ {
+- if (sym->ts.type == BT_DERIVED)
++ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
+ gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
+ true);
+ else if (sym->ts.type == BT_CHARACTER)
+@@ -1602,6 +1602,11 @@
+ gfc_find_symbol (sym->name, gsym->ns, 0, &s);
+ if (s && s->backend_decl)
+ {
++ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
++ gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
++ true);
++ else if (sym->ts.type == BT_CHARACTER)
++ sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl;
+ sym->backend_decl = s->backend_decl;
+ return sym->backend_decl;
+ }
+@@ -4179,10 +4184,16 @@
+ "declared INTENT(OUT) but was not set and "
+ "does not have a default initializer",
+ sym->name, &sym->declared_at);
++ if (sym->backend_decl != NULL_TREE)
++ TREE_NO_WARNING(sym->backend_decl) = 1;
+ }
+ else if (gfc_option.warn_unused_dummy_argument)
+- gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
++ {
++ gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
+ &sym->declared_at);
++ if (sym->backend_decl != NULL_TREE)
++ TREE_NO_WARNING(sym->backend_decl) = 1;
++ }
+ }
- cexpr.type = SCALAR;
--
-- cexpr.var = get_id_for_tree (t);
-+
-+ cexpr.var = get_vi_for_tree (t)->id;
- /* If we determine the result is "anything", and we know this is readonly,
- say it points to readonly memory instead. */
- if (cexpr.var == anything_id && TREE_READONLY (t))
-@@ -2269,7 +2260,7 @@
- cexpr.type = ADDRESSOF;
- cexpr.var = readonly_id;
+ /* Warn for unused variables, but not if they're inside a common
+@@ -4227,11 +4238,6 @@
+ mark the symbol now, as well as in traverse_ns, to prevent
+ getting stuck in a circular dependency. */
+ sym->mark = 1;
+-
+- /* We do not want the middle-end to warn about unused parameters
+- as this was already done above. */
+- if (sym->attr.dummy && sym->backend_decl != NULL_TREE)
+- TREE_NO_WARNING(sym->backend_decl) = 1;
}
--
-+
- cexpr.offset = 0;
- return cexpr;
- }
-@@ -2290,7 +2281,13 @@
- get_varinfo (lhs.var)->directly_dereferenced = true;
- if (rhs.type == DEREF)
- get_varinfo (rhs.var)->directly_dereferenced = true;
--
-+
-+ if (!use_field_sensitive)
-+ {
-+ t->rhs.offset = 0;
-+ t->lhs.offset = 0;
-+ }
-+
- /* ANYTHING == ANYTHING is pointless. */
- if (lhs.var == anything_id && rhs.var == anything_id)
- return;
-@@ -2302,7 +2299,7 @@
- t->lhs = t->rhs;
- t->rhs = rhs;
- process_constraint (t);
-- }
-+ }
- /* This can happen in our IR with things like n->a = *p */
- else if (rhs.type == DEREF && lhs.type == DEREF && rhs.var != anything_id)
+ else if (sym->attr.flavor == FL_PARAMETER)
{
-@@ -2312,33 +2309,19 @@
- tree pointedtotype = TREE_TYPE (pointertype);
- tree tmpvar = create_tmp_var_raw (pointedtotype, "doubledereftmp");
- struct constraint_expr tmplhs = get_constraint_exp_from_ssa_var (tmpvar);
--
-+
- /* If this is an aggregate of known size, we should have passed
- this off to do_structure_copy, and it should have broken it
- up. */
-- gcc_assert (!AGGREGATE_TYPE_P (pointedtotype)
-+ gcc_assert (!AGGREGATE_TYPE_P (pointedtotype)
- || get_varinfo (rhs.var)->is_unknown_size_var);
--
-+
- process_constraint (new_constraint (tmplhs, rhs));
- process_constraint (new_constraint (lhs, tmplhs));
- }
-- else if (rhs.type == ADDRESSOF)
-- {
-- varinfo_t vi;
-- gcc_assert (rhs.offset == 0);
--
-- /* No need to mark address taken simply because of escaped vars
-- constraints. */
-- if (lhs.var != escaped_vars_id)
-- for (vi = get_varinfo (rhs.var); vi != NULL; vi = vi->next)
-- vi->address_taken = true;
+@@ -4846,11 +4852,11 @@
+ if (result == NULL_TREE)
+ {
+ /* TODO: move to the appropriate place in resolve.c. */
+- if (warn_return_type && !sym->attr.referenced && sym == sym->result)
++ if (warn_return_type && sym == sym->result)
+ gfc_warning ("Return value of function '%s' at %L not set",
+ sym->name, &sym->declared_at);
-
-- VEC_safe_push (constraint_t, heap, constraints, t);
-- }
- else
+- TREE_NO_WARNING(sym->backend_decl) = 1;
++ if (warn_return_type)
++ TREE_NO_WARNING(sym->backend_decl) = 1;
+ }
+ else
+ gfc_add_expr_to_block (&body, gfc_generate_return ());
+Index: gcc/fortran/check.c
+===================================================================
+--- gcc/fortran/check.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/check.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -485,23 +485,47 @@
+ && (gfc_current_intrinsic_arg[n]->intent == INTENT_OUT
+ || gfc_current_intrinsic_arg[n]->intent == INTENT_INOUT))
{
-- if (lhs.type != DEREF && rhs.type == DEREF)
-- get_varinfo (lhs.var)->indirect_target = true;
-+ gcc_assert (rhs.type != ADDRESSOF || rhs.offset == 0);
- VEC_safe_push (constraint_t, heap, constraints, t);
+- gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be INTENT(IN)",
+- gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
+- &e->where);
+- return FAILURE;
++ gfc_ref *ref;
++ bool pointer = e->symtree->n.sym->ts.type == BT_CLASS
++ && CLASS_DATA (e->symtree->n.sym)
++ ? CLASS_DATA (e->symtree->n.sym)->attr.class_pointer
++ : e->symtree->n.sym->attr.pointer;
++
++ for (ref = e->ref; ref; ref = ref->next)
++ {
++ if (pointer && ref->type == REF_COMPONENT)
++ break;
++ if (ref->type == REF_COMPONENT
++ && ((ref->u.c.component->ts.type == BT_CLASS
++ && CLASS_DATA (ref->u.c.component)->attr.class_pointer)
++ || (ref->u.c.component->ts.type != BT_CLASS
++ && ref->u.c.component->attr.pointer)))
++ break;
++ }
++
++ if (!ref)
++ {
++ gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be "
++ "INTENT(IN)", gfc_current_intrinsic_arg[n]->name,
++ gfc_current_intrinsic, &e->where);
++ return FAILURE;
++ }
}
- }
-@@ -2350,10 +2333,12 @@
- could_have_pointers (tree t)
- {
- tree type = TREE_TYPE (t);
--
-- if (POINTER_TYPE_P (type) || AGGREGATE_TYPE_P (type)
-+
-+ if (POINTER_TYPE_P (type)
-+ || AGGREGATE_TYPE_P (type)
- || TREE_CODE (type) == COMPLEX_TYPE)
- return true;
-+
- return false;
- }
-@@ -2367,9 +2352,9 @@
- if (TREE_CODE (DECL_FIELD_OFFSET (fdecl)) != INTEGER_CST
- || TREE_CODE (DECL_FIELD_BIT_OFFSET (fdecl)) != INTEGER_CST)
- return -1;
--
-- return (tree_low_cst (DECL_FIELD_OFFSET (fdecl), 1) * 8)
-- + tree_low_cst (DECL_FIELD_BIT_OFFSET (fdecl), 1);
+ if (e->expr_type == EXPR_VARIABLE
+ && e->symtree->n.sym->attr.flavor != FL_PARAMETER
+- && (allow_proc
+- || !e->symtree->n.sym->attr.function
+- || (e->symtree->n.sym == e->symtree->n.sym->result
+- && (e->symtree->n.sym == gfc_current_ns->proc_name
+- || (gfc_current_ns->parent
+- && e->symtree->n.sym
+- == gfc_current_ns->parent->proc_name)))))
++ && (allow_proc || !e->symtree->n.sym->attr.function))
+ return SUCCESS;
+
++ if (e->expr_type == EXPR_VARIABLE && e->symtree->n.sym->attr.function
++ && e->symtree->n.sym == e->symtree->n.sym->result)
++ {
++ gfc_namespace *ns;
++ for (ns = gfc_current_ns; ns; ns = ns->parent)
++ if (ns->proc_name == e->symtree->n.sym)
++ return SUCCESS;
++ }
+
-+ return (tree_low_cst (DECL_FIELD_OFFSET (fdecl), 1) * 8)
-+ + tree_low_cst (DECL_FIELD_BIT_OFFSET (fdecl), 1);
- }
+ gfc_error ("'%s' argument of '%s' intrinsic at %L must be a variable",
+ gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic, &e->where);
+Index: gcc/fortran/dependency.c
+===================================================================
+--- gcc/fortran/dependency.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/fortran/dependency.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -163,9 +163,19 @@
+ break;
-@@ -2388,7 +2373,7 @@
- return true;
- if (accesspos < fieldpos && (accesspos + accesssize > fieldpos))
- return true;
--
+ case REF_SUBSTRING:
+- if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0
+- || gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
++ if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0)
+ return false;
+
- return false;
- }
++ /* If both are NULL, the end length compares equal, because we
++ are looking at the same variable. This can only happen for
++ assumed- or deferred-length character arguments. */
++
++ if (r1->u.ss.end == NULL && r2->u.ss.end == NULL)
++ break;
++
++ if (gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
++ return false;
++
+ break;
+
+ default:
+Index: gcc/regmove.c
+===================================================================
+--- gcc/regmove.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/regmove.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -860,7 +860,7 @@
+ if (REG_N_CALLS_CROSSED (REGNO (src)) == 0)
+ break;
+
+- if (call_used_regs [REGNO (dst)]
++ if ((HARD_REGISTER_P (dst) && call_used_regs [REGNO (dst)])
+ || find_reg_fusage (p, CLOBBER, dst))
+ break;
+ }
+Index: gcc/configure.ac
+===================================================================
+--- gcc/configure.ac (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/configure.ac (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -807,17 +807,7 @@
+ gcc_AC_PROG_LN_S
+ ACX_PROG_LN($LN_S)
+ AC_PROG_RANLIB
+-case "${host}" in
+-*-*-darwin*)
+- # By default, the Darwin ranlib will not treat common symbols as
+- # definitions when building the archive table of contents. Other
+- # ranlibs do that; pass an option to the Darwin ranlib that makes
+- # it behave similarly.
+- ranlib_flags="-c"
+- ;;
+-*)
+- ranlib_flags=""
+-esac
++ranlib_flags=""
+ AC_SUBST(ranlib_flags)
+
+ gcc_AC_PROG_INSTALL
+Index: gcc/BASE-VER
+===================================================================
+--- gcc/BASE-VER (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1 +1 @@
+-4.6.2
++4.6.3
+Index: gcc/df.h
+===================================================================
+--- gcc/df.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/df.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -53,7 +53,7 @@
+ #define DF_RD 3 /* Reaching Defs. */
+ #define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */
+ #define DF_WORD_LR 5 /* Subreg tracking lr. */
+-#define DF_NOTE 6 /* REG_DEF and REG_UNUSED notes. */
++#define DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */
+ #define DF_MD 7 /* Multiple Definitions. */
-@@ -2411,20 +2396,20 @@
- while (!SSA_VAR_P (forzero) && !CONSTANT_CLASS_P (forzero))
- forzero = TREE_OPERAND (forzero, 0);
+ #define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1)
+Index: gcc/ipa-split.c
+===================================================================
+--- gcc/ipa-split.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ipa-split.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -130,6 +130,10 @@
-- if (CONSTANT_CLASS_P (forzero) && integer_zerop (forzero))
-+ if (CONSTANT_CLASS_P (forzero) && integer_zerop (forzero))
- {
- struct constraint_expr temp;
--
+ struct split_point best_split_point;
+
++/* Set of basic blocks that are not allowed to dominate a split point. */
+
- temp.offset = 0;
- temp.var = integer_id;
- temp.type = SCALAR;
- VEC_safe_push (ce_s, heap, *results, &temp);
- return;
- }
--
++static bitmap forbidden_dominators;
+
- t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
+ static tree find_retval (basic_block return_bb);
-- /* String constants's are readonly, so there is nothing to really do
-+ /* String constants are readonly, so there is nothing to really do
- here. */
- if (TREE_CODE (t) == STRING_CST)
- return;
-@@ -2438,21 +2423,21 @@
- /* This can also happen due to weird offsetof type macros. */
- if (TREE_CODE (t) != ADDR_EXPR && result->type == ADDRESSOF)
- result->type = SCALAR;
--
+ /* Callback for walk_stmt_load_store_addr_ops. If T is non-SSA automatic
+@@ -270,6 +274,83 @@
+ return ok;
+ }
+
++/* If STMT is a call, check the callee against a list of forbidden
++ predicate functions. If a match is found, look for uses of the
++ call result in condition statements that compare against zero.
++ For each such use, find the block targeted by the condition
++ statement for the nonzero result, and set the bit for this block
++ in the forbidden dominators bitmap. The purpose of this is to avoid
++ selecting a split point where we are likely to lose the chance
++ to optimize away an unused function call. */
+
- if (result->type == SCALAR)
- {
- /* In languages like C, you can access one past the end of an
- array. You aren't allowed to dereference it, so we can
- ignore this constraint. When we handle pointer subtraction,
- we may have to do something cute here. */
--
++static void
++check_forbidden_calls (gimple stmt)
++{
++ imm_use_iterator use_iter;
++ use_operand_p use_p;
++ tree lhs;
+
- if (result->offset < get_varinfo (result->var)->fullsize
- && bitmaxsize != 0)
- {
- /* It's also not true that the constraint will actually start at the
- right offset, it may start in some padding. We only care about
- setting the constraint to the first actual field it touches, so
-- walk to find it. */
-+ walk to find it. */
- varinfo_t curr;
- for (curr = get_varinfo (result->var); curr; curr = curr->next)
- {
-@@ -2495,6 +2480,7 @@
- {
- struct constraint_expr *c;
- unsigned int i = 0;
++ /* At the moment, __builtin_constant_p is the only forbidden
++ predicate function call (see PR49642). */
++ if (!gimple_call_builtin_p (stmt, BUILT_IN_CONSTANT_P))
++ return;
+
- for (i = 0; VEC_iterate (ce_s, *constraints, i, c); i++)
- {
- if (c->type == SCALAR)
-@@ -2576,6 +2562,7 @@
- tree pttype = TREE_TYPE (TREE_TYPE (t));
-
- get_constraint_for (exp, results);
-+
- /* Make sure we capture constraints to all elements
- of an array. */
- if ((handled_component_p (exp)
-@@ -2588,7 +2575,7 @@
-
- if (VEC_length (ce_s, *results) == 0)
- return;
--
-+
- gcc_assert (VEC_length (ce_s, *results) == 1);
- origrhs = VEC_last (ce_s, *results);
- tmp = *origrhs;
-@@ -2619,12 +2606,12 @@
- VEC_safe_push (ce_s, heap, *results, &tmp);
- }
- }
--
++ lhs = gimple_call_lhs (stmt);
+
- for (i = 0; VEC_iterate (ce_s, *results, i, c); i++)
- {
- if (c->type == DEREF)
- c->type = SCALAR;
-- else
-+ else
- c->type = ADDRESSOF;
- }
- return;
-@@ -2638,9 +2625,9 @@
- {
- varinfo_t vi;
- tree heapvar = heapvar_lookup (t);
--
-+
- if (heapvar == NULL)
-- {
-+ {
- heapvar = create_tmp_var_raw (ptr_type_node, "HEAP");
- DECL_EXTERNAL (heapvar) = 1;
- if (referenced_vars)
-@@ -2650,7 +2637,7 @@
-
- temp.var = create_variable_info_for (heapvar,
- alias_get_name (heapvar));
--
-+
- vi = get_varinfo (temp.var);
- vi->is_artificial_var = 1;
- vi->is_heap_var = 1;
-@@ -2712,7 +2699,7 @@
- case NON_LVALUE_EXPR:
- {
- tree op = TREE_OPERAND (t, 0);
--
++ if (!lhs || TREE_CODE (lhs) != SSA_NAME)
++ return;
+
- /* Cast from non-pointer to pointers are bad news for us.
- Anything else, we see through */
- if (!(POINTER_TYPE_P (TREE_TYPE (t))
-@@ -2738,7 +2725,7 @@
- {
- switch (TREE_CODE (t))
- {
-- case PHI_NODE:
-+ case PHI_NODE:
- {
- get_constraint_for (PHI_RESULT (t), results);
- return;
-@@ -2782,8 +2769,8 @@
-
-
- /* Handle the structure copy case where we have a simple structure copy
-- between LHS and RHS that is of SIZE (in bits)
--
-+ between LHS and RHS that is of SIZE (in bits)
-+
- For each field of the lhs variable (lhsfield)
- For each field of the rhs variable at lhsfield.offset (rhsfield)
- add the constraint lhsfield = rhsfield
-@@ -2808,7 +2795,7 @@
- struct constraint_expr temprhs = rhs;
- unsigned HOST_WIDE_INT fieldoffset;
-
-- templhs.var = p->id;
-+ templhs.var = p->id;
- q = get_varinfo (temprhs.var);
- fieldoffset = p->offset - pstart;
- q = first_vi_for_offset (q, q->offset + fieldoffset);
-@@ -2823,8 +2810,8 @@
-
- /* Handle the structure copy case where we have a structure copy between a
- aggregate on the LHS and a dereference of a pointer on the RHS
-- that is of SIZE (in bits)
--
-+ that is of SIZE (in bits)
++ FOR_EACH_IMM_USE_FAST (use_p, use_iter, lhs)
++ {
++ tree op1;
++ basic_block use_bb, forbidden_bb;
++ enum tree_code code;
++ edge true_edge, false_edge;
++ gimple use_stmt = USE_STMT (use_p);
+
- For each field of the lhs variable (lhsfield)
- rhs.offset = lhsfield->offset
- add the constraint lhsfield = rhs
-@@ -2849,12 +2836,12 @@
-
-
- if (templhs.type == SCALAR)
-- templhs.var = p->id;
-+ templhs.var = p->id;
- else
- templhs.offset = p->offset;
--
++ if (gimple_code (use_stmt) != GIMPLE_COND)
++ continue;
+
- q = get_varinfo (temprhs.var);
-- fieldoffset = p->offset - pstart;
-+ fieldoffset = p->offset - pstart;
- temprhs.offset += fieldoffset;
- process_constraint (new_constraint (templhs, temprhs));
- }
-@@ -2862,7 +2849,7 @@
-
- /* Handle the structure copy case where we have a structure copy
- between a aggregate on the RHS and a dereference of a pointer on
-- the LHS that is of SIZE (in bits)
-+ the LHS that is of SIZE (in bits)
-
- For each field of the rhs variable (rhsfield)
- lhs.offset = rhsfield->offset
-@@ -2888,12 +2875,12 @@
-
-
- if (temprhs.type == SCALAR)
-- temprhs.var = p->id;
-+ temprhs.var = p->id;
- else
- temprhs.offset = p->offset;
--
++ /* Assuming canonical form for GIMPLE_COND here, with constant
++ in second position. */
++ op1 = gimple_cond_rhs (use_stmt);
++ code = gimple_cond_code (use_stmt);
++ use_bb = gimple_bb (use_stmt);
+
- q = get_varinfo (templhs.var);
-- fieldoffset = p->offset - pstart;
-+ fieldoffset = p->offset - pstart;
- templhs.offset += fieldoffset;
- process_constraint (new_constraint (templhs, temprhs));
- }
-@@ -2901,7 +2888,7 @@
-
- /* Sometimes, frontends like to give us bad type information. This
- function will collapse all the fields from VAR to the end of VAR,
-- into VAR, so that we treat those fields as a single variable.
-+ into VAR, so that we treat those fields as a single variable.
- We return the variable they were collapsed into. */
-
- static unsigned int
-@@ -2913,16 +2900,16 @@
- for (field = currvar->next; field; field = field->next)
- {
- if (dump_file)
-- fprintf (dump_file, "Type safety: Collapsing var %s into %s\n",
-+ fprintf (dump_file, "Type safety: Collapsing var %s into %s\n",
- field->name, currvar->name);
--
++ extract_true_false_edges_from_block (use_bb, &true_edge, &false_edge);
+
- gcc_assert (!field->collapsed_to);
- field->collapsed_to = currvar;
- }
-
- currvar->next = NULL;
- currvar->size = currvar->fullsize - currvar->offset;
--
++ /* We're only interested in comparisons that distinguish
++ unambiguously from zero. */
++ if (!integer_zerop (op1) || code == LE_EXPR || code == GE_EXPR)
++ continue;
+
- return currvar->id;
- }
-
-@@ -2944,7 +2931,7 @@
- gcc_assert (VEC_length (ce_s, rhsc) == 1);
- lhs = *(VEC_last (ce_s, lhsc));
- rhs = *(VEC_last (ce_s, rhsc));
--
++ if (code == EQ_EXPR)
++ forbidden_bb = false_edge->dest;
++ else
++ forbidden_bb = true_edge->dest;
++
++ bitmap_set_bit (forbidden_dominators, forbidden_bb->index);
++ }
++}
++
++/* If BB is dominated by any block in the forbidden dominators set,
++ return TRUE; else FALSE. */
++
++static bool
++dominated_by_forbidden (basic_block bb)
++{
++ unsigned dom_bb;
++ bitmap_iterator bi;
++
++ EXECUTE_IF_SET_IN_BITMAP (forbidden_dominators, 1, dom_bb, bi)
++ {
++ if (dominated_by_p (CDI_DOMINATORS, bb, BASIC_BLOCK (dom_bb)))
++ return true;
++ }
++
++ return false;
++}
+
- VEC_free (ce_s, heap, lhsc);
- VEC_free (ce_s, heap, rhsc);
-
-@@ -2955,7 +2942,7 @@
- lhs = rhs;
- rhs = tmp;
+ /* We found an split_point CURRENT. NON_SSA_VARS is bitmap of all non ssa
+ variables used and RETURN_BB is return basic block.
+ See if we can split function here. */
+@@ -411,6 +492,18 @@
+ " Refused: split part has non-ssa uses\n");
+ return;
}
--
+
- /* This is fairly conservative for the RHS == ADDRESSOF case, in that it's
- possible it's something we could handle. However, most cases falling
- into this are dealing with transparent unions, which are slightly
-@@ -3021,11 +3008,11 @@
- else
- lhssize = TREE_INT_CST_LOW (lhstypesize);
-
--
-- if (rhs.type == SCALAR && lhs.type == SCALAR)
++ /* If the split point is dominated by a forbidden block, reject
++ the split. */
++ if (!bitmap_empty_p (forbidden_dominators)
++ && dominated_by_forbidden (current->entry_bb))
++ {
++ if (dump_file && (dump_flags & TDF_DETAILS))
++ fprintf (dump_file,
++ " Refused: split point dominated by forbidden block\n");
++ return;
++ }
+
-+ if (rhs.type == SCALAR && lhs.type == SCALAR)
- {
- if (!do_simple_structure_copy (lhs, rhs, MIN (lhssize, rhssize)))
-- {
-+ {
- lhs.var = collapse_rest_of_var (lhs.var);
- rhs.var = collapse_rest_of_var (rhs.var);
- lhs.offset = 0;
-@@ -3042,7 +3029,7 @@
- else
- {
- tree pointedtotype = lhstype;
-- tree tmpvar;
-+ tree tmpvar;
-
- gcc_assert (rhs.type == DEREF && lhs.type == DEREF);
- tmpvar = create_tmp_var_raw (pointedtotype, "structcopydereftmp");
-@@ -3052,6 +3039,7 @@
+ /* See if retval used by return bb is computed by header or split part.
+ When it is computed by split part, we need to produce return statement
+ in the split part and add code to header to pass it around.
+@@ -1329,6 +1422,10 @@
+ return 0;
}
- }
++ /* Initialize bitmap to track forbidden calls. */
++ forbidden_dominators = BITMAP_ALLOC (NULL);
++ calculate_dominance_info (CDI_DOMINATORS);
+
- /* Update related alias information kept in AI. This is used when
- building name tags, alias sets and deciding grouping heuristics.
- STMT is the statement to process. This function also updates
-@@ -3261,7 +3249,6 @@
- }
- }
+ /* Compute local info about basic blocks and determine function size/time. */
+ VEC_safe_grow_cleared (bb_info, heap, bb_info_vec, last_basic_block + 1);
+ memset (&best_split_point, 0, sizeof (best_split_point));
+@@ -1350,6 +1447,7 @@
+ this_time = estimate_num_insns (stmt, &eni_time_weights) * freq;
+ size += this_size;
+ time += this_time;
++ check_forbidden_calls (stmt);
--
- /* Handle pointer arithmetic EXPR when creating aliasing constraints.
- Expressions of the type PTR + CST can be handled in two ways:
-
-@@ -3288,7 +3275,7 @@
- unsigned int i = 0;
- unsigned int j = 0;
- VEC (ce_s, heap) *temp = NULL;
-- unsigned int rhsoffset = 0;
-+ unsigned HOST_WIDE_INT rhsoffset = 0;
-
- if (TREE_CODE (expr) != PLUS_EXPR
- && TREE_CODE (expr) != MINUS_EXPR)
-@@ -3299,14 +3286,18 @@
-
- get_constraint_for (op0, &temp);
- if (POINTER_TYPE_P (TREE_TYPE (op0))
-- && TREE_CODE (op1) == INTEGER_CST
-+ && host_integerp (op1, 1)
- && TREE_CODE (expr) == PLUS_EXPR)
- {
-+ if ((TREE_INT_CST_LOW (op1) * BITS_PER_UNIT) / BITS_PER_UNIT
-+ != TREE_INT_CST_LOW (op1))
-+ return false;
- rhsoffset = TREE_INT_CST_LOW (op1) * BITS_PER_UNIT;
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+@@ -1371,6 +1469,7 @@
+ BITMAP_FREE (best_split_point.split_bbs);
+ todo = TODO_update_ssa | TODO_cleanup_cfg;
}
- else
- return false;
++ BITMAP_FREE (forbidden_dominators);
+ VEC_free (bb_info, heap, bb_info_vec);
+ bb_info_vec = NULL;
+ return todo;
+Index: gcc/lto-section-in.c
+===================================================================
+--- gcc/lto-section-in.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto-section-in.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -296,7 +296,7 @@
+ = (const struct lto_simple_header *) data;
+
+ struct lto_input_block* ib_main;
+- int32_t main_offset = sizeof (struct lto_simple_header);
++ int main_offset = sizeof (struct lto_simple_header);
+
+ if (!data)
+ return NULL;
+Index: gcc/tree-vect-data-refs.c
+===================================================================
+--- gcc/tree-vect-data-refs.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-vect-data-refs.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2631,6 +2631,16 @@
+ return false;
+ }
-+
- for (i = 0; VEC_iterate (ce_s, lhsc, i, c); i++)
- for (j = 0; VEC_iterate (ce_s, temp, j, c2); j++)
- {
-@@ -3360,12 +3351,12 @@
- {
- int i;
- unsigned int j;
--
-+
- /* For a phi node, assign all the arguments to
- the result. */
- get_constraint_for (PHI_RESULT (t), &lhsc);
- for (i = 0; i < PHI_NUM_ARGS (t); i++)
-- {
++ if (is_gimple_call (stmt))
++ {
++ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
+ {
- tree rhstype;
- tree strippedrhs = PHI_ARG_DEF (t, i);
++ fprintf (vect_dump, "not vectorized: dr in a call ");
++ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
++ }
++ return false;
++ }
++
+ /* Update DR field in stmt_vec_info struct. */
-@@ -3401,7 +3392,6 @@
- {
- tree lhsop;
- tree rhsop;
-- unsigned int varid;
- tree arglist;
- varinfo_t fi;
- int i = 1;
-@@ -3423,17 +3413,16 @@
- we should still be able to handle. */
- if (decl)
- {
-- varid = get_id_for_tree (decl);
-+ fi = get_vi_for_tree (decl);
- }
- else
+ /* If the dataref is in an inner-loop of the loop that is considered for
+Index: gcc/c-typeck.c
+===================================================================
+--- gcc/c-typeck.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-typeck.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3802,11 +3802,7 @@
+ if (val && TREE_CODE (val) == INDIRECT_REF
+ && TREE_CONSTANT (TREE_OPERAND (val, 0)))
{
- decl = TREE_OPERAND (rhsop, 0);
-- varid = get_id_for_tree (decl);
-+ fi = get_vi_for_tree (decl);
+- tree op0 = fold_convert_loc (location, sizetype,
+- fold_offsetof (arg, val)), op1;
+-
+- op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0));
+- ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0);
++ ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg));
+ goto return_build_unary_op;
}
- /* Assign all the passed arguments to the appropriate incoming
- parameters of the function. */
-- fi = get_varinfo (varid);
- arglist = TREE_OPERAND (rhsop, 1);
-
- for (;arglist; arglist = TREE_CHAIN (arglist))
-@@ -3463,13 +3452,14 @@
- }
- i++;
- }
+Index: gcc/calls.c
+===================================================================
+--- gcc/calls.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/calls.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1548,6 +1548,131 @@
+ return funexp;
+ }
+
++/* Internal state for internal_arg_pointer_based_exp and its helpers. */
++static struct
++{
++ /* Last insn that has been scanned by internal_arg_pointer_based_exp_scan,
++ or NULL_RTX if none has been scanned yet. */
++ rtx scan_start;
++ /* Vector indexed by REGNO - FIRST_PSEUDO_REGISTER, recording if a pseudo is
++ based on crtl->args.internal_arg_pointer. The element is NULL_RTX if the
++ pseudo isn't based on it, a CONST_INT offset if the pseudo is based on it
++ with fixed offset, or PC if this is with variable or unknown offset. */
++ VEC(rtx, heap) *cache;
++} internal_arg_pointer_exp_state;
++
++static rtx internal_arg_pointer_based_exp (rtx, bool);
++
++/* Helper function for internal_arg_pointer_based_exp. Scan insns in
++ the tail call sequence, starting with first insn that hasn't been
++ scanned yet, and note for each pseudo on the LHS whether it is based
++ on crtl->args.internal_arg_pointer or not, and what offset from that
++ that pointer it has. */
+
- /* If we are returning a value, assign it to the result. */
- if (lhsop)
- {
- struct constraint_expr rhs;
- struct constraint_expr *lhsp;
- unsigned int j = 0;
--
++static void
++internal_arg_pointer_based_exp_scan (void)
++{
++ rtx insn, scan_start = internal_arg_pointer_exp_state.scan_start;
+
- get_constraint_for (lhsop, &lhsc);
- if (TREE_CODE (decl) != FUNCTION_DECL)
- {
-@@ -3485,7 +3475,7 @@
- }
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhs));
-- }
++ if (scan_start == NULL_RTX)
++ insn = get_insns ();
++ else
++ insn = NEXT_INSN (scan_start);
++
++ while (insn)
++ {
++ rtx set = single_set (insn);
++ if (set && REG_P (SET_DEST (set)) && !HARD_REGISTER_P (SET_DEST (set)))
++ {
++ rtx val = NULL_RTX;
++ unsigned int idx = REGNO (SET_DEST (set)) - FIRST_PSEUDO_REGISTER;
++ /* Punt on pseudos set multiple times. */
++ if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache)
++ && (VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx)
++ != NULL_RTX))
++ val = pc_rtx;
++ else
++ val = internal_arg_pointer_based_exp (SET_SRC (set), false);
++ if (val != NULL_RTX)
++ {
++ if (idx
++ >= VEC_length (rtx, internal_arg_pointer_exp_state.cache))
++ VEC_safe_grow_cleared (rtx, heap,
++ internal_arg_pointer_exp_state.cache,
++ idx + 1);
++ VEC_replace (rtx, internal_arg_pointer_exp_state.cache,
++ idx, val);
++ }
+ }
- }
- /* Otherwise, just a regular assignment statement. */
- else if (TREE_CODE (t) == MODIFY_EXPR)
-@@ -3494,7 +3484,7 @@
- tree rhsop = TREE_OPERAND (t, 1);
- int i;
-
-- if ((AGGREGATE_TYPE_P (TREE_TYPE (lhsop))
-+ if ((AGGREGATE_TYPE_P (TREE_TYPE (lhsop))
- || TREE_CODE (TREE_TYPE (lhsop)) == COMPLEX_TYPE)
- && (AGGREGATE_TYPE_P (TREE_TYPE (rhsop))
- || TREE_CODE (TREE_TYPE (lhsop)) == COMPLEX_TYPE))
-@@ -3513,7 +3503,7 @@
- {
- /* RHS that consist of unary operations,
- exceptional types, or bare decls/constants, get
-- handled directly by get_constraint_for. */
-+ handled directly by get_constraint_for. */
- case tcc_reference:
- case tcc_declaration:
- case tcc_constant:
-@@ -3528,7 +3518,7 @@
- {
- struct constraint_expr *c2;
- unsigned int k;
--
-+
- for (k = 0; VEC_iterate (ce_s, rhsc, k, c2); k++)
- process_constraint (new_constraint (*c, *c2));
- }
-@@ -3570,7 +3560,7 @@
- }
- }
- }
-- }
-+ }
- }
- }
- }
-@@ -3578,7 +3568,7 @@
- /* After promoting variables and computing aliasing we will
- need to re-scan most statements. FIXME: Try to minimize the
- number of statements re-scanned. It's not really necessary to
-- re-scan *all* statements. */
-+ re-scan *all* statements. */
- mark_stmt_modified (origt);
- VEC_free (ce_s, heap, rhsc);
- VEC_free (ce_s, heap, lhsc);
-@@ -3591,7 +3581,7 @@
- first field that overlaps with OFFSET.
- Return NULL if we can't find one. */
-
--static varinfo_t
-+static varinfo_t
- first_vi_for_offset (varinfo_t start, unsigned HOST_WIDE_INT offset)
- {
- varinfo_t curr = start;
-@@ -3617,7 +3607,7 @@
- {
- varinfo_t prev = base;
- varinfo_t curr = base->next;
--
++ if (NEXT_INSN (insn) == NULL_RTX)
++ scan_start = insn;
++ insn = NEXT_INSN (insn);
++ }
+
- field->next = curr;
- prev->next = field;
- }
-@@ -3630,7 +3620,7 @@
- {
- varinfo_t prev = base;
- varinfo_t curr = base->next;
--
++ internal_arg_pointer_exp_state.scan_start = scan_start;
++}
++
++/* Helper function for internal_arg_pointer_based_exp, called through
++ for_each_rtx. Return 1 if *LOC is a register based on
++ crtl->args.internal_arg_pointer. Return -1 if *LOC is not based on it
++ and the subexpressions need not be examined. Otherwise return 0. */
+
- if (curr == NULL)
- {
- prev->next = field;
-@@ -3652,13 +3642,13 @@
-
- /* qsort comparison function for two fieldoff's PA and PB */
-
--static int
+static int
- fieldoff_compare (const void *pa, const void *pb)
- {
- const fieldoff_s *foa = (const fieldoff_s *)pa;
- const fieldoff_s *fob = (const fieldoff_s *)pb;
- HOST_WIDE_INT foasize, fobsize;
--
++internal_arg_pointer_based_exp_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
++{
++ if (REG_P (*loc) && internal_arg_pointer_based_exp (*loc, false) != NULL_RTX)
++ return 1;
++ if (MEM_P (*loc))
++ return -1;
++ return 0;
++}
+
- if (foa->offset != fob->offset)
- return foa->offset - fob->offset;
-
-@@ -3671,8 +3661,8 @@
- void
- sort_fieldstack (VEC(fieldoff_s,heap) *fieldstack)
- {
-- qsort (VEC_address (fieldoff_s, fieldstack),
-- VEC_length (fieldoff_s, fieldstack),
-+ qsort (VEC_address (fieldoff_s, fieldstack),
-+ VEC_length (fieldoff_s, fieldstack),
- sizeof (fieldoff_s),
- fieldoff_compare);
- }
-@@ -3686,12 +3676,13 @@
- TYPE. */
-
- int
--push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack,
-+push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack,
- HOST_WIDE_INT offset, bool *has_union)
- {
- tree field;
- int count = 0;
--
-+ unsigned HOST_WIDE_INT minoffset = -1;
++/* Compute whether RTL is based on crtl->args.internal_arg_pointer. Return
++ NULL_RTX if RTL isn't based on it, a CONST_INT offset if RTL is based on
++ it with fixed offset, or PC if this is with variable or unknown offset.
++ TOPLEVEL is true if the function is invoked at the topmost level. */
+
- if (TREE_CODE (type) == COMPLEX_TYPE)
- {
- fieldoff_s *real_part, *img_part;
-@@ -3700,13 +3691,13 @@
- real_part->size = TYPE_SIZE (TREE_TYPE (type));
- real_part->offset = offset;
- real_part->decl = NULL_TREE;
--
++static rtx
++internal_arg_pointer_based_exp (rtx rtl, bool toplevel)
++{
++ if (CONSTANT_P (rtl))
++ return NULL_RTX;
+
- img_part = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL);
- img_part->type = TREE_TYPE (type);
- img_part->size = TYPE_SIZE (TREE_TYPE (type));
- img_part->offset = offset + TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (type)));
- img_part->decl = NULL_TREE;
--
++ if (rtl == crtl->args.internal_arg_pointer)
++ return const0_rtx;
+
- return 2;
- }
-
-@@ -3733,12 +3724,12 @@
- {
- bool push = false;
- int pushed = 0;
--
-- if (has_union
-+
-+ if (has_union
- && (TREE_CODE (TREE_TYPE (type)) == QUAL_UNION_TYPE
- || TREE_CODE (TREE_TYPE (type)) == UNION_TYPE))
- *has_union = true;
--
-+
- if (!AGGREGATE_TYPE_P (TREE_TYPE (type))) /* var_can_have_subvars */
- push = true;
- else if (!(pushed = push_fields_onto_fieldstack
-@@ -3772,12 +3763,12 @@
- {
- bool push = false;
- int pushed = 0;
--
-- if (has_union
-+
-+ if (has_union
- && (TREE_CODE (TREE_TYPE (field)) == QUAL_UNION_TYPE
- || TREE_CODE (TREE_TYPE (field)) == UNION_TYPE))
- *has_union = true;
--
-+
- if (!var_can_have_subvars (field))
- push = true;
- else if (!(pushed = push_fields_onto_fieldstack
-@@ -3789,7 +3780,7 @@
- see if we didn't push any subfields and the size is
- nonzero, push the field onto the stack */
- push = true;
--
-+
- if (push)
- {
- fieldoff_s *pair;
-@@ -3803,8 +3794,25 @@
- }
- else
- count += pushed;
++ if (REG_P (rtl) && HARD_REGISTER_P (rtl))
++ return NULL_RTX;
+
-+ if (bitpos_of_field (field) < minoffset)
-+ minoffset = bitpos_of_field (field);
- }
-
-+ /* We need to create a fake subvar for empty bases. But _only_ for non-empty
-+ classes. */
-+ if (minoffset != 0 && count != 0)
++ if (GET_CODE (rtl) == PLUS && CONST_INT_P (XEXP (rtl, 1)))
+ {
-+ fieldoff_s *pair;
-+
-+ pair = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL);
-+ pair->type = void_type_node;
-+ pair->size = build_int_cst (size_type_node, minoffset);
-+ pair->decl = NULL;
-+ pair->offset = offset;
-+ count++;
++ rtx val = internal_arg_pointer_based_exp (XEXP (rtl, 0), toplevel);
++ if (val == NULL_RTX || val == pc_rtx)
++ return val;
++ return plus_constant (val, INTVAL (XEXP (rtl, 1)));
+ }
+
- return count;
- }
-
-@@ -3848,15 +3856,15 @@
- unsigned int i = 0;
- tree t;
-
-- for (t = TYPE_ARG_TYPES (TREE_TYPE (decl));
-+ for (t = TYPE_ARG_TYPES (TREE_TYPE (decl));
- t;
- t = TREE_CHAIN (t))
-- {
++ /* When called at the topmost level, scan pseudo assignments in between the
++ last scanned instruction in the tail call sequence and the latest insn
++ in that sequence. */
++ if (toplevel)
++ internal_arg_pointer_based_exp_scan ();
++
++ if (REG_P (rtl))
+ {
- if (TREE_VALUE (t) == void_type_node)
- break;
- i++;
- }
--
++ unsigned int idx = REGNO (rtl) - FIRST_PSEUDO_REGISTER;
++ if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache))
++ return VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx);
++
++ return NULL_RTX;
++ }
+
- if (!t)
- *is_varargs = true;
- return i;
-@@ -3870,19 +3878,19 @@
++ if (for_each_rtx (&rtl, internal_arg_pointer_based_exp_1, NULL))
++ return pc_rtx;
++
++ return NULL_RTX;
++}
++
+ /* Return true if and only if SIZE storage units (usually bytes)
+ starting from address ADDR overlap with already clobbered argument
+ area. This function is used to determine if we should give up a
+@@ -1557,20 +1682,17 @@
+ mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
{
- unsigned int index = VEC_length (varinfo_t, varmap);
- varinfo_t vi;
-- tree arg;
-+ tree arg;
- unsigned int i;
- bool is_varargs = false;
-
- /* Create the variable info. */
-
-- vi = new_var_info (decl, index, name, index);
-+ vi = new_var_info (decl, index, name);
- vi->decl = decl;
- vi->offset = 0;
- vi->has_union = 0;
- vi->size = 1;
- vi->fullsize = count_num_arguments (decl, &is_varargs) + 1;
-- insert_id_for_tree (vi->decl, index);
-+ insert_vi_for_tree (vi->decl, vi);
- VEC_safe_push (varinfo_t, heap, varmap, vi);
-
- stats.total_vars++;
-@@ -3898,12 +3906,12 @@
- return index;
+ HOST_WIDE_INT i;
++ rtx val;
+
+- if (addr == crtl->args.internal_arg_pointer)
+- i = 0;
+- else if (GET_CODE (addr) == PLUS
+- && XEXP (addr, 0) == crtl->args.internal_arg_pointer
+- && CONST_INT_P (XEXP (addr, 1)))
+- i = INTVAL (XEXP (addr, 1));
+- /* Return true for arg pointer based indexed addressing. */
+- else if (GET_CODE (addr) == PLUS
+- && (XEXP (addr, 0) == crtl->args.internal_arg_pointer
+- || XEXP (addr, 1) == crtl->args.internal_arg_pointer))
++ if (sbitmap_empty_p (stored_args_map))
++ return false;
++ val = internal_arg_pointer_based_exp (addr, true);
++ if (val == NULL_RTX)
++ return false;
++ else if (val == pc_rtx)
+ return true;
+ else
+- return false;
++ i = INTVAL (val);
+
+ #ifdef ARGS_GROW_DOWNWARD
+ i = -i - size;
+@@ -3175,6 +3297,8 @@
+ }
+
+ sbitmap_free (stored_args_map);
++ internal_arg_pointer_exp_state.scan_start = NULL_RTX;
++ VEC_free (rtx, heap, internal_arg_pointer_exp_state.cache);
+ }
+ else
+ {
+Index: gcc/loop-doloop.c
+===================================================================
+--- gcc/loop-doloop.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/loop-doloop.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -334,14 +334,11 @@
+ describes the loop, DESC describes the number of iterations of the
+ loop, and DOLOOP_INSN is the low-overhead looping insn to emit at the
+ end of the loop. CONDITION is the condition separated from the
+- DOLOOP_SEQ. COUNT is the number of iterations of the LOOP.
+- ZERO_EXTEND_P says to zero extend COUNT after the increment of it to
+- word_mode from FROM_MODE. */
++ DOLOOP_SEQ. COUNT is the number of iterations of the LOOP. */
+
+ static void
+ doloop_modify (struct loop *loop, struct niter_desc *desc,
+- rtx doloop_seq, rtx condition, rtx count,
+- bool zero_extend_p, enum machine_mode from_mode)
++ rtx doloop_seq, rtx condition, rtx count)
+ {
+ rtx counter_reg;
+ rtx tmp, noloop = NULL_RTX;
+@@ -415,12 +412,8 @@
}
--
-+
- arg = DECL_ARGUMENTS (decl);
+ if (increment_count)
+- count = simplify_gen_binary (PLUS, from_mode, count, const1_rtx);
++ count = simplify_gen_binary (PLUS, mode, count, const1_rtx);
- /* Set up variables for each argument. */
- for (i = 1; i < vi->fullsize; i++)
-- {
-+ {
- varinfo_t argvi;
- const char *newname;
- char *tempname;
-@@ -3912,13 +3920,13 @@
+- if (zero_extend_p)
+- count = simplify_gen_unary (ZERO_EXTEND, word_mode,
+- count, from_mode);
+-
+ /* Insert initialization of the count register into the loop header. */
+ start_sequence ();
+ tmp = force_operand (count, counter_reg);
+@@ -555,7 +548,6 @@
+ struct niter_desc *desc;
+ unsigned word_mode_size;
+ unsigned HOST_WIDE_INT word_mode_max;
+- bool zero_extend_p = false;
- if (arg)
- argdecl = arg;
--
-+
- newindex = VEC_length (varinfo_t, varmap);
- asprintf (&tempname, "%s.arg%d", name, i-1);
- newname = ggc_strdup (tempname);
- free (tempname);
-
-- argvi = new_var_info (argdecl, newindex,newname, newindex);
-+ argvi = new_var_info (argdecl, newindex, newname);
- argvi->decl = argdecl;
- VEC_safe_push (varinfo_t, heap, varmap, argvi);
- argvi->offset = i;
-@@ -3929,7 +3937,7 @@
- stats.total_vars ++;
- if (arg)
+ if (dump_file)
+ fprintf (dump_file, "Doloop: Processing loop %d.\n", loop->num);
+@@ -630,7 +622,8 @@
+ {
+ if (word_mode_size > GET_MODE_BITSIZE (mode))
{
-- insert_id_for_tree (arg, newindex);
-+ insert_vi_for_tree (arg, argvi);
- arg = TREE_CHAIN (arg);
- }
+- zero_extend_p = true;
++ count = simplify_gen_unary (ZERO_EXTEND, word_mode,
++ count, mode);
+ iterations = simplify_gen_unary (ZERO_EXTEND, word_mode,
+ iterations, mode);
+ iterations_max = simplify_gen_unary (ZERO_EXTEND, word_mode,
+@@ -674,8 +667,7 @@
+ return false;
}
-@@ -3948,13 +3956,13 @@
- if (DECL_RESULT (decl))
- resultdecl = DECL_RESULT (decl);
--
-+
- newindex = VEC_length (varinfo_t, varmap);
- asprintf (&tempname, "%s.result", name);
- newname = ggc_strdup (tempname);
- free (tempname);
-
-- resultvi = new_var_info (resultdecl, newindex, newname, newindex);
-+ resultvi = new_var_info (resultdecl, newindex, newname);
- resultvi->decl = resultdecl;
- VEC_safe_push (varinfo_t, heap, varmap, resultvi);
- resultvi->offset = i;
-@@ -3964,13 +3972,13 @@
- insert_into_field_list_sorted (vi, resultvi);
- stats.total_vars ++;
- if (DECL_RESULT (decl))
-- insert_id_for_tree (DECL_RESULT (decl), newindex);
-+ insert_vi_for_tree (DECL_RESULT (decl), resultvi);
+- doloop_modify (loop, desc, doloop_seq, condition, count,
+- zero_extend_p, mode);
++ doloop_modify (loop, desc, doloop_seq, condition, count);
+ return true;
+ }
+
+Index: gcc/tree-ssa-pre.c
+===================================================================
+--- gcc/tree-ssa-pre.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-ssa-pre.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1545,7 +1545,7 @@
+ tree newvuse = vuse;
+ VEC (vn_reference_op_s, heap) *newoperands = NULL;
+ bool changed = false, same_valid = true;
+- unsigned int i, j;
++ unsigned int i, j, n;
+ vn_reference_op_t operand;
+ vn_reference_t newref;
+
+@@ -1554,100 +1554,83 @@
+ {
+ pre_expr opresult;
+ pre_expr leader;
+- tree oldop0 = operand->op0;
+- tree oldop1 = operand->op1;
+- tree oldop2 = operand->op2;
+- tree op0 = oldop0;
+- tree op1 = oldop1;
+- tree op2 = oldop2;
++ tree op[3];
+ tree type = operand->type;
+ vn_reference_op_s newop = *operand;
+-
+- if (op0 && TREE_CODE (op0) == SSA_NAME)
++ op[0] = operand->op0;
++ op[1] = operand->op1;
++ op[2] = operand->op2;
++ for (n = 0; n < 3; ++n)
+ {
+- unsigned int op_val_id = VN_INFO (op0)->value_id;
+- leader = find_leader_in_sets (op_val_id, set1, set2);
+- opresult = phi_translate (leader, set1, set2, pred, phiblock);
+- if (opresult && opresult != leader)
++ unsigned int op_val_id;
++ if (!op[n])
++ continue;
++ if (TREE_CODE (op[n]) != SSA_NAME)
+ {
+- tree name = get_representative_for (opresult);
+- if (!name)
++ /* We can't possibly insert these. */
++ if (n != 0
++ && !is_gimple_min_invariant (op[n]))
+ break;
+- op0 = name;
++ continue;
+ }
+- else if (!opresult)
++ op_val_id = VN_INFO (op[n])->value_id;
++ leader = find_leader_in_sets (op_val_id, set1, set2);
++ if (!leader)
+ break;
+- }
+- changed |= op0 != oldop0;
+-
+- if (op1 && TREE_CODE (op1) == SSA_NAME)
+- {
+- unsigned int op_val_id = VN_INFO (op1)->value_id;
+- leader = find_leader_in_sets (op_val_id, set1, set2);
+- opresult = phi_translate (leader, set1, set2, pred, phiblock);
+- if (opresult && opresult != leader)
++ /* Make sure we do not recursively translate ourselves
++ like for translating a[n_1] with the leader for
++ n_1 being a[n_1]. */
++ if (get_expression_id (leader) != get_expression_id (expr))
+ {
+- tree name = get_representative_for (opresult);
+- if (!name)
++ opresult = phi_translate (leader, set1, set2,
++ pred, phiblock);
++ if (!opresult)
+ break;
+- op1 = name;
++ if (opresult != leader)
++ {
++ tree name = get_representative_for (opresult);
++ if (!name)
++ break;
++ changed |= name != op[n];
++ op[n] = name;
++ }
+ }
+- else if (!opresult)
+- break;
+ }
+- /* We can't possibly insert these. */
+- else if (op1 && !is_gimple_min_invariant (op1))
+- break;
+- changed |= op1 != oldop1;
+- if (op2 && TREE_CODE (op2) == SSA_NAME)
++ if (n != 3)
+ {
+- unsigned int op_val_id = VN_INFO (op2)->value_id;
+- leader = find_leader_in_sets (op_val_id, set1, set2);
+- opresult = phi_translate (leader, set1, set2, pred, phiblock);
+- if (opresult && opresult != leader)
+- {
+- tree name = get_representative_for (opresult);
+- if (!name)
+- break;
+- op2 = name;
+- }
+- else if (!opresult)
+- break;
++ if (newoperands)
++ VEC_free (vn_reference_op_s, heap, newoperands);
++ return NULL;
+ }
+- /* We can't possibly insert these. */
+- else if (op2 && !is_gimple_min_invariant (op2))
+- break;
+- changed |= op2 != oldop2;
+-
+ if (!newoperands)
+ newoperands = VEC_copy (vn_reference_op_s, heap, operands);
+ /* We may have changed from an SSA_NAME to a constant */
+- if (newop.opcode == SSA_NAME && TREE_CODE (op0) != SSA_NAME)
+- newop.opcode = TREE_CODE (op0);
++ if (newop.opcode == SSA_NAME && TREE_CODE (op[0]) != SSA_NAME)
++ newop.opcode = TREE_CODE (op[0]);
+ newop.type = type;
+- newop.op0 = op0;
+- newop.op1 = op1;
+- newop.op2 = op2;
++ newop.op0 = op[0];
++ newop.op1 = op[1];
++ newop.op2 = op[2];
+ /* If it transforms a non-constant ARRAY_REF into a constant
+ one, adjust the constant offset. */
+ if (newop.opcode == ARRAY_REF
+ && newop.off == -1
+- && TREE_CODE (op0) == INTEGER_CST
+- && TREE_CODE (op1) == INTEGER_CST
+- && TREE_CODE (op2) == INTEGER_CST)
++ && TREE_CODE (op[0]) == INTEGER_CST
++ && TREE_CODE (op[1]) == INTEGER_CST
++ && TREE_CODE (op[2]) == INTEGER_CST)
+ {
+- double_int off = tree_to_double_int (op0);
++ double_int off = tree_to_double_int (op[0]);
+ off = double_int_add (off,
+ double_int_neg
+- (tree_to_double_int (op1)));
+- off = double_int_mul (off, tree_to_double_int (op2));
++ (tree_to_double_int (op[1])));
++ off = double_int_mul (off, tree_to_double_int (op[2]));
+ if (double_int_fits_in_shwi_p (off))
+ newop.off = off.low;
+ }
+ VEC_replace (vn_reference_op_s, newoperands, j, &newop);
+ /* If it transforms from an SSA_NAME to an address, fold with
+ a preceding indirect reference. */
+- if (j > 0 && op0 && TREE_CODE (op0) == ADDR_EXPR
++ if (j > 0 && op[0] && TREE_CODE (op[0]) == ADDR_EXPR
+ && VEC_index (vn_reference_op_s,
+ newoperands, j - 1)->opcode == MEM_REF)
+ vn_reference_fold_indirect (&newoperands, &j);
+Index: gcc/cfgcleanup.c
+===================================================================
+--- gcc/cfgcleanup.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cfgcleanup.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1969,7 +1969,14 @@
+
+ cond = get_condition (jump, &move_before, true, false);
+ if (cond == NULL_RTX)
+- move_before = jump;
++ {
++#ifdef HAVE_cc0
++ if (reg_mentioned_p (cc0_rtx, jump))
++ move_before = prev_nonnote_nondebug_insn (jump);
++ else
++#endif
++ move_before = jump;
++ }
+
+ for (ix = 0; ix < nedges; ix++)
+ if (EDGE_SUCC (bb, ix)->dest == EXIT_BLOCK_PTR)
+@@ -2131,7 +2138,14 @@
+ jump = BB_END (final_dest_bb);
+ cond = get_condition (jump, &move_before, true, false);
+ if (cond == NULL_RTX)
+- move_before = jump;
++ {
++#ifdef HAVE_cc0
++ if (reg_mentioned_p (cc0_rtx, jump))
++ move_before = prev_nonnote_nondebug_insn (jump);
++ else
++#endif
++ move_before = jump;
++ }
+ }
+
+ do
+Index: gcc/simplify-rtx.c
+===================================================================
+--- gcc/simplify-rtx.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/simplify-rtx.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2777,7 +2777,7 @@
+ }
+ }
+ }
+- else
++ else if (SCALAR_INT_MODE_P (mode))
+ {
+ /* 0/x is 0 (or x&0 if x has side-effects). */
+ if (trueop0 == CONST0_RTX (mode)
+@@ -4177,10 +4177,20 @@
+ {
+ rtx x = XEXP (op0, 0);
+ rtx c = XEXP (op0, 1);
++ enum rtx_code invcode = op0code == PLUS ? MINUS : PLUS;
++ rtx tem = simplify_gen_binary (invcode, cmp_mode, op1, c);
+
+- c = simplify_gen_binary (op0code == PLUS ? MINUS : PLUS,
+- cmp_mode, op1, c);
+- return simplify_gen_relational (code, mode, cmp_mode, x, c);
++ /* Detect an infinite recursive condition, where we oscillate at this
++ simplification case between:
++ A + B == C <---> C - B == A,
++ where A, B, and C are all constants with non-simplifiable expressions,
++ usually SYMBOL_REFs. */
++ if (GET_CODE (tem) == invcode
++ && CONSTANT_P (x)
++ && rtx_equal_p (c, XEXP (tem, 1)))
++ return NULL_RTX;
++
++ return simplify_gen_relational (code, mode, cmp_mode, x, tem);
}
- return index;
--}
-+}
+ /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is
+Index: gcc/tree-sra.c
+===================================================================
+--- gcc/tree-sra.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-sra.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1020,31 +1020,52 @@
+ return false;
+ }
--/* Return true if FIELDSTACK contains fields that overlap.
-+/* Return true if FIELDSTACK contains fields that overlap.
- FIELDSTACK is assumed to be sorted by offset. */
+-/* Return true iff type of EXP is not sufficiently aligned. */
++/* Return true if EXP is a memory reference less aligned than ALIGN. This is
++ invoked only on strict-alignment targets. */
static bool
-@@ -4057,12 +4065,12 @@
- bool hasunion;
- bool is_global = DECL_P (decl) ? is_global_var (decl) : false;
- VEC (fieldoff_s,heap) *fieldstack = NULL;
--
+-tree_non_mode_aligned_mem_p (tree exp)
++tree_non_aligned_mem_p (tree exp, unsigned int align)
+ {
+- enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
+- unsigned int align;
++ unsigned int exp_align;
+
+ if (TREE_CODE (exp) == VIEW_CONVERT_EXPR)
+ exp = TREE_OPERAND (exp, 0);
+
+- if (TREE_CODE (exp) == SSA_NAME
+- || TREE_CODE (exp) == MEM_REF
+- || mode == BLKmode
+- || is_gimple_min_invariant (exp)
+- || !STRICT_ALIGNMENT)
++ if (TREE_CODE (exp) == SSA_NAME || is_gimple_min_invariant (exp))
+ return false;
+
+- align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
+- if (GET_MODE_ALIGNMENT (mode) > align)
++ /* get_object_alignment will fall back to BITS_PER_UNIT if it cannot
++ compute an explicit alignment. Pretend that dereferenced pointers
++ are always aligned on strict-alignment targets. */
++ exp_align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
++ if (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF)
++ exp_align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), exp_align);
+
- if (TREE_CODE (decl) == FUNCTION_DECL && in_ipa_mode)
- return create_function_info_for (decl, name);
++ if (exp_align < align)
+ return true;
- hasunion = TREE_CODE (decltype) == UNION_TYPE
-- || TREE_CODE (decltype) == QUAL_UNION_TYPE;
-+ || TREE_CODE (decltype) == QUAL_UNION_TYPE;
- if (var_can_have_subvars (decl) && use_field_sensitive && !hasunion)
- {
- push_fields_onto_fieldstack (decltype, &fieldstack, 0, &hasunion);
-@@ -4072,12 +4080,12 @@
- notokay = true;
- }
- }
--
+ return false;
+ }
++/* Return true if EXP is a memory reference less aligned than what the access
++ ACC would require. This is invoked only on strict-alignment targets. */
+
- /* If the variable doesn't have subvars, we may end up needing to
- sort the field list and create fake variables for all the
- fields. */
-- vi = new_var_info (decl, index, name, index);
-+ vi = new_var_info (decl, index, name);
- vi->decl = decl;
- vi->offset = 0;
- vi->has_union = hasunion;
-@@ -4095,8 +4103,8 @@
- vi->fullsize = TREE_INT_CST_LOW (declsize);
- vi->size = vi->fullsize;
- }
--
-- insert_id_for_tree (vi->decl, index);
++static bool
++tree_non_aligned_mem_for_access_p (tree exp, struct access *acc)
++{
++ unsigned int acc_align;
++
++ /* The alignment of the access is that of its expression. However, it may
++ have been artificially increased, e.g. by a local alignment promotion,
++ so we cap it to the alignment of the type of the base, on the grounds
++ that valid sub-accesses cannot be more aligned than that. */
++ acc_align = get_object_alignment (acc->expr, BIGGEST_ALIGNMENT);
++ if (acc->base && acc_align > TYPE_ALIGN (TREE_TYPE (acc->base)))
++ acc_align = TYPE_ALIGN (TREE_TYPE (acc->base));
++
++ return tree_non_aligned_mem_p (exp, acc_align);
++}
+
-+ insert_vi_for_tree (vi->decl, vi);
- VEC_safe_push (varinfo_t, heap, varmap, vi);
- if (is_global && (!flag_whole_program || !in_ipa_mode))
+ /* Scan expressions occuring in STMT, create access structures for all accesses
+ to candidates for scalarization and remove those candidates which occur in
+ statements or expressions that prevent them from being split apart. Return
+@@ -1071,7 +1092,8 @@
+ if (lacc)
{
-@@ -4122,9 +4130,9 @@
+ lacc->grp_assignment_write = 1;
+- lacc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (rhs);
++ if (STRICT_ALIGNMENT && tree_non_aligned_mem_for_access_p (rhs, lacc))
++ lacc->grp_unscalarizable_region = 1;
}
- stats.total_vars++;
-- if (use_field_sensitive
-- && !notokay
-- && !vi->is_unknown_size_var
-+ if (use_field_sensitive
-+ && !notokay
-+ && !vi->is_unknown_size_var
- && var_can_have_subvars (decl)
- && VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE)
- {
-@@ -4148,7 +4156,7 @@
- without creating varinfos for the fields anyway, so sorting them is a
- waste to boot. */
- if (!notokay)
-- {
-+ {
- sort_fieldstack (fieldstack);
- /* Due to some C++ FE issues, like PR 22488, we might end up
- what appear to be overlapping fields even though they,
-@@ -4156,8 +4164,8 @@
- we will simply disable field-sensitivity for these cases. */
- notokay = check_for_overlaps (fieldstack);
- }
--
--
-+
-+
- if (VEC_length (fieldoff_s, fieldstack) != 0)
- fo = VEC_index (fieldoff_s, fieldstack, 0);
+ if (racc)
+@@ -1080,7 +1102,8 @@
+ if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
+ && !is_gimple_reg_type (racc->type))
+ bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base));
+- racc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (lhs);
++ if (STRICT_ALIGNMENT && tree_non_aligned_mem_for_access_p (lhs, racc))
++ racc->grp_unscalarizable_region = 1;
+ }
-@@ -4169,11 +4177,11 @@
- VEC_free (fieldoff_s, heap, fieldstack);
- return index;
- }
--
-+
- vi->size = TREE_INT_CST_LOW (fo->size);
- vi->offset = fo->offset;
-- for (i = VEC_length (fieldoff_s, fieldstack) - 1;
-- i >= 1 && VEC_iterate (fieldoff_s, fieldstack, i, fo);
-+ for (i = VEC_length (fieldoff_s, fieldstack) - 1;
-+ i >= 1 && VEC_iterate (fieldoff_s, fieldstack, i, fo);
- i--)
- {
- varinfo_t newvi;
-@@ -4184,15 +4192,15 @@
- if (dump_file)
- {
- if (fo->decl)
-- asprintf (&tempname, "%s.%s",
-+ asprintf (&tempname, "%s.%s",
- vi->name, alias_get_name (fo->decl));
- else
-- asprintf (&tempname, "%s." HOST_WIDE_INT_PRINT_DEC,
-+ asprintf (&tempname, "%s." HOST_WIDE_INT_PRINT_DEC,
- vi->name, fo->offset);
- newname = ggc_strdup (tempname);
- free (tempname);
- }
-- newvi = new_var_info (decl, newindex, newname, newindex);
-+ newvi = new_var_info (decl, newindex, newname);
- newvi->offset = fo->offset;
- newvi->size = TREE_INT_CST_LOW (fo->size);
- newvi->fullsize = vi->fullsize;
-@@ -4228,14 +4236,22 @@
+ if (lacc && racc
+@@ -1435,29 +1458,67 @@
+ return fold_build2_loc (loc, MEM_REF, exp_type, base, off);
+ }
+
++DEF_VEC_ALLOC_P_STACK (tree);
++#define VEC_tree_stack_alloc(alloc) VEC_stack_alloc (tree, alloc)
++
+ /* Construct a memory reference to a part of an aggregate BASE at the given
+- OFFSET and of the same type as MODEL. In case this is a reference to a
+- component, the function will replicate the last COMPONENT_REF of model's
+- expr to access it. GSI and INSERT_AFTER have the same meaning as in
+- build_ref_for_offset. */
++ OFFSET and of the type of MODEL. In case this is a chain of references
++ to component, the function will replicate the chain of COMPONENT_REFs of
++ the expression of MODEL to access it. GSI and INSERT_AFTER have the same
++ meaning as in build_ref_for_offset. */
+
+ static tree
+ build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset,
+ struct access *model, gimple_stmt_iterator *gsi,
+ bool insert_after)
{
- varinfo_t vi = get_varinfo (var);
- unsigned int i;
-- bitmap_iterator bi;
--
-- fprintf (file, "%s = { ", vi->name);
-- EXECUTE_IF_SET_IN_BITMAP (get_varinfo (vi->node)->solution, 0, i, bi)
-+ bitmap_iterator bi;
++ tree type = model->type, t;
++ VEC(tree,stack) *cr_stack = NULL;
+
-+ if (find (var) != var)
+ if (TREE_CODE (model->expr) == COMPONENT_REF)
{
-- fprintf (file, "%s ", get_varinfo (i)->name);
-+ varinfo_t vipt = get_varinfo (find (var));
-+ fprintf (file, "%s = same as %s\n", vi->name, vipt->name);
+- tree t, exp_type, fld = TREE_OPERAND (model->expr, 1);
+- offset -= int_bit_position (fld);
+- exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0));
+- t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after);
+- return fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (fld), t, fld,
+- NULL_TREE);
++ tree expr = model->expr;
++
++ /* Create a stack of the COMPONENT_REFs so later we can walk them in
++ order from inner to outer. */
++ cr_stack = VEC_alloc (tree, stack, 6);
++
++ do {
++ tree field = TREE_OPERAND (expr, 1);
++ HOST_WIDE_INT bit_pos = int_bit_position (field);
++
++ /* We can be called with a model different from the one associated
++ with BASE so we need to avoid going up the chain too far. */
++ if (offset - bit_pos < 0)
++ break;
++
++ offset -= bit_pos;
++ VEC_safe_push (tree, stack, cr_stack, expr);
++
++ expr = TREE_OPERAND (expr, 0);
++ type = TREE_TYPE (expr);
++ } while (TREE_CODE (expr) == COMPONENT_REF);
}
-- fprintf (file, "}\n");
-+ else
+- else
+- return build_ref_for_offset (loc, base, offset, model->type,
+- gsi, insert_after);
++
++ t = build_ref_for_offset (loc, base, offset, type, gsi, insert_after);
++
++ if (TREE_CODE (model->expr) == COMPONENT_REF)
+ {
-+ fprintf (file, "%s = { ", vi->name);
-+ EXECUTE_IF_SET_IN_BITMAP (vi->solution, 0, i, bi)
++ unsigned i;
++ tree expr;
++
++ /* Now replicate the chain of COMPONENT_REFs from inner to outer. */
++ FOR_EACH_VEC_ELT_REVERSE (tree, cr_stack, i, expr)
+ {
-+ fprintf (file, "%s ", get_varinfo (i)->name);
++ tree field = TREE_OPERAND (expr, 1);
++ t = fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (field), t, field,
++ NULL_TREE);
+ }
-+ fprintf (file, "}\n");
++
++ VEC_free (tree, stack, cr_stack);
+ }
++
++ return t;
}
- /* Print the points-to solution for VAR to stdout. */
-@@ -4266,7 +4282,7 @@
- if (!could_have_pointers (t))
- continue;
-
-- arg_id = get_id_for_tree (t);
-+ arg_id = get_vi_for_tree (t)->id;
-
- /* With flag_argument_noalias greater than two means that the incoming
- argument cannot alias anything except for itself so create a HEAP
-@@ -4276,11 +4292,10 @@
- {
- varinfo_t vi;
- tree heapvar = heapvar_lookup (t);
-- unsigned int id;
-
- lhs.offset = 0;
- lhs.type = SCALAR;
-- lhs.var = get_id_for_tree (t);
-+ lhs.var = get_vi_for_tree (t)->id;
-
- if (heapvar == NULL_TREE)
+ /* Construct a memory reference consisting of component_refs and array_refs to
+@@ -2594,6 +2655,10 @@
+ rhs = get_access_replacement (racc);
+ if (!useless_type_conversion_p (lacc->type, racc->type))
+ rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, lacc->type, rhs);
++
++ if (racc->grp_partial_lhs && lacc->grp_partial_lhs)
++ rhs = force_gimple_operand_gsi (old_gsi, rhs, true, NULL_TREE,
++ true, GSI_SAME_STMT);
+ }
+ else
{
-@@ -4291,11 +4306,11 @@
- add_referenced_var (heapvar);
- heapvar_insert (t, heapvar);
+@@ -2609,6 +2674,9 @@
+ else
+ rhs = build_ref_for_model (loc, top_racc->base, offset, lacc,
+ new_gsi, true);
++ if (lacc->grp_partial_lhs)
++ rhs = force_gimple_operand_gsi (new_gsi, rhs, true, NULL_TREE,
++ false, GSI_NEW_STMT);
}
-- id = get_id_for_tree (heapvar);
-- vi = get_varinfo (id);
-+
-+ vi = get_vi_for_tree (heapvar);
- vi->is_artificial_var = 1;
- vi->is_heap_var = 1;
-- rhs.var = id;
-+ rhs.var = vi->id;
- rhs.type = ADDRESSOF;
- rhs.offset = 0;
- for (p = get_varinfo (lhs.var); p; p = p->next)
-@@ -4366,7 +4381,8 @@
- bitmap_set_bit (into, DECL_UID (sv->var));
- }
- else if (TREE_CODE (vi->decl) == VAR_DECL
-- || TREE_CODE (vi->decl) == PARM_DECL)
-+ || TREE_CODE (vi->decl) == PARM_DECL
-+ || TREE_CODE (vi->decl) == RESULT_DECL)
- {
- if (var_can_have_subvars (vi->decl)
- && get_subvars_for_var (vi->decl))
-@@ -4409,8 +4425,8 @@
- bool
- find_what_p_points_to (tree p)
- {
-- unsigned int id = 0;
- tree lookup_p = p;
-+ varinfo_t vi;
-
- if (!have_alias_info)
- return false;
-@@ -4422,10 +4438,10 @@
- && default_def (SSA_NAME_VAR (p)) == p)
- lookup_p = SSA_NAME_VAR (p);
-
-- if (lookup_id_for_tree (lookup_p, &id))
-+ vi = lookup_vi_for_tree (lookup_p);
-+ if (vi)
- {
-- varinfo_t vi = get_varinfo (id);
--
-+
- if (vi->is_artificial_var)
- return false;
-@@ -4447,7 +4463,7 @@
+ stmt = gimple_build_assign (get_access_replacement (lacc), rhs);
+@@ -3604,7 +3672,8 @@
+ || gimple_code (access->stmt) == GIMPLE_ASM))
+ return true;
- /* This variable may have been collapsed, let's get the real
- variable. */
-- vi = get_varinfo (vi->node);
-+ vi = get_varinfo (find (vi->id));
-
- /* Translate artificial variables into SSA_NAME_PTR_INFO
- attributes. */
-@@ -4506,13 +4522,16 @@
- {
- fprintf (outfile, "Stats:\n");
- fprintf (outfile, "Total vars: %d\n", stats.total_vars);
-+ fprintf (outfile, "Non-pointer vars: %d\n",
-+ stats.nonpointer_vars);
- fprintf (outfile, "Statically unified vars: %d\n",
- stats.unified_vars_static);
-- fprintf (outfile, "Collapsed vars: %d\n", stats.collapsed_vars);
- fprintf (outfile, "Dynamically unified vars: %d\n",
- stats.unified_vars_dynamic);
- fprintf (outfile, "Iterations: %d\n", stats.iterations);
- fprintf (outfile, "Number of edges: %d\n", stats.num_edges);
-+ fprintf (outfile, "Number of implicit edges: %d\n",
-+ stats.num_implicit_edges);
- }
+- if (tree_non_mode_aligned_mem_p (access->expr))
++ if (STRICT_ALIGNMENT
++ && tree_non_aligned_mem_p (access->expr, TYPE_ALIGN (access->type)))
+ return true;
- for (i = 0; i < VEC_length (varinfo_t, varmap); i++)
-@@ -4540,8 +4559,8 @@
- /* Create the NULL variable, used to represent that a variable points
- to NULL. */
- nothing_tree = create_tmp_var_raw (void_type_node, "NULL");
-- var_nothing = new_var_info (nothing_tree, 0, "NULL", 0);
-- insert_id_for_tree (nothing_tree, 0);
-+ var_nothing = new_var_info (nothing_tree, 0, "NULL");
-+ insert_vi_for_tree (nothing_tree, var_nothing);
- var_nothing->is_artificial_var = 1;
- var_nothing->offset = 0;
- var_nothing->size = ~0;
-@@ -4553,8 +4572,8 @@
- /* Create the ANYTHING variable, used to represent that a variable
- points to some unknown piece of memory. */
- anything_tree = create_tmp_var_raw (void_type_node, "ANYTHING");
-- var_anything = new_var_info (anything_tree, 1, "ANYTHING", 1);
-- insert_id_for_tree (anything_tree, 1);
-+ var_anything = new_var_info (anything_tree, 1, "ANYTHING");
-+ insert_vi_for_tree (anything_tree, var_anything);
- var_anything->is_artificial_var = 1;
- var_anything->size = ~0;
- var_anything->offset = 0;
-@@ -4573,7 +4592,6 @@
- rhs.type = ADDRESSOF;
- rhs.var = anything_id;
- rhs.offset = 0;
-- var_anything->address_taken = true;
-
- /* This specifically does not use process_constraint because
- process_constraint ignores all anything = anything constraints, since all
-@@ -4583,14 +4601,14 @@
- /* Create the READONLY variable, used to represent that a variable
- points to readonly memory. */
- readonly_tree = create_tmp_var_raw (void_type_node, "READONLY");
-- var_readonly = new_var_info (readonly_tree, 2, "READONLY", 2);
-+ var_readonly = new_var_info (readonly_tree, 2, "READONLY");
- var_readonly->is_artificial_var = 1;
- var_readonly->offset = 0;
- var_readonly->size = ~0;
- var_readonly->fullsize = ~0;
- var_readonly->next = NULL;
- var_readonly->is_special_var = 1;
-- insert_id_for_tree (readonly_tree, 2);
-+ insert_vi_for_tree (readonly_tree, var_readonly);
- readonly_id = 2;
- VEC_safe_push (varinfo_t, heap, varmap, var_readonly);
-
-@@ -4610,8 +4628,8 @@
- /* Create the INTEGER variable, used to represent that a variable points
- to an INTEGER. */
- integer_tree = create_tmp_var_raw (void_type_node, "INTEGER");
-- var_integer = new_var_info (integer_tree, 3, "INTEGER", 3);
-- insert_id_for_tree (integer_tree, 3);
-+ var_integer = new_var_info (integer_tree, 3, "INTEGER");
-+ insert_vi_for_tree (integer_tree, var_integer);
- var_integer->is_artificial_var = 1;
- var_integer->size = ~0;
- var_integer->fullsize = ~0;
-@@ -4634,8 +4652,8 @@
- /* Create the ESCAPED_VARS variable used to represent variables that
- escape this function. */
- escaped_vars_tree = create_tmp_var_raw (void_type_node, "ESCAPED_VARS");
-- var_escaped_vars = new_var_info (escaped_vars_tree, 4, "ESCAPED_VARS", 4);
-- insert_id_for_tree (escaped_vars_tree, 4);
-+ var_escaped_vars = new_var_info (escaped_vars_tree, 4, "ESCAPED_VARS");
-+ insert_vi_for_tree (escaped_vars_tree, var_escaped_vars);
- var_escaped_vars->is_artificial_var = 1;
- var_escaped_vars->size = ~0;
- var_escaped_vars->fullsize = ~0;
-@@ -4660,21 +4678,19 @@
- static void
- init_alias_vars (void)
+ return false;
+Index: gcc/lto/lto.c
+===================================================================
+--- gcc/lto/lto.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto/lto.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -198,7 +198,7 @@
+ uint32_t ix;
+ tree decl;
+ uint32_t i, j;
+-
++
+ ix = *data++;
+ decl = lto_streamer_cache_get (data_in->reader_cache, (int) ix);
+ if (TREE_CODE (decl) != FUNCTION_DECL)
+@@ -241,9 +241,9 @@
+ VEC(ld_plugin_symbol_resolution_t,heap) *resolutions)
{
-- bitmap_obstack_initialize (&ptabitmap_obstack);
-+ bitmap_obstack_initialize (&pta_obstack);
-+ bitmap_obstack_initialize (&oldpta_obstack);
- bitmap_obstack_initialize (&predbitmap_obstack);
-
-- constraint_pool = create_alloc_pool ("Constraint pool",
-+ constraint_pool = create_alloc_pool ("Constraint pool",
- sizeof (struct constraint), 30);
- variable_info_pool = create_alloc_pool ("Variable info pool",
- sizeof (struct variable_info), 30);
-- constraint_edge_pool = create_alloc_pool ("Constraint edges",
-- sizeof (struct constraint_edge), 30);
+ const struct lto_decl_header *header = (const struct lto_decl_header *) data;
+- const int32_t decl_offset = sizeof (struct lto_decl_header);
+- const int32_t main_offset = decl_offset + header->decl_state_size;
+- const int32_t string_offset = main_offset + header->main_size;
++ const int decl_offset = sizeof (struct lto_decl_header);
++ const int main_offset = decl_offset + header->decl_state_size;
++ const int string_offset = main_offset + header->main_size;
+ struct lto_input_block ib_main;
+ struct data_in *data_in;
+ unsigned int i;
+@@ -291,17 +291,20 @@
+
+ if (data_ptr != data_end)
+ internal_error ("bytecode stream: garbage at the end of symbols section");
-
- constraints = VEC_alloc (constraint_t, heap, 8);
- varmap = VEC_alloc (varinfo_t, heap, 8);
-- id_for_tree = htab_create (10, tree_id_hash, tree_id_eq, free);
-+ vi_for_tree = pointer_map_create ();
+
- memset (&stats, 0, sizeof (stats));
--
- init_base_vars ();
- }
+ /* Set the current decl state to be the global state. */
+ decl_data->current_decl_state = decl_data->global_decl_state;
-@@ -4777,6 +4793,43 @@
- VEC_free (ce_s, heap, rhsc);
+ lto_data_in_delete (data_in);
}
+-/* strtoll is not portable. */
+-int64_t
+-lto_parse_hex (const char *p) {
+- uint64_t ret = 0;
++/* Custom version of strtoll, which is not portable. */
+
-+/* Remove the REF and ADDRESS edges from GRAPH, as well as all the
-+ predecessor edges. */
-+
-+static void
-+remove_preds_and_fake_succs (constraint_graph_t graph)
++static HOST_WIDEST_INT
++lto_parse_hex (const char *p)
+{
-+ unsigned int i;
-+
-+ /* Clear the implicit ref and address nodes from the successor
-+ lists. */
-+ for (i = 0; i < FIRST_REF_NODE; i++)
-+ {
-+ if (graph->succs[i])
-+ bitmap_clear_range (graph->succs[i], FIRST_REF_NODE,
-+ FIRST_REF_NODE * 2);
-+ }
-+
-+ /* Free the successor list for the non-ref nodes. */
-+ for (i = FIRST_REF_NODE; i < graph->size; i++)
-+ {
-+ if (graph->succs[i])
-+ BITMAP_FREE (graph->succs[i]);
-+ }
-+
-+ /* Now reallocate the size of the successor list as, and blow away
-+ the predecessor bitmaps. */
-+ graph->size = VEC_length (varinfo_t, varmap);
-+ graph->succs = xrealloc (graph->succs, graph->size * sizeof (bitmap));
++ HOST_WIDEST_INT ret = 0;
+
-+ free (graph->implicit_preds);
-+ graph->implicit_preds = NULL;
-+ free (graph->preds);
-+ graph->preds = NULL;
-+ bitmap_obstack_release (&predbitmap_obstack);
-+}
+ for (; *p != '\0'; ++p)
+ {
+ char c = *p;
+@@ -317,6 +320,7 @@
+ internal_error ("could not parse hex number");
+ ret |= part;
+ }
+
- /* Create points-to sets for the current function. See the comments
- at the start of the file for an algorithmic overview. */
-
-@@ -4784,11 +4837,13 @@
- compute_points_to_sets (struct alias_info *ai)
- {
- basic_block bb;
-+ struct scc_info *si;
+ return ret;
+ }
- timevar_push (TV_TREE_PTA);
+@@ -352,7 +356,7 @@
+ {
+ int t;
+ char offset_p[17];
+- int64_t offset;
++ HOST_WIDEST_INT offset;
+ t = fscanf (resolution, "@0x%16s", offset_p);
+ if (t != 1)
+ internal_error ("could not parse file offset");
+Index: gcc/lto/lto.h
+===================================================================
+--- gcc/lto/lto.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto/lto.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -60,6 +60,4 @@
+ size_t len;
+ };
- init_alias_vars ();
+-int64_t lto_parse_hex (const char *p);
-
-+ init_alias_heapvars ();
-+
- intra_create_variable_infos ();
+ #endif /* LTO_H */
+Index: gcc/lto/ChangeLog
+===================================================================
+--- gcc/lto/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,10 @@
++2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
++
++ * lto.h (lto_parse_hex): Delete.
++ * lto.c (lto_read_decls): Use 'int' for offsets.
++ (lto_parse_hex): Make static and return proper 64-bit host type.
++ (lto_resolution_read): Use proper 64-bit host type.
++
+ 2011-10-26 Release Manager
- /* Now walk all statements and derive aliases. */
-@@ -4824,36 +4879,42 @@
+ * GCC 4.6.2 released.
+Index: gcc/ipa-prop.c
+===================================================================
+--- gcc/ipa-prop.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/ipa-prop.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2868,9 +2868,9 @@
+ {
+ const struct lto_function_header *header =
+ (const struct lto_function_header *) data;
+- const int32_t cfg_offset = sizeof (struct lto_function_header);
+- const int32_t main_offset = cfg_offset + header->cfg_size;
+- const int32_t string_offset = main_offset + header->main_size;
++ const int cfg_offset = sizeof (struct lto_function_header);
++ const int main_offset = cfg_offset + header->cfg_size;
++ const int string_offset = main_offset + header->main_size;
+ struct data_in *data_in;
+ struct lto_input_block ib_main;
+ unsigned int i;
+Index: gcc/po/ChangeLog
+===================================================================
+--- gcc/po/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/po/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-10-30 Joseph Myers <joseph@codesourcery.com>
++
++ * ja.po: Update.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: gcc/po/ja.po
+===================================================================
+--- gcc/po/ja.po (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/po/ja.po (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -20,7 +20,7 @@
+ "Project-Id-Version: gcc 4.6.1\n"
+ "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
+ "POT-Creation-Date: 2011-06-21 10:27+0000\n"
+-"PO-Revision-Date: 2011-10-25 22:36+0900\n"
++"PO-Revision-Date: 2011-10-30 18:48+0900\n"
+ "Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
+ "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
+ "Language: ja\n"
+@@ -834,12 +834,12 @@
+ #: gcov.c:420
+ #, c-format
+ msgid " -a, --all-blocks Show information for every basic block\n"
+-msgstr ""
++msgstr " -a, --all-blocks 各基本ブロックに関する情報を表示する\n"
+
+ #: gcov.c:421
+ #, c-format
+ msgid " -b, --branch-probabilities Include branch probabilities in output\n"
+-msgstr ""
++msgstr " -b, --branch-probabilities 出力に分岐可能性情報を含める\n"
+
+ #: gcov.c:422
+ #, c-format
+@@ -847,6 +847,8 @@
+ " -c, --branch-counts Given counts of branches taken\n"
+ " rather than percentages\n"
+ msgstr ""
++" -c, --branch-counts 分岐に関する百分率では無く行われた\n"
++" 回数を取得する\n"
+
+ #: gcov.c:424
+ #, c-format
+@@ -859,21 +861,23 @@
+ " -l, --long-file-names Use long output file names for included\n"
+ " source files\n"
+ msgstr ""
++" -l, --long-file-names インクルードされたソースファイルに関する長い\n"
++" 出力ファイル名を使用する\n"
+
+ #: gcov.c:427
+ #, c-format
+ msgid " -f, --function-summaries Output summaries for each function\n"
+-msgstr ""
++msgstr " -f, --function-summaries 各関数に関する要約を出力する\n"
+
+ #: gcov.c:428
+ #, c-format
+ msgid " -o, --object-directory DIR|FILE Search for object files in DIR or called FILE\n"
+-msgstr ""
++msgstr " -o, --object-directory DIR|FILE オブジェクトファイルを DIR 内または呼び出し用 FILE 内で検索する\n"
+
+ #: gcov.c:429
+ #, c-format
+ msgid " -p, --preserve-paths Preserve all pathname components\n"
+-msgstr ""
++msgstr " -p, --preserve-paths すべてのパス名要素を保護する\n"
+
+ #: gcov.c:430
+ #, c-format
+@@ -977,7 +981,7 @@
+ #: gcov.c:1045
+ #, c-format
+ msgid "%s:cannot open data file, assuming not executed\n"
+-msgstr ""
++msgstr "%s:データファイルを開けません。実行されていないと見なします\n"
+
+ #: gcov.c:1052
+ #, c-format
+@@ -1027,7 +1031,7 @@
+ #: gcov.c:1379
+ #, c-format
+ msgid "%s:graph is unsolvable for '%s'\n"
+-msgstr ""
++msgstr "%s: '%s' 用のグラフが解決できません\n"
+
+ #: gcov.c:1459
+ #, c-format
+@@ -1037,7 +1041,7 @@
+ #: gcov.c:1462
+ #, c-format
+ msgid "Lines executed:%s of %d\n"
+-msgstr ""
++msgstr "実行された行:%s of %d\n"
+
+ #: gcov.c:1466
+ #, c-format
+@@ -1047,7 +1051,7 @@
+ #: gcov.c:1472
+ #, c-format
+ msgid "Branches executed:%s of %d\n"
+-msgstr ""
++msgstr "実行された分岐:%s of %d\n"
+
+ #: gcov.c:1476
+ #, c-format
+@@ -1057,12 +1061,12 @@
+ #: gcov.c:1482
+ #, c-format
+ msgid "No branches\n"
+-msgstr ""
++msgstr "分岐がありません\n"
+
+ #: gcov.c:1484
+ #, c-format
+ msgid "Calls executed:%s of %d\n"
+-msgstr ""
++msgstr "実行された呼び出し:%s of %d\n"
+
+ #: gcov.c:1488
+ #, c-format
+@@ -1075,24 +1079,24 @@
+ msgstr "%s: '%s' に対する行がありません\n"
+
+ #: gcov.c:1843
+-#, fuzzy, c-format
++#, c-format
+ msgid "call %2d returned %s\n"
+-msgstr "呼び出し %d の戻り = %d\n"
++msgstr ""
+
+ #: gcov.c:1848
+-#, fuzzy, c-format
++#, c-format
+ msgid "call %2d never executed\n"
+-msgstr "呼び出し %d は一度も実行せず\n"
++msgstr ""
+
+ #: gcov.c:1853
+-#, fuzzy, c-format
++#, c-format
+ msgid "branch %2d taken %s%s\n"
+-msgstr "ブランチ %d 受理 = %d%%\n"
++msgstr ""
+
+ #: gcov.c:1857
+-#, fuzzy, c-format
++#, c-format
+ msgid "branch %2d never executed\n"
+-msgstr "ブランチ %d は一度も実行されず\n"
++msgstr ""
+
+ #: gcov.c:1862
+ #, c-format
+@@ -1100,9 +1104,9 @@
+ msgstr ""
+
+ #: gcov.c:1865
+-#, fuzzy, c-format
++#, c-format
+ msgid "unconditional %2d never executed\n"
+-msgstr "呼び出し %d は一度も実行せず\n"
++msgstr ""
+
+ #: gcov.c:1901
+ #, c-format
+@@ -1412,11 +1416,11 @@
+
+ #: opts.c:1183
+ msgid "The following options take separate arguments"
+-msgstr ""
++msgstr "次のオプションは分離した引数を取ります"
+
+ #: opts.c:1185
+ msgid "The following options take joined arguments"
+-msgstr ""
++msgstr "次のオプションは結合した引数を取ります"
+
+ #: opts.c:1196
+ msgid "The following options are language-related"
+@@ -1472,7 +1476,7 @@
+ #: targhooks.c:1469
+ #, c-format
+ msgid "created and used with differing settings of '%s'"
+-msgstr ""
++msgstr "作成時と使用時で '%s' の設定が異なります"
+
+ #: targhooks.c:1471
+ msgid "out of memory"
+@@ -1480,11 +1484,11 @@
+
+ #: targhooks.c:1486
+ msgid "created and used with different settings of -fpic"
+-msgstr ""
++msgstr "作成時と使用時で -fpic の設定が異なります"
+
+ #: targhooks.c:1488
+ msgid "created and used with different settings of -fpie"
+-msgstr ""
++msgstr "作成時と使用時で -fpie の設定が異なります"
+
+ #: tlink.c:386
+ #, c-format
+@@ -1717,11 +1721,11 @@
+
+ #: params.def:100
+ msgid "The maximum depth of recursive inlining for inline functions"
+-msgstr ""
++msgstr "インライン関数を再帰的にインライン化する時の最大深度"
+
+ #: params.def:105
+ msgid "The maximum depth of recursive inlining for non-inline functions"
+-msgstr ""
++msgstr "非インライン関数を再帰的にインライン化する時の最大深度"
+
+ #: params.def:110
+ msgid "Inline recursively only when the probability of call being executed exceeds the parameter"
+@@ -1761,16 +1765,15 @@
+
+ #: params.def:180
+ msgid "The size of function body to be considered large"
+-msgstr ""
++msgstr "大きいと見なされる関数本体のサイズ"
+
+ #: params.def:184
+ msgid "Maximal growth due to inlining of large function (in percent)"
+ msgstr ""
+
+ #: params.def:188
+-#, fuzzy
+ msgid "The size of translation unit to be considered large"
+-msgstr "翻訳単位全体をファイルにダンプする"
++msgstr "大きいと見なされる翻訳単位のサイズ"
+
+ #: params.def:192
+ msgid "How much can given compilation unit grow because of the inlining (in percent)"
+@@ -1786,20 +1789,19 @@
+
+ #: params.def:204
+ msgid "The size of stack frame to be considered large"
+-msgstr ""
++msgstr "大きいと見なされるスタックフレームのサイズ"
+
+ #: params.def:208
+ msgid "Maximal stack frame growth due to inlining (in percent)"
+-msgstr ""
++msgstr "インライン化によって増加するスタックフレームの最大量 (百分率)"
+
+ #: params.def:215
+ msgid "The maximum amount of memory to be allocated by GCSE"
+-msgstr ""
++msgstr "GCSE によって配置されるメモリの最大量"
+
+ #: params.def:222
+-#, fuzzy
+ msgid "The maximum ratio of insertions to deletions of expressions in GCSE"
+-msgstr "RPTS 用の最大反復数を指定する"
++msgstr ""
+
+ #: params.def:233
+ msgid "The threshold ratio for performing partial redundancy elimination after reload"
+@@ -1963,9 +1965,8 @@
+ msgstr ""
+
+ #: params.def:470
+-#, fuzzy
+ msgid "Bound on number of iv uses in loop optimized in iv optimizations"
+-msgstr "目立たない、コストのかかる最適化を行なう"
++msgstr ""
+
+ #: params.def:478
+ msgid "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization"
+@@ -2044,9 +2045,8 @@
+ msgstr ""
+
+ #: params.def:594
+-#, fuzzy
+ msgid "The maximum number of iterations through CFG to extend regions"
+-msgstr "RPTS 用の最大反復数を指定する"
++msgstr ""
+
+ #: params.def:599
+ msgid "The maximum conflict delay for an insn to be considered for speculative motion"
+@@ -2077,9 +2077,8 @@
+ msgstr ""
+
+ #: params.def:637
+-#, fuzzy
+ msgid "The upper bound for sharing integer constants"
+-msgstr "`%s' の列挙値が整数定数ではありません"
++msgstr "整数定数を共有するための上限値"
+
+ #: params.def:656
+ msgid "Minimum number of virtual mappings to consider switching to full virtual renames"
+@@ -2111,11 +2110,11 @@
+
+ #: params.def:714
+ msgid "The number of insns executed before prefetch is completed"
+-msgstr ""
++msgstr "プリフェッチが完了する前に実行される命令数"
+
+ #: params.def:721
+ msgid "The number of prefetches that can run at the same time"
+-msgstr ""
++msgstr "同時に実行可能なプリフェッチの数"
+
+ #: params.def:728
+ msgid "The size of L1 cache"
+@@ -2162,9 +2161,8 @@
+ msgstr ""
+
+ #: params.def:806
+-#, fuzzy
+ msgid "maximum number of parameters in a SCoP"
+-msgstr "RPTS 用の最大反復数を指定する"
++msgstr "SCoP 内のパラメータの最大数"
+
+ #: params.def:813
+ msgid "maximum number of basic blocks per function to be analyzed by Graphite"
+@@ -2597,9 +2595,9 @@
+ msgstr "無効な %%E 値"
+
+ #: config/alpha/alpha.c:5431 config/alpha/alpha.c:5479
+-#, fuzzy, c-format
++#, c-format
+ msgid "unknown relocation unspec"
+-msgstr "不明な設定済コンストラクタ型です"
++msgstr ""
+
+ #: config/alpha/alpha.c:5440 config/crx/crx.c:1119
+ #: config/rs6000/rs6000.c:16490 config/spu/spu.c:1726
+@@ -3000,32 +2998,32 @@
+ #: config/i386/i386.c:14106 config/i386/i386.c:14146
+ #, c-format
+ msgid "operand is not a condition code, invalid operand code 'D'"
+-msgstr ""
++msgstr "被演算子は条件コードではありません。無効な被演算子コード 'D' です"
+
+ #: config/i386/i386.c:14172
+ #, c-format
+ msgid "operand is neither a constant nor a condition code, invalid operand code 'C'"
+-msgstr ""
++msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'C' です"
+
+ #: config/i386/i386.c:14182
+ #, c-format
+ msgid "operand is neither a constant nor a condition code, invalid operand code 'F'"
+-msgstr ""
++msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'F' です"
+
+ #: config/i386/i386.c:14200
+ #, c-format
+ msgid "operand is neither a constant nor a condition code, invalid operand code 'c'"
+-msgstr ""
++msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'c' です"
+
+ #: config/i386/i386.c:14210
+ #, c-format
+ msgid "operand is neither a constant nor a condition code, invalid operand code 'f'"
+-msgstr ""
++msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'f' です"
+
+ #: config/i386/i386.c:14313
+ #, c-format
+ msgid "operand is not a condition code, invalid operand code 'Y'"
+-msgstr ""
++msgstr "被演算子は条件コードではありません。無効な被演算子コード 'Y' です"
+
+ #: config/i386/i386.c:14339
+ #, c-format
+@@ -3098,7 +3096,7 @@
+ #: config/lm32/lm32.c:529
+ #, c-format
+ msgid "only 0.0 can be loaded as an immediate"
+-msgstr ""
++msgstr "即値としてロードできるのは 0.0 のみです"
+
+ #: config/lm32/lm32.c:599
+ msgid "bad operand"
+@@ -3138,15 +3136,15 @@
+
+ #: config/m32r/m32r.c:2290
+ msgid "pre-increment address is not a register"
+-msgstr ""
++msgstr "前置増分アドレスがレジスタではありません"
+
+ #: config/m32r/m32r.c:2297
+ msgid "pre-decrement address is not a register"
+-msgstr ""
++msgstr "前置減分アドレスがレジスタではありません"
+
+ #: config/m32r/m32r.c:2304
+ msgid "post-increment address is not a register"
+-msgstr ""
++msgstr "後置増分アドレスがレジスタではありません"
+
+ #: config/m32r/m32r.c:2380 config/m32r/m32r.c:2394
+ #: config/rs6000/rs6000.c:25500
+@@ -3252,7 +3250,7 @@
+
+ #: config/mmix/mmix.c:1589 config/mmix/mmix.c:1719
+ msgid "MMIX Internal: Expected a CONST_INT, not this"
+-msgstr ""
++msgstr "MMIX 内部: CONST_INT が予期されますが、異なっています"
+
+ #: config/mmix/mmix.c:1668
+ msgid "MMIX Internal: Bad value for 'm', not a CONST_INT"
+@@ -3260,11 +3258,11 @@
+
+ #: config/mmix/mmix.c:1687
+ msgid "MMIX Internal: Expected a register, not this"
+-msgstr ""
++msgstr "MMIX 内部: レジスタが予期されますが、異なっています"
+
+ #: config/mmix/mmix.c:1697
+ msgid "MMIX Internal: Expected a constant, not this"
+-msgstr ""
++msgstr "MMIX 内部: 定数が予期されますが、異なっています"
+
+ #. We need the original here.
+ #: config/mmix/mmix.c:1781
+@@ -3301,7 +3299,7 @@
+
+ #: config/picochip/picochip.c:2983 config/picochip/picochip.c:3015
+ msgid "Bad address, not (reg+disp):"
+-msgstr ""
++msgstr "誤ったアドレスです。 (reg+disp) ではありません:"
+
+ #: config/picochip/picochip.c:3029
+ msgid "Bad address, not register:"
+@@ -3526,15 +3524,15 @@
+
+ #: config/sh/sh.c:9271
+ msgid "created and used with different architectures / ABIs"
+-msgstr ""
++msgstr "作成時と使用時で アーキテクチャ/ABI が異なります"
+
+ #: config/sh/sh.c:9273
+ msgid "created and used with different ABIs"
+-msgstr ""
++msgstr "作成時と使用時で ABI が異なります"
+
+ #: config/sh/sh.c:9275
+ msgid "created and used with different endianness"
+-msgstr ""
++msgstr "作成時と使用時でエンディアンが異なります"
+
+ #: config/sparc/sparc.c:7445 config/sparc/sparc.c:7451
+ #, c-format
+@@ -3617,7 +3615,7 @@
+ #: config/vax/vax.c:427
+ #, c-format
+ msgid "symbol with offset used in PIC mode"
+-msgstr ""
++msgstr "PIC モードで使用されるオフセット付きのシンボルです"
+
+ #: config/vax/vax.c:513
+ #, c-format
+@@ -3837,19 +3835,19 @@
+ msgstr "%s:%d:%d: ここから再帰的に実体化されました"
+
+ #: cp/error.c:2913
+-#, fuzzy, c-format
++#, c-format
+ msgid "%s:%d:%d: instantiated from here"
+ msgstr "%s:%d:%d: ここから実体化されました"
+
+ #: cp/error.c:2918
+ #, c-format
+ msgid "%s:%d: recursively instantiated from here"
+-msgstr ""
++msgstr "%s:%d: ここから再帰的に実体化されました"
+
+ #: cp/error.c:2919
+-#, fuzzy, c-format
++#, c-format
+ msgid "%s:%d: instantiated from here"
+-msgstr "%s:%d: ここで実体化されました\n"
++msgstr "%s:%d: ここから実体化されました"
+
+ #: cp/error.c:2962
+ #, c-format
+@@ -4029,22 +4027,21 @@
+ #: fortran/expr.c:607
+ #, c-format
+ msgid "Constant expression required at %C"
+-msgstr ""
++msgstr "%C では定数式が要求されます"
+
+ #: fortran/expr.c:610
+ #, c-format
+ msgid "Integer expression required at %C"
+-msgstr ""
++msgstr "%C では整数式が要求されます"
+
+ #: fortran/expr.c:615
+-#, fuzzy, c-format
++#, c-format
+ msgid "Integer value too large in expression at %C"
+-msgstr "式の整数がオーバーフローしました"
++msgstr "%C の式内で整数値が大きすぎます"
+
+ #: fortran/expr.c:3147
+-#, fuzzy
+ msgid "array assignment"
+-msgstr "代入"
++msgstr "配列代入"
+
+ #: fortran/gfortranspec.c:303
+ #, c-format
+@@ -4080,7 +4077,7 @@
+
+ #: fortran/io.c:551
+ msgid "Unexpected element '%c' in format string at %L"
+-msgstr ""
++msgstr "予期しない要素 '%c' が書式文字列内 (位置 %L) にあります"
+
+ #: fortran/io.c:553
+ msgid "Unexpected end of format string"
+@@ -4088,15 +4085,15 @@
+
+ #: fortran/io.c:554
+ msgid "Zero width in format descriptor"
+-msgstr ""
++msgstr "幅 0 の書式記述子です"
+
+ #: fortran/io.c:574
+ msgid "Missing leading left parenthesis"
+-msgstr ""
++msgstr "前に左小括弧がありません"
+
+ #: fortran/io.c:603
+ msgid "Left parenthesis required after '*'"
+-msgstr ""
++msgstr "'*' の後には左小括弧が必要です"
+
+ #: fortran/io.c:634
+ msgid "Expected P edit descriptor"
+@@ -4116,9 +4113,8 @@
+ msgstr ""
+
+ #: fortran/io.c:844
+-#, fuzzy
+ msgid "E specifier not allowed with g0 descriptor"
+-msgstr "型指定子 `%s' は struct や class の後には使えません"
++msgstr ""
+
+ #: fortran/io.c:914
+ msgid "Positive exponent width required"
+@@ -4362,9 +4358,8 @@
+ msgstr ""
+
+ #: fortran/resolve.c:6233
+-#, fuzzy
+ msgid "End expression in DO loop"
+-msgstr "オペランドとして無効な式"
++msgstr ""
+
+ #: fortran/resolve.c:6237
+ msgid "Step expression in DO loop"
+@@ -4564,7 +4559,7 @@
+ #: java/jcf-dump.c:1148
+ #, c-format
+ msgid " --extdirs PATH Set extensions directory path\n"
+-msgstr ""
++msgstr " --extdirs PATH 拡張のディレクトリパスを設定する\n"
+
+ #: java/jcf-dump.c:1149
+ #, c-format
+@@ -4734,18 +4729,18 @@
+ #: config/pa/pa-hpux11.h:111 config/pa/pa64-hpux.h:30 config/pa/pa64-hpux.h:33
+ #: config/pa/pa64-hpux.h:42 config/pa/pa64-hpux.h:45
+ msgid "warning: consider linking with '-static' as system libraries with"
+-msgstr ""
++msgstr "警告: システムライブラリとリンクする時は '-static' を指定することを検討してください"
+
+ #: config/pa/pa-hpux10.h:90 config/pa/pa-hpux10.h:93 config/pa/pa-hpux10.h:101
+ #: config/pa/pa-hpux10.h:104 config/pa/pa-hpux11.h:109
+ #: config/pa/pa-hpux11.h:112 config/pa/pa64-hpux.h:31 config/pa/pa64-hpux.h:34
+ #: config/pa/pa64-hpux.h:43 config/pa/pa64-hpux.h:46
+ msgid " profiling support are only provided in archive format"
+-msgstr ""
++msgstr " プロファイリングサポートは書庫フォーマット内でのみ提供されます"
+
+ #: config/rs6000/darwin.h:99
+ msgid " conflicting code gen style switches are used"
+-msgstr ""
++msgstr " 競合しているコード生成スタイルスイッチが使用されています"
+
+ #: config/arm/arm.h:178
+ msgid "-msoft-float and -mhard_float may not be used together"
+@@ -4805,7 +4800,7 @@
+
+ #: config/i386/linux-unwind.h:186
+ msgid "ax ; {int $0x80 | syscall"
+-msgstr ""
++msgstr "ax ; {int $0x80 | syscall"
+
+ #: config/s390/tpf.h:120
+ msgid "static is not supported on TPF-OS"
+@@ -4869,7 +4864,7 @@
+
+ #: java/lang.opt:206
+ msgid "--extdirs=<path>\tSet the extension directory path"
+-msgstr ""
++msgstr "--extdirs=<path>\t拡張のディレクトリパスを設定する"
+
+ #: java/lang.opt:216
+ msgid "Input file is a file with a list of filenames to compile"
+@@ -5388,7 +5383,7 @@
+
+ #: config/frv/frv.opt:31
+ msgid "Enable label alignment optimizations"
+-msgstr ""
++msgstr "ラベル整列最適化を有効にする"
+
+ #: config/frv/frv.opt:35
+ msgid "Dynamically allocate cc registers"
+@@ -5452,7 +5447,7 @@
+
+ #: config/frv/frv.opt:116
+ msgid "Enable use of GPREL for read-only data in FDPIC"
+-msgstr ""
++msgstr "FDPIC 内の読み取り専用データ用 GPREL の使用を有効にする"
+
+ #: config/frv/frv.opt:120 config/rs6000/rs6000.opt:216
+ #: config/pdp11/pdp11.opt:67
+@@ -5460,9 +5455,8 @@
+ msgstr "ハードウェア浮動小数点を利用する"
+
+ #: config/frv/frv.opt:124 config/bfin/bfin.opt:77
+-#, fuzzy
+ msgid "Enable inlining of PLT in function calls"
+-msgstr "関数呼び出しの前後でレジスタの保存を有効にする"
++msgstr "関数呼び出し内で PLT のインライン化を有効にする"
+
+ #: config/frv/frv.opt:128
+ msgid "Enable PIC support for building libraries"
+@@ -5478,7 +5472,7 @@
+
+ #: config/frv/frv.opt:140
+ msgid "Use media instructions"
+-msgstr ""
++msgstr "media 命令を使用する"
+
+ #: config/frv/frv.opt:144
+ msgid "Use multiply add/subtract instructions"
+@@ -5494,7 +5488,7 @@
+
+ #: config/frv/frv.opt:157
+ msgid "Do not mark ABI switches in e_flags"
+-msgstr ""
++msgstr "e_flags 内の ABI スイッチをマークしない"
+
+ #: config/frv/frv.opt:161
+ msgid "Remove redundant membars"
+@@ -5506,7 +5500,7 @@
+
+ #: config/frv/frv.opt:169
+ msgid "Enable setting GPRs to the result of comparisons"
+-msgstr ""
++msgstr "比較結果を汎用レジスタに設定することを有効にする"
+
+ #: config/frv/frv.opt:173
+ msgid "Change the amount of scheduler lookahead"
+@@ -5565,9 +5559,8 @@
+ msgstr ""
+
+ #: config/mn10300/mn10300.opt:56
+-#, fuzzy
+ msgid "Allow gcc to generate LIW instructions"
+-msgstr "gcc が repeat/erepeat 命令を使用することを許可する"
++msgstr "gcc が LIW 命令を生成することを許可する"
+
+ #: config/s390/tpf.opt:23
+ msgid "Enable TPF-OS tracing code"
+@@ -5640,11 +5633,11 @@
+
+ #: config/s390/s390.opt:91
+ msgid "Warn if a function uses alloca or creates an array with dynamic size"
+-msgstr ""
++msgstr "関数で alloca を使用するか、または動的サイズの配列を作成した場合に、警告する"
+
+ #: config/s390/s390.opt:95
+ msgid "Warn if a single function's framesize exceeds the given framesize"
+-msgstr ""
++msgstr "一つの関数のフレームサイズが与えられたフレームサイズを超過する場合に警告する"
+
+ #: config/s390/s390.opt:99
+ msgid "z/Architecture"
+@@ -5692,7 +5685,7 @@
+
+ #: config/ia64/ia64.opt:56
+ msgid "gp is constant (but save/restore gp on indirect calls)"
+-msgstr "gp を定数とする(但、間接呼び出しでは gp を save/restore する)"
++msgstr "gp を定数とする(ただし、間接呼び出しでは gp を save/restore する)"
+
+ #: config/ia64/ia64.opt:60
+ msgid "Generate self-relocatable code"
+@@ -5741,39 +5734,39 @@
+ #: config/ia64/ia64.opt:107 config/spu/spu.opt:72 config/sh/sh.opt:258
+ #: config/pa/pa.opt:51
+ msgid "Specify range of registers to make fixed"
+-msgstr ""
++msgstr "固定するレジスタの範囲を指定する"
+
+ #: config/ia64/ia64.opt:119
+ msgid "Use data speculation before reload"
+-msgstr ""
++msgstr "reload 前にデータ投機を使用する"
+
+ #: config/ia64/ia64.opt:123
+ msgid "Use data speculation after reload"
+-msgstr ""
++msgstr "reload 後にデータ投機を使用する"
+
+ #: config/ia64/ia64.opt:127
+ msgid "Use control speculation"
+-msgstr ""
++msgstr "制御投機を使用する"
+
+ #: config/ia64/ia64.opt:131
+ msgid "Use in block data speculation before reload"
+-msgstr ""
++msgstr "reload 前にブロック内データ投機を使用する"
+
+ #: config/ia64/ia64.opt:135
+ msgid "Use in block data speculation after reload"
+-msgstr ""
++msgstr "reload 後にブロック内データ投機を使用する"
+
+ #: config/ia64/ia64.opt:139
+ msgid "Use in block control speculation"
+-msgstr ""
++msgstr "ブロック内制御投機を使用する"
+
+ #: config/ia64/ia64.opt:143
+ msgid "Use simple data speculation check"
+-msgstr ""
++msgstr "単純データ投機検査を使用する"
+
+ #: config/ia64/ia64.opt:147
+ msgid "Use simple data speculation check for control speculation"
+-msgstr ""
++msgstr "制御投機用の単純データ投機検査を使用する"
+
+ #: config/ia64/ia64.opt:151
+ msgid "If set, data speculative instructions will be chosen for schedule only if there are no other choices at the moment "
+@@ -5789,7 +5782,7 @@
+
+ #: config/ia64/ia64.opt:163
+ msgid "Place a stop bit after every cycle when scheduling"
+-msgstr ""
++msgstr "スケジューリング時の各サイクル後にストップビットを配置する"
+
+ #: config/ia64/ia64.opt:167
+ msgid "Assume that floating-point stores and loads are not likely to cause conflict when placed into one instruction group"
+@@ -5805,7 +5798,7 @@
+
+ #: config/ia64/ia64.opt:179
+ msgid "Don't generate checks for control speculation in selective scheduling"
+-msgstr ""
++msgstr "選択的スケジューリング内では制御投機用の検査を生成しない"
+
+ #: config/ia64/vms_symvec_libgcc_s.opt:3
+ msgid "! It would be better to auto-generate this file."
+@@ -6109,7 +6102,7 @@
+
+ #: config/m68k/m68k.opt:160 config/bfin/bfin.opt:61
+ msgid "Enable separate data segment"
+-msgstr ""
++msgstr "分離データセグメントを有効にする"
+
+ #: config/m68k/m68k.opt:164 config/bfin/bfin.opt:57
+ msgid "ID of shared library to build"
+@@ -6149,7 +6142,7 @@
+
+ #: config/i386/mingw.opt:23
+ msgid "Warn about none ISO msvcrt scanf/printf width extensions"
+-msgstr ""
++msgstr "非 ISO の msvcrt scanf/printf の幅拡張に関して警告する"
+
+ #: config/i386/mingw.opt:27
+ msgid "For nested functions on stack executable permission is set."
+@@ -6201,7 +6194,7 @@
+
+ #: config/i386/i386.opt:114
+ msgid "Data greater than given threshold will go into .ldata section in x86-64 medium model"
+-msgstr ""
++msgstr "x86-64 メディアモデルでは与えられた閾値より大きいデータを .ldata セクションに配置する"
+
+ #: config/i386/i386.opt:118
+ msgid "Use given x86-64 code model"
+@@ -6217,16 +6210,15 @@
+
+ #: config/i386/i386.opt:129
+ msgid "Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack"
+-msgstr ""
++msgstr "スタックを再整列するために動的再整列引数ポインタ (Dynamic Realigned Argument Pointer, DRAP) を常に使用する"
+
+ #: config/i386/i386.opt:133
+ msgid "Return values of functions in FPU registers"
+ msgstr "FPU レジスタ内の機能の値を返す"
+
+ #: config/i386/i386.opt:137
+-#, fuzzy
+ msgid "Generate floating point mathematics using given instruction set"
+-msgstr "ハードウェア浮動小数点命令を使用する"
++msgstr "与えられた命令集合を使用して浮動小数数値計算を生成する"
+
+ #: config/i386/i386.opt:149
+ msgid "Inline all known string operations"
+@@ -6314,8 +6306,9 @@
+ msgstr "8 バイトベクトルをメモリに返す"
+
+ #: config/i386/i386.opt:253
++#, fuzzy
+ msgid "Generate reciprocals instead of divss and sqrtss."
+-msgstr ""
++msgstr "divss および sqrtss の代わりに逆数 (reciprocal) を生成する"
+
+ #: config/i386/i386.opt:257
+ msgid "Generate cld instruction in the function prologue."
+@@ -6331,7 +6324,7 @@
+
+ #: config/i386/i386.opt:271
+ msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer."
+-msgstr ""
++msgstr "自動ベクトル化で 256 ビット AVX 命令の代わりに 128 ビット AVX 命令を使用する"
+
+ #: config/i386/i386.opt:277
+ msgid "Generate 32bit i386 code"
+@@ -6382,9 +6375,8 @@
+ msgstr "SSE4.1 と SSE4.2 の組み込み関数とコード生成をサポートしない"
+
+ #: config/i386/i386.opt:328
+-#, fuzzy
+ msgid "%<-msse5%> was removed"
+-msgstr "'-msse5' は削除されました"
++msgstr "%<-msse5%> は削除されました"
+
+ #: config/i386/i386.opt:333
+ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation"
+@@ -6544,7 +6536,7 @@
+
+ #: config/rs6000/rs6000.opt:152
+ msgid "Use PowerPC General Purpose group optional instructions"
+-msgstr "PowerPC 一般用途グループオプション命令を使用する"
++msgstr "PowerPC 汎用グループオプション命令を使用する"
+
+ #: config/rs6000/rs6000.opt:156
+ msgid "Use PowerPC Graphics group optional instructions"
+@@ -7002,7 +6994,7 @@
+
+ #: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27
+ msgid "Assume that run-time support has been provided, so omit -lsim from the linker command line"
+-msgstr ""
++msgstr "実行時サポートが提供されると見なし、リンカコマンドラインに -lsim を含めない"
+
+ #: config/mcore/mcore.opt:60
+ msgid "Use arbitrary sized immediates in bit operations"
+@@ -7014,7 +7006,7 @@
+
+ #: config/mcore/mcore.opt:71
+ msgid "Set the maximum amount for a single stack increment operation"
+-msgstr "単一のスタックインクリメント操作の最大値を設定する"
++msgstr "単一のスタック増分操作の最大値を設定する"
+
+ #: config/mcore/mcore.opt:75
+ msgid "Always treat bitfields as int-sized"
+@@ -7234,7 +7226,7 @@
+
+ #: config/sh/sh.opt:246
+ msgid "Division strategy, one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table"
+-msgstr ""
++msgstr "除算戦略、次のいずれか: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table"
+
+ #: config/sh/sh.opt:250
+ msgid "Specify name for 32 bit signed division function"
+@@ -7282,7 +7274,7 @@
+
+ #: config/sh/sh.opt:298
+ msgid "Mark MAC register as call-clobbered"
+-msgstr ""
++msgstr "MAC レジスタを呼び出しで破壊されるとマークする"
+
+ #: config/sh/sh.opt:304
+ msgid "Make structs a multiple of 4 bytes (warning: ABI altered)"
+@@ -7960,7 +7952,7 @@
+
+ #: config/m68hc11/m68hc11.opt:49
+ msgid "Auto pre/post decrement increment allowed"
+-msgstr "自動 pre/post デクリメント インクリメントを許容する"
++msgstr "自動 前置/後置 減分/増分 を許容する"
+
+ #: config/m68hc11/m68hc11.opt:53
+ msgid "Min/max instructions allowed"
+@@ -7972,7 +7964,7 @@
+
+ #: config/m68hc11/m68hc11.opt:61
+ msgid "Auto pre/post decrement increment not allowed"
+-msgstr "自動 pre/post デクリメント インクリメントを許容しない"
++msgstr "自動 前置/後置 減分/増分を許容しない"
+
+ #: config/m68hc11/m68hc11.opt:65
+ msgid "Use jsr and rts for function calls and returns"
+@@ -8346,7 +8338,7 @@
+
+ #: config/bfin/bfin.opt:69
+ msgid "Link with the fast floating-point library"
+-msgstr ""
++msgstr "高速な浮動小数ライブラリとリンクする"
+
+ #: config/bfin/bfin.opt:81
+ msgid "Do stack checking using bounds in L1 scratch memory"
+@@ -8382,7 +8374,7 @@
+
+ #: config/picochip/picochip.opt:31
+ msgid "Specify whether the byte access instructions should be used. Enabled by default."
+-msgstr ""
++msgstr "バイトアクセス命令を使用するかどうかを指定する。デフォルトでは有効となる"
+
+ #: config/picochip/picochip.opt:35
+ msgid "Enable debug output to be generated."
+@@ -8390,11 +8382,11 @@
+
+ #: config/picochip/picochip.opt:39
+ msgid "Allow a symbol value to be used as an immediate value in an instruction."
+-msgstr ""
++msgstr "命令内でシンボル値が即値として使用されることを許可する"
+
+ #: config/picochip/picochip.opt:43
+ msgid "Generate warnings when inefficient code is known to be generated."
+-msgstr ""
++msgstr "非効率なコードが生成された時に警告する"
+
+ #: config/vxworks.opt:36
+ msgid "Assume the VxWorks RTP environment"
+@@ -8418,7 +8410,7 @@
+
+ #: config/darwin.opt:205
+ msgid "Warn if constant CFString objects contain non-portable characters"
+-msgstr ""
++msgstr "定数 CFString オブジェクトが移植性の無い文字を含む場合に警告する"
+
+ #: config/darwin.opt:210
+ msgid "Generate AT&T-style stubs for Mach-O"
+@@ -8430,7 +8422,7 @@
+
+ #: config/darwin.opt:218
+ msgid "Generate code suitable for fast turn around debugging"
+-msgstr ""
++msgstr "デバッグを高速に行うために適したコードを生成する"
+
+ #: config/darwin.opt:227
+ msgid "The earliest MacOS X version on which this program will run"
+@@ -8442,15 +8434,15 @@
+
+ #: config/darwin.opt:235
+ msgid "Generate code for darwin loadable kernel extensions"
+-msgstr ""
++msgstr "darwin ロード可能カーネル拡張用のコードを生成する"
+
+ #: config/darwin.opt:239
+ msgid "Generate code for the kernel or loadable kernel extensions"
+-msgstr ""
++msgstr "カーネル用、またはロード可能カーネル拡張用のコードを生成する"
+
+ #: config/darwin.opt:243
+ msgid "-iframework <dir>\tAdd <dir> to the end of the system framework include path"
+-msgstr ""
++msgstr "-iframework <dir>\t<dir> をシステムフレームワークインクルードパスの末尾に加える"
+
+ #: config/lynx.opt:23
+ msgid "Support legacy multi-threading"
+@@ -8737,7 +8729,6 @@
+ msgstr ""
+
+ #: config/microblaze/microblaze.opt:92
+-#, fuzzy
+ msgid "Use hardware floating point conversion instructions"
+ msgstr "ハードウェア浮動小数点変換命令を使用する"
+
+@@ -8862,7 +8853,7 @@
+
+ #: c-family/c.opt:249
+ msgid "-MT <target>\tAdd an unquoted target"
+-msgstr ""
++msgstr "-MT <target>\tターゲット (引用符を付けない) を追加する"
+
+ #: c-family/c.opt:253
+ msgid "Do not generate #line directives"
+@@ -8898,11 +8889,11 @@
+
+ #: c-family/c.opt:288
+ msgid "Warn about C constructs that are not in the common subset of C and C++"
+-msgstr ""
++msgstr "C と C++ の共通部分集合では無い C 構文に関して警告する"
+
+ #: c-family/c.opt:292
+ msgid "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x"
+-msgstr ""
++msgstr "ISO C++ 1998 と ISO C++ 200x で意味が異なる C++ 構文に関して警告する"
+
+ #: c-family/c.opt:296
+ msgid "Warn about casts which discard qualifiers"
+@@ -8962,7 +8953,7 @@
+
+ #: c-family/c.opt:352
+ msgid "Warn about stray tokens after #elif and #endif"
+-msgstr ""
++msgstr "#elif および #endif の後にあるはぐれたトークンに関して警告する"
+
+ #: c-family/c.opt:356
+ msgid "Warn about comparison of different enum types"
+@@ -8977,9 +8968,8 @@
+ msgstr "浮動小数点数の等価比較に関して警告する"
+
+ #: c-family/c.opt:372
+-#, fuzzy
+ msgid "Warn about printf/scanf/strftime/strfmon format string anomalies"
+-msgstr "printf/scanf/strftime/strfmon 形式の変則的なものに関して警告する"
++msgstr "printf/scanf/strftime/strfmon 書式文字列異常に関して警告する"
+
+ #: c-family/c.opt:376
+ msgid "Warn if passing too many arguments to a function for its format string"
+@@ -8998,9 +8988,8 @@
+ msgstr "セキュリティ問題になる可能性がある書式関数に関して警告する"
+
+ #: c-family/c.opt:392
+-#, fuzzy
+ msgid "Warn about strftime formats yielding 2-digit years"
+-msgstr "strftime 形式が二桁で年を表している時の警告しない"
++msgstr "strftime 書式が 2 桁の年の場合に警告する"
+
+ #: c-family/c.opt:396
+ msgid "Warn about zero-length formats"
+@@ -9409,7 +9398,7 @@
+
+ #: c-family/c.opt:823
+ msgid "Don't emit dllexported inline functions unless needed"
+-msgstr ""
++msgstr "必要が無い限り dllexported インライン関数を発行しない"
+
+ #: c-family/c.opt:830
+ msgid "Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types."
+@@ -9501,7 +9490,7 @@
+
+ #: c-family/c.opt:942
+ msgid "Generate run time type descriptor information"
+-msgstr ""
++msgstr "実行時型記述子情報を生成する"
+
+ #: c-family/c.opt:946
+ msgid "Use the same size for double as for float"
+@@ -9889,19 +9878,16 @@
+ msgstr "関数が __attribute__((pure)) の候補となりそうな場合に警告する"
+
+ #: common.opt:608
+-#, fuzzy
+ msgid "Warn about enumerated switches, with no default, missing a case"
+-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
++msgstr "列挙定数を使用した switch 文で default 文が無いか特定の case が無い場合に警告する"
+
+ #: common.opt:612
+-#, fuzzy
+ msgid "Warn about enumerated switches missing a \"default:\" statement"
+-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
++msgstr "列挙定数を使用した switch 文で \"default:\" 文が無い場合に警告する"
+
+ #: common.opt:616
+-#, fuzzy
+ msgid "Warn about all enumerated switches missing a specific case"
+-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
++msgstr "列挙定数を使用した switch 文で特定の case が無い場合に警告する"
+
+ #: common.opt:620
+ msgid "Do not suppress warnings from system headers"
+@@ -10000,9 +9986,8 @@
+ msgstr "自動増加/減少命令を生成する"
+
+ #: common.opt:821
+-#, fuzzy
+ msgid "Generate code to check bounds before indexing arrays"
+-msgstr "配列の添字と添字境界を検査するコードを生成する"
++msgstr "配列の添え字を使用する前に境界検査を行うコードを生成する"
+
+ #: common.opt:825
+ #, fuzzy
+@@ -10043,7 +10028,7 @@
+
+ #: common.opt:864
+ msgid "Looks for opportunities to reduce stack adjustments and stack references."
+-msgstr ""
++msgstr "スタック調整およびスタック参照を削減する機会を探す"
+
+ #: common.opt:868
+ msgid "Do not put uninitialized globals in the common section"
+@@ -10058,18 +10043,16 @@
+ msgstr ""
+
+ #: common.opt:884
+-#, fuzzy
+ msgid "Perform comparison elimination after register allocation has finished"
+-msgstr "グローバル共通部分式を除去する"
++msgstr "レジスタは位置が完了した後に比較の除去を行う"
+
+ #: common.opt:888
+ msgid "Do not perform optimizations increasing noticeably stack usage"
+-msgstr ""
++msgstr "スタック使用量を著しく増加させる最適化を行わない"
+
+ #: common.opt:892
+-#, fuzzy
+ msgid "Perform a register copy-propagation optimization pass"
+-msgstr "最適化過程のレジスタつけ変えを行なう"
++msgstr ""
+
+ #: common.opt:896
+ msgid "Perform cross-jumping optimization"
+@@ -10101,7 +10084,7 @@
+
+ #: common.opt:928
+ msgid "Map one directory name to another in debug information"
+-msgstr ""
++msgstr "デバッグ情報内のディレクトリー名を他のものにマップする"
+
+ #: common.opt:934
+ msgid "Defer popping functions args from stack until later"
+@@ -10116,9 +10099,8 @@
+ msgstr "無意味な null ポインタ検査を削除する"
+
+ #: common.opt:946
+-#, fuzzy
+ msgid "Try to convert virtual calls to direct ones."
+-msgstr "リンカが PIC 呼び出しを直接呼び出しに変更することを許可するように試みる"
++msgstr "仮想呼び出しを直接呼び出しに変換することを試みる"
+
+ #: common.opt:950
+ #, fuzzy
+@@ -10137,7 +10119,7 @@
+
+ #: common.opt:978
+ msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of translation"
+-msgstr ""
++msgstr "-fdump-final-insns=filename\t翻訳終了時に filename へ命令をダンプする"
+
+ #: common.opt:982
+ msgid "-fdump-go-spec=filename\tWrite all declarations to file as Go code"
+@@ -10173,7 +10155,7 @@
+
+ #: common.opt:1014 common.opt:1018
+ msgid "Perform unused type elimination in debug info"
+-msgstr ""
++msgstr "デバッグ情報内で使用されていない型の除去を行う"
+
+ #: common.opt:1022
+ msgid "Do not suppress C++ class debug information."
+@@ -10181,25 +10163,24 @@
+
+ #: common.opt:1026
+ msgid "Generate debug information to support Identical Code Folding (ICF)"
+-msgstr ""
++msgstr "Identical Code Folding (ICF) をサポートするためのデバッグ情報を生成する"
+
+ #: common.opt:1030
+ msgid "Enable exception handling"
+ msgstr "例外処理を有効にする"
+
+ #: common.opt:1034
+-#, fuzzy
+ msgid "Perform a number of minor, expensive optimizations"
+-msgstr "目立たない、コストのかかる最適化を行なう"
++msgstr "多くの、目立たないがコストが高い最適化を行う"
+
+ #: common.opt:1038
+ msgid "-fexcess-precision=[fast|standard]\tSpecify handling of excess floating-point precision"
+-msgstr ""
++msgstr "-fexcess-precision=[fast|standard]\t余分な浮動小数点精度の取り扱いを指定する"
+
+ #: common.opt:1041
+ #, c-format
+ msgid "unknown excess precision style %qs"
+-msgstr ""
++msgstr "不明な余分な精度スタイル %qs です"
+
+ #: common.opt:1054
+ msgid "Assume no NaNs or infinities are generated"
+@@ -10222,52 +10203,45 @@
+ msgstr ""
+
+ #: common.opt:1077
+-#, fuzzy, c-format
++#, c-format
+ msgid "unknown floating point contraction style %qs"
+-msgstr "浮動小数点定数を TOC 内に配置する"
++msgstr "不明な浮動小数短縮形 %qs です"
+
+ #: common.opt:1094
+ msgid "Allow function addresses to be held in registers"
+ msgstr "関数アドレスをレジスタに持たせる事を許可する"
+
+ #: common.opt:1098
+-#, fuzzy
+ msgid "Place each function into its own section"
+-msgstr "各々の関数をそれ自身のセクションに配置する"
++msgstr "それぞれの関数をそれ自身のセクションに配置する"
+
+ #: common.opt:1102
+-#, fuzzy
+ msgid "Perform global common subexpression elimination"
+-msgstr "グローバル共通部分式を除去する"
++msgstr "大域共通部分式の除去を行う"
+
+ #: common.opt:1106
+-#, fuzzy
+ msgid "Perform enhanced load motion during global common subexpression elimination"
+-msgstr "グローバル共通部分式を除去する"
++msgstr ""
+
+ #: common.opt:1110
+-#, fuzzy
+ msgid "Perform store motion after global common subexpression elimination"
+-msgstr "グローバル共通部分式を除去する"
++msgstr ""
+
+ #: common.opt:1114
+ msgid "Perform redundant load after store elimination in global common subexpression"
+ msgstr ""
+
+ #: common.opt:1119
+-#, fuzzy
+ msgid "Perform global common subexpression elimination after register allocation"
+-msgstr "グローバル共通部分式を除去する"
++msgstr "レジスタ配置後に大域共通部分式の除去を行う"
+
+ #: common.opt:1125
+-#, fuzzy
+ msgid "Enable in and out of Graphite representation"
+-msgstr "自動テンプレート実体化を有効にする"
++msgstr ""
+
+ #: common.opt:1129
+-#, fuzzy
+ msgid "Enable Graphite Identity transformation"
+-msgstr "呼び出しグラフ情報を送出する"
++msgstr ""
+
+ #: common.opt:1133
+ msgid "Mark all loops as parallel"
+@@ -10306,9 +10280,8 @@
+ msgstr ""
+
+ #: common.opt:1173
+-#, fuzzy
+ msgid "Perform conversion of conditional jumps to conditional execution"
+-msgstr "条件的な実行への変更のための閾値を変更する"
++msgstr ""
+
+ #: common.opt:1177
+ msgid "Convert conditional jumps in innermost loops to branchless equivalents"
+@@ -10376,13 +10349,12 @@
+ msgstr ""
+
+ #: common.opt:1253
+-#, fuzzy
+ msgid "Discover pure and const functions"
+-msgstr "使われない仮想関数を切り捨てる"
++msgstr "純粋および定数関数を見つける"
+
+ #: common.opt:1257
+ msgid "Discover readonly and non addressable static variables"
+-msgstr ""
++msgstr "読み取り専用およびアドレス付けできない静的変数を見つける"
+
+ #: common.opt:1261
+ msgid "Perform matrix layout flattening and transposing based"
+@@ -10415,9 +10387,8 @@
+ msgstr ""
+
+ #: common.opt:1305
+-#, fuzzy
+ msgid "Share slots for saving different hard registers."
+-msgstr "引数レジスタにローカルのものを格納する"
++msgstr ""
+
+ #: common.opt:1309
+ msgid "Share stack slots for spilled pseudo-registers."
+@@ -10621,19 +10592,19 @@
+
+ #: common.opt:1521
+ msgid "Enable basic program profiling code"
+-msgstr ""
++msgstr "基本プログラムプロファイリングコードを有効にする"
+
+ #: common.opt:1525
+ msgid "Insert arc-based program profiling code"
+-msgstr ""
++msgstr "円弧ベースプログラムプロファイリングコードを挿入する"
+
+ #: common.opt:1529
+ msgid "Set the top-level directory for storing the profile data."
+-msgstr ""
++msgstr "プロファイルデータ保存用の最上位ディレクリーを設定する"
+
+ #: common.opt:1534
+ msgid "Enable correction of flow inconsistent profile data input"
+-msgstr ""
++msgstr "フロー一貫性が無いデータ入力の訂正を有効にする"
+
+ #: common.opt:1538
+ msgid "Enable common options for generating profile info for profile feedback directed optimizations"
+@@ -10653,7 +10624,7 @@
+
+ #: common.opt:1554
+ msgid "Insert code to profile values of expressions"
+-msgstr ""
++msgstr "式の値をプロファイルするためのコードを挿入する"
+
+ #: common.opt:1561
+ msgid "-frandom-seed=<string>\tMake compile reproducible using <string>"
+@@ -11836,7 +11807,7 @@
+ #: c-decl.c:1150
+ #, gcc-internal-format
+ msgid "nested function %q+D declared but never defined"
+-msgstr ""
++msgstr "入れ子になった関数 %q+D が宣言されましたが定義されていません"
+
+ #: c-decl.c:1162
+ #, gcc-internal-format
+@@ -11893,7 +11864,7 @@
+ #: c-decl.c:1613
+ #, gcc-internal-format
+ msgid "prototype for %q+D follows non-prototype definition"
+-msgstr ""
++msgstr "非プロトタイプ定義に続いて %q+D 用のプロトタイプがあります"
+
+ #: c-decl.c:1628
+ #, gcc-internal-format
+@@ -11969,9 +11940,9 @@
+ msgstr "%q+D が異なる型で再定義されました"
+
+ #: c-decl.c:1818
+-#, fuzzy, gcc-internal-format
++#, gcc-internal-format
+ msgid "redefinition of typedef %q+D with variably modified type"
+-msgstr "%q+D が異なる型で再定義されました"
++msgstr ""
+
+ #: c-decl.c:1825
+ #, gcc-internal-format
+@@ -12016,17 +11987,17 @@
+ #: c-decl.c:2001
+ #, gcc-internal-format
+ msgid "extern declaration of %q+D follows declaration with no linkage"
+-msgstr ""
++msgstr "リンク無し宣言の後に %q+D の extern 宣言が続いています"
+
+ #: c-decl.c:2037
+ #, gcc-internal-format
+ msgid "declaration of %q+D with no linkage follows extern declaration"
+-msgstr ""
++msgstr "extern 宣言の後にリンク無し %q+D の宣言が続いています"
+
+ #: c-decl.c:2043
+ #, gcc-internal-format
+ msgid "redeclaration of %q+D with no linkage"
+-msgstr ""
++msgstr "リンク無し %q+D の再定義です"
+
+ #: c-decl.c:2069
+ #, gcc-internal-format
+@@ -12354,7 +12325,7 @@
+ #: c-decl.c:4614
+ #, gcc-internal-format
+ msgid "defining a type in a compound literal is invalid in C++"
+-msgstr ""
++msgstr "複合リテラル内での型定義は C++ では無効です"
+
+ #: c-decl.c:4666 c-decl.c:4681
+ #, gcc-internal-format
+@@ -13393,23 +13364,23 @@
+ #: c-parser.c:1829
+ #, gcc-internal-format
+ msgid "expression in static assertion is not an integer"
+-msgstr ""
++msgstr "静的アサーション内の式が整数ではありません"
+
+ #: c-parser.c:1836
+ #, gcc-internal-format
+ msgid "expression in static assertion is not an integer constant expression"
+-msgstr ""
++msgstr "静的アサーション内の式が整数定数式ではありません"
+
+ #: c-parser.c:1841
+ #, gcc-internal-format
+ msgid "expression in static assertion is not constant"
+-msgstr ""
++msgstr "静的アサーション内の式が定数ではありません"
+
+ #. Report the error.
+ #: c-parser.c:1846 cp/semantics.c:4719
+ #, gcc-internal-format
+ msgid "static assertion failed: %E"
+-msgstr ""
++msgstr "静的アサーションに失敗しました: %E"
+
+ #: c-parser.c:2207 c-parser.c:3063 c-parser.c:3709 c-parser.c:3983
+ #: c-parser.c:5084 c-parser.c:5175 c-parser.c:5800 c-parser.c:6083
+@@ -14125,12 +14096,12 @@
+ #: c-typeck.c:3578
+ #, gcc-internal-format
+ msgid "increment of enumeration value is invalid in C++"
+-msgstr "列挙値のインクリメントは C++ では無効です"
++msgstr "列挙値の増分は C++ では無効です"
+
+ #: c-typeck.c:3581
+ #, gcc-internal-format
+ msgid "decrement of enumeration value is invalid in C++"
+-msgstr "列挙値のデクリメントは C++ では無効です"
++msgstr "列挙値の減分は C++ では無効です"
+
+ #: c-typeck.c:3594
+ #, gcc-internal-format
+@@ -14140,22 +14111,22 @@
+ #: c-typeck.c:3613 c-typeck.c:3645
+ #, gcc-internal-format
+ msgid "wrong type argument to increment"
+-msgstr "インクリメントする引数の型が間違っています"
++msgstr "増分する引数の型が間違っています"
+
+ #: c-typeck.c:3615 c-typeck.c:3648
+ #, gcc-internal-format
+ msgid "wrong type argument to decrement"
+-msgstr "デクリメントする引数の型が間違っています"
++msgstr "減分する引数の型が間違っています"
+
+ #: c-typeck.c:3635
+ #, gcc-internal-format
+ msgid "increment of pointer to unknown structure"
+-msgstr "不明な構造体へのポインタのインクリメントです"
++msgstr "不明な構造体へのポインタの増分です"
+
+ #: c-typeck.c:3638
+ #, gcc-internal-format
+ msgid "decrement of pointer to unknown structure"
+-msgstr "不明な構造体へのポインタのデクリメントです"
++msgstr "不明な構造体へのポインタの減分です"
+
+ #: c-typeck.c:3722
+ #, gcc-internal-format
+@@ -14170,12 +14141,12 @@
+ #: c-typeck.c:3895 c-family/c-common.c:8658
+ #, gcc-internal-format
+ msgid "increment of read-only location %qE"
+-msgstr "読み取り専用位置 %qE のインクリメントです"
++msgstr "読み取り専用位置 %qE の増分です"
+
+ #: c-typeck.c:3898 c-family/c-common.c:8659
+ #, gcc-internal-format
+ msgid "decrement of read-only location %qE"
+-msgstr "読み取り専用位置 %qE のデクリメントです"
++msgstr "読み取り専用位置 %qE の減分です"
+
+ #: c-typeck.c:3939
+ #, gcc-internal-format
+@@ -19787,12 +19758,12 @@
+ #: c-family/c-common.c:8611
+ #, gcc-internal-format
+ msgid "increment of member %qD in read-only object"
+-msgstr "読み取り専用オブジェクト内のメンバ %qD のインクリメントです"
++msgstr "読み取り専用オブジェクト内のメンバ %qD の増分です"
+
+ #: c-family/c-common.c:8613
+ #, gcc-internal-format
+ msgid "decrement of member %qD in read-only object"
+-msgstr "読み取り専用オブジェクト内のメンバ %qD のデクリメントです"
++msgstr "読み取り専用オブジェクト内のメンバ %qD の減分です"
+
+ #: c-family/c-common.c:8615
+ #, gcc-internal-format
+@@ -19807,12 +19778,12 @@
+ #: c-family/c-common.c:8620
+ #, gcc-internal-format
+ msgid "increment of read-only member %qD"
+-msgstr "読み取り専用メンバ %qD のインクリメントです"
++msgstr "読み取り専用メンバ %qD の増分です"
+
+ #: c-family/c-common.c:8621
+ #, gcc-internal-format
+ msgid "decrement of read-only member %qD"
+-msgstr "読み取り専用メンバ %qD のデクリメントです"
++msgstr "読み取り専用メンバ %qD の減分です"
+
+ #: c-family/c-common.c:8622
+ #, gcc-internal-format
+@@ -19827,12 +19798,12 @@
+ #: c-family/c-common.c:8627
+ #, gcc-internal-format
+ msgid "increment of read-only variable %qD"
+-msgstr "読み取り専用変数 %qD のインクリメントです"
++msgstr "読み取り専用変数 %qD の増分です"
+
+ #: c-family/c-common.c:8628
+ #, gcc-internal-format
+ msgid "decrement of read-only variable %qD"
+-msgstr "読み取り専用変数 %qD のデクリメントです"
++msgstr "読み取り専用変数 %qD の減分です"
+
+ #: c-family/c-common.c:8629
+ #, gcc-internal-format
+@@ -19847,12 +19818,12 @@
+ #: c-family/c-common.c:8633
+ #, gcc-internal-format
+ msgid "increment of read-only parameter %qD"
+-msgstr "読み取り専用パラメータ %qD のインクリメントです"
++msgstr "読み取り専用パラメータ %qD の増分です"
+
+ #: c-family/c-common.c:8634
+ #, gcc-internal-format
+ msgid "decrement of read-only parameter %qD"
+-msgstr "読み取り専用パラメータ %qD のデクリメントです"
++msgstr "読み取り専用パラメータ %qD の減分です"
+
+ #: c-family/c-common.c:8635
+ #, gcc-internal-format
+@@ -19867,12 +19838,12 @@
+ #: c-family/c-common.c:8642
+ #, gcc-internal-format
+ msgid "increment of read-only named return value %qD"
+-msgstr "読み取り専用名前付き戻り値 %qD のインクリメントです"
++msgstr "読み取り専用名前付き戻り値 %qD の増分です"
+
+ #: c-family/c-common.c:8644
+ #, gcc-internal-format
+ msgid "decrement of read-only named return value %qD"
+-msgstr "読み取り専用名前付き戻り値 %qD のデクリメントです"
++msgstr "読み取り専用名前付き戻り値 %qD の減分です"
+
+ #: c-family/c-common.c:8646
+ #, gcc-internal-format
+@@ -19887,12 +19858,12 @@
+ #: c-family/c-common.c:8652
+ #, gcc-internal-format
+ msgid "increment of function %qD"
+-msgstr "関数 %qD のインクリメントです"
++msgstr "関数 %qD の増分です"
+
+ #: c-family/c-common.c:8653
+ #, gcc-internal-format
+ msgid "decrement of function %qD"
+-msgstr "関数 %qD のデクリメントです"
++msgstr "関数 %qD の減分です"
+
+ #: c-family/c-common.c:8654
+ #, gcc-internal-format
+@@ -19912,12 +19883,12 @@
+ #: c-family/c-common.c:8677
+ #, gcc-internal-format
+ msgid "lvalue required as increment operand"
+-msgstr "インクリメントの被演算子として左辺値が必要です"
++msgstr "増分の被演算子として左辺値が必要です"
+
+ #: c-family/c-common.c:8680
+ #, gcc-internal-format
+ msgid "lvalue required as decrement operand"
+-msgstr "デクリメントの被演算子として左辺値が必要です"
++msgstr "減分の被演算子として左辺値が必要です"
+
+ #: c-family/c-common.c:8683
+ #, gcc-internal-format
+@@ -20556,12 +20527,12 @@
+ #: c-family/c-omp.c:375 cp/semantics.c:4431
+ #, gcc-internal-format
+ msgid "missing increment expression"
+-msgstr "インクリメント式がありません"
++msgstr "増分式がありません"
+
+ #: c-family/c-omp.c:444 cp/semantics.c:4287
+ #, gcc-internal-format
+ msgid "invalid increment expression"
+-msgstr "無効なインクリメント式です"
++msgstr "無効な増分式です"
+
+ #: c-family/c-opts.c:303
+ #, gcc-internal-format
+@@ -20571,7 +20542,7 @@
+ #: c-family/c-opts.c:306
+ #, gcc-internal-format
+ msgid "obsolete option -I- used, please use -iquote instead"
+-msgstr "廃止あれたオプション -I- が使用されています。代わりに -iquote を使用してください"
++msgstr "廃止されたオプション -I- が使用されています。代わりに -iquote を使用してください"
+
+ #: c-family/c-opts.c:486
+ #, gcc-internal-format
+Index: gcc/tree-ssa-forwprop.c
+===================================================================
+--- gcc/tree-ssa-forwprop.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-ssa-forwprop.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -872,7 +872,7 @@
+ TREE_TYPE (gimple_assign_rhs1 (use_stmt))))
+ {
+ tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
+- tree new_offset, new_base, saved;
++ tree new_offset, new_base, saved, new_lhs;
+ while (handled_component_p (*def_rhs_basep))
+ def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
+ saved = *def_rhs_basep;
+@@ -891,9 +891,12 @@
+ *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
+ new_base, new_offset);
+ TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (lhs);
++ TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (lhs);
+ TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (lhs);
+- gimple_assign_set_lhs (use_stmt,
+- unshare_expr (TREE_OPERAND (def_rhs, 0)));
++ new_lhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
++ gimple_assign_set_lhs (use_stmt, new_lhs);
++ TREE_THIS_VOLATILE (new_lhs) = TREE_THIS_VOLATILE (lhs);
++ TREE_SIDE_EFFECTS (new_lhs) = TREE_SIDE_EFFECTS (lhs);
+ *def_rhs_basep = saved;
+ tidy_after_forward_propagate_addr (use_stmt);
+ /* Continue propagating into the RHS if this was not the
+@@ -953,7 +956,7 @@
+ TREE_TYPE (TREE_OPERAND (def_rhs, 0))))
+ {
+ tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
+- tree new_offset, new_base, saved;
++ tree new_offset, new_base, saved, new_rhs;
+ while (handled_component_p (*def_rhs_basep))
+ def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
+ saved = *def_rhs_basep;
+@@ -972,9 +975,12 @@
+ *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
+ new_base, new_offset);
+ TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (rhs);
++ TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (rhs);
+ TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (rhs);
+- gimple_assign_set_rhs1 (use_stmt,
+- unshare_expr (TREE_OPERAND (def_rhs, 0)));
++ new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
++ gimple_assign_set_rhs1 (use_stmt, new_rhs);
++ TREE_THIS_VOLATILE (new_rhs) = TREE_THIS_VOLATILE (rhs);
++ TREE_SIDE_EFFECTS (new_rhs) = TREE_SIDE_EFFECTS (rhs);
+ *def_rhs_basep = saved;
+ fold_stmt_inplace (use_stmt);
+ tidy_after_forward_propagate_addr (use_stmt);
+Index: gcc/varasm.c
+===================================================================
+--- gcc/varasm.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/varasm.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6751,11 +6751,14 @@
+ /* A non-decl is an entry in the constant pool. */
+ if (!DECL_P (exp))
+ local_p = true;
+- /* Weakrefs may not bind locally, even though the weakref itself is
+- always static and therefore local.
+- FIXME: We can resolve this more curefuly by looking at the weakref
+- alias. */
+- else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)))
++ /* Weakrefs may not bind locally, even though the weakref itself is always
++ static and therefore local. Similarly, the resolver for ifunc functions
++ might resolve to a non-local function.
++ FIXME: We can resolve the weakref case more curefuly by looking at the
++ weakref alias. */
++ else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))
++ || (TREE_CODE (exp) == FUNCTION_DECL
++ && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp))))
+ local_p = false;
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+Index: gcc/sched-deps.c
+===================================================================
+--- gcc/sched-deps.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/sched-deps.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2687,7 +2687,11 @@
+ else
+ sched_analyze_2 (deps, XEXP (link, 0), insn);
}
+- if (find_reg_note (insn, REG_SETJMP, NULL))
++ /* Don't schedule anything after a tail call, tail call needs
++ to use at least all call-saved registers. */
++ if (SIBLING_CALL_P (insn))
++ reg_pending_barrier = TRUE_BARRIER;
++ else if (find_reg_note (insn, REG_SETJMP, NULL))
+ reg_pending_barrier = MOVE_BARRIER;
}
-- build_constraint_graph ();
+Index: gcc/tree-object-size.c
+===================================================================
+--- gcc/tree-object-size.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-object-size.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -175,7 +175,7 @@
+ unsigned HOST_WIDE_INT sz;
- if (dump_file)
+ if (!osi || (object_size_type & 1) != 0
+- || TREE_CODE (pt_var) != SSA_NAME)
++ || TREE_CODE (TREE_OPERAND (pt_var, 0)) != SSA_NAME)
+ {
+ sz = compute_builtin_object_size (TREE_OPERAND (pt_var, 0),
+ object_size_type & ~1);
+Index: gcc/tree-outof-ssa.c
+===================================================================
+--- gcc/tree-outof-ssa.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-outof-ssa.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -237,9 +237,10 @@
+
+ var = SSA_NAME_VAR (partition_to_var (SA.map, dest));
+ src_mode = TYPE_MODE (TREE_TYPE (src));
+- dest_mode = promote_decl_mode (var, &unsignedp);
++ dest_mode = GET_MODE (SA.partition_to_pseudo[dest]);
+ gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var)));
+- gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest]));
++ gcc_assert (!REG_P (SA.partition_to_pseudo[dest])
++ || dest_mode == promote_decl_mode (var, &unsignedp));
+
+ if (src_mode != dest_mode)
{
- fprintf (dump_file, "Points-to analysis\n\nConstraints:\n\n");
- dump_constraints (dump_file);
- }
--
-+
- if (dump_file)
- fprintf (dump_file,
- "\nCollapsing static cycles and doing variable "
- "substitution:\n");
--
-- find_and_collapse_graph_cycles (graph, false);
-- perform_var_substitution (graph);
--
-+
-+ build_pred_graph ();
-+ si = perform_var_substitution (graph);
-+ move_complex_constraints (graph, si);
-+ free_var_substitution_info (si);
-+
-+ build_succ_graph ();
-+ find_indirect_cycles (graph);
+Index: gcc/tree-ssa-structalias.c
+===================================================================
+--- gcc/tree-ssa-structalias.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/tree-ssa-structalias.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -308,6 +308,7 @@
+ static varinfo_t first_or_preceding_vi_for_offset (varinfo_t,
+ unsigned HOST_WIDE_INT);
+ static varinfo_t lookup_vi_for_tree (tree);
++static inline bool type_can_have_subvars (const_tree);
+
+ /* Pool of variable info structures. */
+ static alloc_pool variable_info_pool;
+@@ -3353,7 +3354,8 @@
+ return;
+
+ cs = *VEC_last (ce_s, *results);
+- if (cs.type == DEREF)
++ if (cs.type == DEREF
++ && type_can_have_subvars (TREE_TYPE (t)))
+ {
+ /* For dereferences this means we have to defer it
+ to solving time. */
+@@ -4981,6 +4983,15 @@
+ VEC_qsort (fieldoff_s, fieldstack, fieldoff_compare);
+ }
+
++/* Return true if T is a type that can have subvars. */
+
-+ /* Implicit nodes and predecessors are no longer necessary at this
-+ point. */
-+ remove_preds_and_fake_succs (graph);
++static inline bool
++type_can_have_subvars (const_tree t)
++{
++ /* Aggregates without overlapping fields can have subvars. */
++ return TREE_CODE (t) == RECORD_TYPE;
++}
+
- if (dump_file)
- fprintf (dump_file, "\nSolving graph:\n");
+ /* Return true if V is a tree that we can have subvars for.
+ Normally, this is any aggregate type. Also complex
+ types which are not gimple registers can have subvars. */
+@@ -4996,11 +5007,7 @@
+ if (!DECL_P (v))
+ return false;
+
+- /* Aggregates without overlapping fields can have subvars. */
+- if (TREE_CODE (TREE_TYPE (v)) == RECORD_TYPE)
+- return true;
+-
+- return false;
++ return type_can_have_subvars (TREE_TYPE (v));
+ }
+
+ /* Return true if T is a type that does contain pointers. */
+Index: gcc/lto-opts.c
+===================================================================
+--- gcc/lto-opts.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/lto-opts.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -358,7 +358,7 @@
+ size_t len, l, skip;
+ const char *data, *p;
+ const struct lto_simple_header *header;
+- int32_t opts_offset;
++ int opts_offset;
+ struct lto_input_block ib;
+
+ data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len);
+@@ -379,10 +379,10 @@
+
+ lto_check_version (header->lto_header.major_version,
+ header->lto_header.minor_version);
-
+
- solve_graph (graph);
--
+ LTO_INIT_INPUT_BLOCK (ib, p + opts_offset, 0, header->main_size);
+ input_options (&ib);
+-
+
- if (dump_file)
- dump_sa_points_to_info (dump_file);
--
- have_alias_info = true;
-
- timevar_pop (TV_TREE_PTA);
- }
+ skip = header->main_size + opts_offset;
+ l -= skip;
+ p += skip;
+Index: gcc/c-parser.c
+===================================================================
+--- gcc/c-parser.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/c-parser.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6294,7 +6294,7 @@
+ c_parser_error (parser, "expected identifier");
+ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
+ "expected %<)%>");
+- expr.value = fold_offsetof (offsetof_ref, NULL_TREE);
++ expr.value = fold_offsetof (offsetof_ref);
+ }
+ break;
+ case RID_CHOOSE_EXPR:
+Index: gcc/config/alpha/linux-unwind.h
+===================================================================
+--- gcc/config/alpha/linux-unwind.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/alpha/linux-unwind.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* DWARF2 EH unwinding support for Alpha Linux.
+- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
++ Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
--
- /* Delete created points-to sets. */
+ This file is part of GCC.
- void
-@@ -4861,33 +4922,27 @@
+@@ -36,16 +36,17 @@
{
- varinfo_t v;
- int i;
--
-- htab_delete (id_for_tree);
-- bitmap_obstack_release (&ptabitmap_obstack);
-- bitmap_obstack_release (&predbitmap_obstack);
+ unsigned int *pc = context->ra;
+ struct sigcontext *sc;
+- long new_cfa, i;
++ long new_cfa;
++ int i;
+
+ if (pc[0] != 0x47fe0410 /* mov $30,$16 */
+- || pc[2] != 0x00000083 /* callsys */)
++ || pc[2] != 0x00000083) /* callsys */
+ return _URC_END_OF_STACK;
+ if (context->cfa == 0)
+ return _URC_END_OF_STACK;
+ if (pc[1] == 0x201f0067) /* lda $0,NR_sigreturn */
+ sc = context->cfa;
+- else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
++ else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
+ {
+ struct rt_sigframe {
+ struct siginfo info;
+@@ -55,6 +56,7 @@
+ }
+ else
+ return _URC_END_OF_STACK;
+
-+ if (dump_file && (dump_flags & TDF_STATS))
-+ fprintf (dump_file, "Points to sets created:%d\n",
-+ stats.points_to_sets_created);
+ new_cfa = sc->sc_regs[30];
+ fs->regs.cfa_how = CFA_REG_OFFSET;
+ fs->regs.cfa_reg = 30;
+@@ -63,13 +65,13 @@
+ {
+ fs->regs.reg[i].how = REG_SAVED_OFFSET;
+ fs->regs.reg[i].loc.offset
+- = (long)&sc->sc_regs[i] - new_cfa;
++ = (long) &sc->sc_regs[i] - new_cfa;
+ }
+ for (i = 0; i < 31; ++i)
+ {
+ fs->regs.reg[i+32].how = REG_SAVED_OFFSET;
+ fs->regs.reg[i+32].loc.offset
+- = (long)&sc->sc_fpregs[i] - new_cfa;
++ = (long) &sc->sc_fpregs[i] - new_cfa;
+ }
+ fs->regs.reg[64].how = REG_SAVED_OFFSET;
+ fs->regs.reg[64].loc.offset = (long)&sc->sc_pc - new_cfa;
+@@ -78,3 +80,20 @@
+
+ return _URC_NO_REASON;
+ }
+
-+ pointer_map_destroy (vi_for_tree);
-+ bitmap_obstack_release (&pta_obstack);
- VEC_free (constraint_t, heap, constraints);
--
++#define MD_FROB_UPDATE_CONTEXT alpha_frob_update_context
+
- for (i = 0; VEC_iterate (varinfo_t, varmap, i, v); i++)
-- {
-- /* Nonlocal vars may add more varinfos. */
-- if (i >= graph_size)
-- break;
-+ VEC_free (constraint_t, heap, graph->complex[i]);
-+ free (graph->complex);
++/* Fix up for signal handlers that don't have S flag set. */
++
++static void
++alpha_frob_update_context (struct _Unwind_Context *context,
++ _Unwind_FrameState *fs ATTRIBUTE_UNUSED)
++{
++ unsigned int *pc = context->ra;
++
++ if (pc[0] == 0x47fe0410 /* mov $30,$16 */
++ && pc[2] == 0x00000083 /* callsys */
++ && (pc[1] == 0x201f0067 /* lda $0,NR_sigreturn */
++ || pc[1] == 0x201f015f)) /* lda $0,NR_rt_sigreturn */
++ _Unwind_SetSignalFrame (context, 1);
++}
+Index: gcc/config/s390/s390.md
+===================================================================
+--- gcc/config/s390/s390.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/s390/s390.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -7644,6 +7644,7 @@
+ sra<gk>\t%0,%1,%Y2"
+ [(set_attr "op_type" "RS<E>,RSY")
+ (set_attr "atype" "reg,reg")
++ (set_attr "cpu_facility" "*,z196")
+ (set_attr "z10prop" "z10_super_E1,*")])
+
+
+Index: gcc/config/sparc/sparc.md
+===================================================================
+--- gcc/config/sparc/sparc.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/sparc/sparc.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -28,6 +28,7 @@
+ [(UNSPEC_MOVE_PIC 0)
+ (UNSPEC_UPDATE_RETURN 1)
+ (UNSPEC_LOAD_PCREL_SYM 2)
++ (UNSPEC_FRAME_BLOCKAGE 3)
+ (UNSPEC_MOVE_PIC_LABEL 5)
+ (UNSPEC_SETH44 6)
+ (UNSPEC_SETM44 7)
+@@ -1813,8 +1814,8 @@
+ })
-- VEC_free (constraint_edge_t, heap, graph->succs[i]);
-- VEC_free (constraint_edge_t, heap, graph->preds[i]);
-- VEC_free (constraint_t, heap, v->complex);
-- }
-- free (graph->zero_weight_preds);
-- free (graph->zero_weight_succs);
-+ free (graph->rep);
- free (graph->succs);
-- free (graph->preds);
-+ free (graph->indirect_cycles);
- free (graph);
-
- VEC_free (varinfo_t, heap, varmap);
- free_alloc_pool (variable_info_pool);
-- free_alloc_pool (constraint_pool);
-- free_alloc_pool (constraint_edge_pool);
--
-+ free_alloc_pool (constraint_pool);
- have_alias_info = false;
- }
+ (define_insn "*movsf_insn"
+- [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f,*r,*r,*r,f,*r,m,m")
+- (match_operand:V32 1 "input_operand" "GY,f,*rRY,Q,S,m,m,f,*rGY"))]
++ [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f, *r,*r,*r,f,*r,m, m")
++ (match_operand:V32 1 "input_operand" "GY,f,*rRY, Q, S,m, m,f,*rGY"))]
+ "TARGET_FPU
+ && (register_operand (operands[0], <V32:MODE>mode)
+ || register_or_zero_operand (operands[1], <V32:MODE>mode))"
+@@ -1861,8 +1862,8 @@
+ ;; when -mno-fpu.
+
+ (define_insn "*movsf_insn_no_fpu"
+- [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m")
+- (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))]
++ [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r, m")
++ (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))]
+ "! TARGET_FPU
+ && (register_operand (operands[0], SFmode)
+ || register_or_zero_operand (operands[1], SFmode))"
+@@ -1948,8 +1949,8 @@
+
+ ;; Be careful, fmovd does not exist when !v9.
+ (define_insn "*movdf_insn_sp32"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=e,W,U,T,o,e,*r,o,e,o")
+- (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
++ [(set (match_operand:DF 0 "nonimmediate_operand" "= e,W,U,T,o,e, *r, o, e,o")
++ (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
+ "TARGET_FPU
+ && ! TARGET_V9
+ && (register_operand (operands[0], DFmode)
+@@ -1969,8 +1970,8 @@
+ (set_attr "length" "*,*,*,*,2,2,2,2,2,2")])
+
+ (define_insn "*movdf_insn_sp32_no_fpu"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o,r,o")
+- (match_operand:DF 1 "input_operand" "T,U,G,ro,r"))]
++ [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o, r,o")
++ (match_operand:DF 1 "input_operand" " T,U,G,ro,r"))]
+ "! TARGET_FPU
+ && ! TARGET_V9
+ && (register_operand (operands[0], DFmode)
+@@ -1986,8 +1987,8 @@
+
+ ;; We have available v9 double floats but not 64-bit integer registers.
+ (define_insn "*movdf_insn_sp32_v9"
+- [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,T,W,U,T,f,*r,o")
+- (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roGYDF,*rGYf"))]
++ [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e, T,W,U,T, f, *r, o")
++ (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roFD,*rGYf"))]
+ "TARGET_FPU
+ && TARGET_V9
+ && ! TARGET_ARCH64
+@@ -2009,8 +2010,8 @@
+ (set_attr "fptype" "double,double,*,*,*,*,*,*,*,*")])
+
+ (define_insn "*movdf_insn_sp32_v9_no_fpu"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T,r,o")
+- (match_operand:DF 1 "input_operand" "T,U,G,ro,rG"))]
++ [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T, r, o")
++ (match_operand:DF 1 "input_operand" " T,U,G,ro,rG"))]
+ "! TARGET_FPU
+ && TARGET_V9
+ && ! TARGET_ARCH64
+@@ -2027,8 +2028,8 @@
+
+ ;; We have available both v9 double floats and 64-bit integer registers.
+ (define_insn "*movdf_insn_sp64"
+- [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,W,*r,*r,m,*r")
+- (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY,m,*rGY,DF"))]
++ [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e,W, *r,*r, m,*r")
++ (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY, m,*rGY,FD"))]
+ "TARGET_FPU
+ && TARGET_ARCH64
+ && (register_operand (operands[0], <V64:MODE>mode)
+@@ -2047,8 +2048,8 @@
+ (set_attr "fptype" "double,double,*,*,*,*,*,*")])
+
+ (define_insn "*movdf_insn_sp64_no_fpu"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m")
+- (match_operand:DF 1 "input_operand" "r,m,rG"))]
++ [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, m")
++ (match_operand:DF 1 "input_operand" "r,m,rG"))]
+ "! TARGET_FPU
+ && TARGET_ARCH64
+ && (register_operand (operands[0], DFmode)
+@@ -2288,8 +2289,8 @@
+ })
-@@ -4905,6 +4960,7 @@
- static unsigned int
- ipa_pta_execute (void)
- {
-+#if 0
- struct cgraph_node *node;
- in_ipa_mode = 1;
- init_alias_heapvars ();
-@@ -4994,6 +5050,7 @@
- in_ipa_mode = 0;
- delete_alias_heapvars ();
- delete_points_to_sets ();
-+#endif
- return 0;
- }
-
-@@ -5018,8 +5075,9 @@
- void
- init_alias_heapvars (void)
- {
-- heapvar_for_stmt = htab_create_ggc (11, tree_map_hash, tree_map_eq,
-- NULL);
-+ if (!heapvar_for_stmt)
-+ heapvar_for_stmt = htab_create_ggc (11, tree_map_hash, tree_map_eq,
-+ NULL);
- nonlocal_all = NULL_TREE;
- }
+ (define_insn "*movtf_insn_sp32"
+- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,U,r")
+- (match_operand:TF 1 "input_operand" "G,oe,GeUr,o,roG"))]
++ [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o,U, r")
++ (match_operand:TF 1 "input_operand" " G,oe,GeUr,o,roG"))]
+ "TARGET_FPU
+ && ! TARGET_ARCH64
+ && (register_operand (operands[0], TFmode)
+@@ -2302,8 +2303,8 @@
+ ;; when -mno-fpu.
+
+ (define_insn "*movtf_insn_sp32_no_fpu"
+- [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o,r,o")
+- (match_operand:TF 1 "input_operand" "G,o,U,roG,r"))]
++ [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o, r,o")
++ (match_operand:TF 1 "input_operand" " G,o,U,roG,r"))]
+ "! TARGET_FPU
+ && ! TARGET_ARCH64
+ && (register_operand (operands[0], TFmode)
+@@ -2312,8 +2313,8 @@
+ [(set_attr "length" "4")])
+
+ (define_insn "*movtf_insn_sp64"
+- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,r")
+- (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))]
++ [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o, r")
++ (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))]
+ "TARGET_FPU
+ && TARGET_ARCH64
+ && ! TARGET_HARD_QUAD
+@@ -2323,8 +2324,8 @@
+ [(set_attr "length" "2")])
+
+ (define_insn "*movtf_insn_sp64_hq"
+- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m,o,r")
+- (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))]
++ [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m, o, r")
++ (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))]
+ "TARGET_FPU
+ && TARGET_ARCH64
+ && TARGET_HARD_QUAD
+@@ -2341,8 +2342,8 @@
+ (set_attr "length" "2,*,*,*,2,2")])
+
+ (define_insn "*movtf_insn_sp64_no_fpu"
+- [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o")
+- (match_operand:TF 1 "input_operand" "orG,rG"))]
++ [(set (match_operand:TF 0 "nonimmediate_operand" "= r, o")
++ (match_operand:TF 1 "input_operand" "orG,rG"))]
+ "! TARGET_FPU
+ && TARGET_ARCH64
+ && (register_operand (operands[0], TFmode)
+@@ -6338,6 +6339,25 @@
+ ""
+ [(set_attr "length" "0")])
-@@ -5028,7 +5086,7 @@
- {
- nonlocal_all = NULL_TREE;
- htab_delete (heapvar_for_stmt);
-+ heapvar_for_stmt = NULL;
- }
--
-
- #include "gt-tree-ssa-structalias.h"
++;; Do not schedule instructions accessing memory before this point.
++
++(define_expand "frame_blockage"
++ [(set (match_dup 0)
++ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
++ ""
++{
++ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
++ MEM_VOLATILE_P (operands[0]) = 1;
++ operands[1] = stack_pointer_rtx;
++})
++
++(define_insn "*frame_blockage<P:mode>"
++ [(set (match_operand:BLK 0 "" "")
++ (unspec:BLK [(match_operand:P 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
++ ""
++ ""
++ [(set_attr "length" "0")])
++
+ (define_expand "probe_stack"
+ [(set (match_operand 0 "memory_operand" "") (const_int 0))]
+ ""
Index: gcc/config/sparc/sparc.c
===================================================================
---- gcc/config/sparc/sparc.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/sparc/sparc.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -703,7 +703,7 @@
- error ("-mcmodel= is not supported on 32 bit systems");
- }
+--- gcc/config/sparc/sparc.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/sparc/sparc.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4569,8 +4569,9 @@
+ else if (actual_fsize <= 8192)
+ {
+ insn = emit_insn (gen_stack_pointer_inc (GEN_INT (-4096)));
++ RTX_FRAME_RELATED_P (insn) = 1;
++
+ /* %sp is still the CFA register. */
+- RTX_FRAME_RELATED_P (insn) = 1;
+ insn
+ = emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
+ }
+@@ -4592,8 +4593,18 @@
+ else if (actual_fsize <= 8192)
+ {
+ insn = emit_insn (gen_save_register_window (GEN_INT (-4096)));
++
+ /* %sp is not the CFA register anymore. */
+ emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
++
++ /* Make sure no %fp-based store is issued until after the frame is
++ established. The offset between the frame pointer and the stack
++ pointer is calculated relative to the value of the stack pointer
++ at the end of the function prologue, and moving instructions that
++ access the stack via the frame pointer between the instructions
++ that decrement the stack pointer could result in accessing the
++ register window save area, which is volatile. */
++ emit_insn (gen_frame_blockage ());
+ }
+ else
+ {
+Index: gcc/config/sparc/sparc.h
+===================================================================
+--- gcc/config/sparc/sparc.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/sparc/sparc.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -408,6 +408,7 @@
+ %{mcpu=sparclite:-Asparclite} \
+ %{mcpu=sparclite86x:-Asparclite} \
+ %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
++%{mcpu=v8:-Av8} \
+ %{mv8plus:-Av8plus} \
+ %{mcpu=v9:-Av9} \
+ %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
+Index: gcc/config/sparc/sol2-unwind.h
+===================================================================
+--- gcc/config/sparc/sol2-unwind.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/sparc/sol2-unwind.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* DWARF2 EH unwinding support for SPARC Solaris.
+- Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -34,7 +34,7 @@
+ #define IS_SIGHANDLER sparc64_is_sighandler
-- fpu = TARGET_FPU; /* save current -mfpu status */
-+ fpu = target_flags & MASK_FPU; /* save current -mfpu status */
-
- /* Set the default CPU. */
- for (def = &cpu_default[0]; def->name; ++def)
-@@ -7968,8 +7968,10 @@
- Expand builtin functions for sparc intrinsics. */
-
- static rtx
--sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
-- enum machine_mode tmode, int ignore ATTRIBUTE_UNUSED)
-+sparc_expand_builtin (tree exp, rtx target,
-+ rtx subtarget ATTRIBUTE_UNUSED,
-+ enum machine_mode tmode ATTRIBUTE_UNUSED,
-+ int ignore ATTRIBUTE_UNUSED)
+ static int
+-sparc64_is_sighandler (unsigned int *pc, unsigned int *savpc, int *nframes)
++sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes)
{
- tree arglist;
- tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
-@@ -7978,14 +7980,13 @@
- enum machine_mode mode[4];
- int arg_count = 0;
+ if (/* Solaris 8 - single-threaded
+ ----------------------------
+@@ -110,38 +110,58 @@
+ && pc[ 0] == 0x81c7e008
+ && pc[ 1] == 0x81e80000)
+ {
+- if (/* Solaris 8 /usr/lib/sparcv9/libthread.so.1
+- ------------------------------------------
+- Before patch 108827-08:
+- <sigacthandler+1760>: st %g4, [ %i1 + 0x1c ]
++ /* We have observed different calling frames among different
++ versions of the operating system, so that we need to
++ discriminate using the upper frame. We look for the return
++ address of the caller frame (there is an offset of 15 double
++ words between the frame address and the place where this return
++ address is stored) in order to do some more pattern matching. */
++ unsigned int cuh_pattern
++ = *(unsigned int *)(*(unsigned long *)(cfa + 15*8) - 4);
+
+- Since patch 108827-08:
+- <sigacthandler+1816>: st %l0, [ %i4 + 0x10 ] */
+- savpc[-1] == 0xc826601c
+- || savpc[-1] == 0xe0272010)
++ if (cuh_pattern == 0xd25fa7ef)
+ {
+- /* We need to move up three frames:
++ /* This matches the call_user_handler pattern for Solaris 10.
++ There are 2 cases so we look for the return address of the
++ caller's caller frame in order to do more pattern matching. */
++ unsigned long sah_address = *(unsigned long *)(cfa + 176 + 15*8);
+
++ if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019)
++ /* This is the same setup as for Solaris 9, see below. */
++ *nframes = 3;
++ else
++ /* The sigacthandler frame isn't present in the chain.
++ We need to move up two frames:
++
+ <signal handler> <-- context->cfa
+ __sighndlr
+- sigacthandler
++ call_user_handler frame
+ <kernel>
+- */
+- *nframes = 2;
++ */
++ *nframes = 2;
+ }
+- else /* Solaris 8 /usr/lib/lwp/sparcv9/libthread.so.1, Solaris 9+
+- ---------------------------------------------------------- */
+- {
+- /* We need to move up three frames:
++ else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x94100013)
++ /* This matches the call_user_handler pattern for Solaris 9 and
++ for Solaris 8 running inside Solaris Containers respectively
++ We need to move up three frames:
+
+ <signal handler> <-- context->cfa
+ __sighndlr
+ call_user_handler
+ sigacthandler
+ <kernel>
+- */
+- *nframes = 3;
+- }
++ */
++ *nframes = 3;
++ else
++ /* This is the default Solaris 8 case.
++ We need to move up two frames:
++
++ <signal handler> <-- context->cfa
++ __sighndlr
++ sigacthandler
++ <kernel>
++ */
++ *nframes = 2;
+ return 1;
+ }
-- mode[arg_count] = tmode;
--
-- if (target == 0
-- || GET_MODE (target) != tmode
-- || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
-- op[arg_count] = gen_reg_rtx (tmode);
-+ mode[0] = insn_data[icode].operand[0].mode;
-+ if (!target
-+ || GET_MODE (target) != mode[0]
-+ || ! (*insn_data[icode].operand[0].predicate) (target, mode[0]))
-+ op[0] = gen_reg_rtx (mode[0]);
- else
-- op[arg_count] = target;
-+ op[0] = target;
+@@ -172,7 +192,7 @@
+ #define IS_SIGHANDLER sparc_is_sighandler
- for (arglist = TREE_OPERAND (exp, 1); arglist;
- arglist = TREE_CHAIN (arglist))
-@@ -8101,11 +8102,11 @@
+ static int
+-sparc_is_sighandler (unsigned int *pc, unsigned int * savpc, int *nframes)
++sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes)
{
- tree arg0, arg1, arg2;
- tree rtype = TREE_TYPE (TREE_TYPE (fndecl));
--
+ if (/* Solaris 8, 9 - single-threaded
+ -------------------------------
+@@ -200,7 +220,7 @@
+ && pc[-1] == 0x9410001a
+ && pc[ 0] == 0x80a62008)
+ {
+- /* Need to move up one frame:
++ /* We need to move up one frame:
+
+ <signal handler> <-- context->cfa
+ sigacthandler
+@@ -231,7 +251,7 @@
+ && pc[ 1] == 0x81e80000
+ && pc[ 2] == 0x80a26000)
+ {
+- /* Need to move up one frame:
++ /* We need to move up one frame:
+
+ <signal handler> <-- context->cfa
+ __libthread_segvhdlr
+@@ -258,33 +278,58 @@
+ && pc[ 0] == 0x81c7e008
+ && pc[ 1] == 0x81e80000)
+ {
+- if (/* Solaris 8 /usr/lib/libthread.so.1
+- ----------------------------------
+- <sigacthandler+1796>: mov %i0, %o0 */
+- savpc[-1] == 0x90100018)
++ /* We have observed different calling frames among different
++ versions of the operating system, so that we need to
++ discriminate using the upper frame. We look for the return
++ address of the caller frame (there is an offset of 15 words
++ between the frame address and the place where this return
++ address is stored) in order to do some more pattern matching. */
++ unsigned int cuh_pattern
++ = *(unsigned int *)(*(unsigned int *)(cfa + 15*4) - 4);
++
++ if (cuh_pattern == 0xd407a04c)
+ {
+- /* We need to move up two frames:
++ /* This matches the call_user_handler pattern for Solaris 10.
++ There are 2 cases so we look for the return address of the
++ caller's caller frame in order to do more pattern matching. */
++ unsigned int sah_address = *(unsigned int *)(cfa + 96 + 15*4);
+
++ if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019)
++ /* This is the same setup as for Solaris 9, see below. */
++ *nframes = 3;
++ else
++ /* The sigacthandler frame isn't present in the chain.
++ We need to move up two frames:
++
+ <signal handler> <-- context->cfa
+ __sighndlr
+- sigacthandler
++ call_user_handler frame
+ <kernel>
+- */
+- *nframes = 2;
++ */
++ *nframes = 2;
+ }
+- else /* Solaris 8 /usr/lib/lwp/libthread.so.1, Solaris 9+
+- -------------------------------------------------- */
+- {
+- /* We need to move up three frames:
++ else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b)
++ /* This matches the call_user_handler pattern for Solaris 9 and
++ for Solaris 8 running inside Solaris Containers respectively.
++ We need to move up three frames:
+
+ <signal handler> <-- context->cfa
+ __sighndlr
+ call_user_handler
+ sigacthandler
+ <kernel>
+- */
+- *nframes = 3;
+- }
++ */
++ *nframes = 3;
++ else
++ /* This is the default Solaris 8 case.
++ We need to move up two frames:
++
++ <signal handler> <-- context->cfa
++ __sighndlr
++ sigacthandler
++ <kernel>
++ */
++ *nframes = 2;
+ return 1;
+ }
-- if (ignore && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
-+ if (ignore
-+ && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
- && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrdi_vis)
-- return build_int_cst (rtype, 0);
-+ return fold_convert (rtype, integer_zero_node);
+@@ -322,7 +367,7 @@
+ return _URC_NO_REASON;
+ }
- switch (DECL_FUNCTION_CODE (fndecl))
+- if (IS_SIGHANDLER (pc, (unsigned int *)fp->fr_savpc, &nframes))
++ if (IS_SIGHANDLER (pc, this_cfa, &nframes))
{
-@@ -8219,6 +8220,7 @@
- default:
- break;
- }
-+
- return NULL_TREE;
- }
- \f
-Index: gcc/config/i386/i386.h
+ struct handler_args {
+ struct frame frwin;
+Index: gcc/config/i386/i386.md
===================================================================
---- gcc/config/i386/i386.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/i386/i386.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2164,7 +2164,8 @@
+--- gcc/config/i386/i386.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/i386.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1960,7 +1960,7 @@
+
+ (define_insn "*movdi_internal_rex64"
+ [(set (match_operand:DI 0 "nonimmediate_operand"
+- "=r,r ,r,m ,!m,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
++ "=r,r ,r,m ,!o,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
+ (match_operand:DI 1 "general_operand"
+ "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r ,m ,C ,*x,*Yi,*x,r ,m ,*Ym,*x"))]
+ "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+@@ -2905,7 +2905,7 @@
+
+ (define_insn "*movdf_internal_rex64"
+ [(set (match_operand:DF 0 "nonimmediate_operand"
+- "=f,m,f,r ,m,!r,!m,Y2*x,Y2*x,Y2*x,m ,Yi,r ")
++ "=f,m,f,r ,m,!r,!o,Y2*x,Y2*x,Y2*x,m ,Yi,r ")
+ (match_operand:DF 1 "general_operand"
+ "fm,f,G,rm,r,F ,F ,C ,Y2*x,m ,Y2*x,r ,Yi"))]
+ "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
+@@ -3647,7 +3647,7 @@
+ (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))]
+ "TARGET_64BIT"
+ "@
+- mov\t{%k1, %k0|%k0, %k1}
++ mov{l}\t{%1, %k0|%k0, %1}
+ #
+ movd\t{%1, %0|%0, %1}
+ movd\t{%1, %0|%0, %1}
+@@ -5103,7 +5103,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(set (match_dup 0) (float:MODEF (match_dup 1)))])
- enum ix86_stack_slot
+ (define_split
+@@ -5116,7 +5116,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (float:MODEF (match_dup 2)))])
+
+@@ -5207,7 +5207,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(const_int 0)]
{
-- SLOT_TEMP = 0,
-+ SLOT_VIRTUAL = 0,
-+ SLOT_TEMP,
- SLOT_CW_STORED,
- SLOT_CW_TRUNC,
- SLOT_CW_FLOOR,
-Index: gcc/config/i386/i386.md
-===================================================================
---- gcc/config/i386/i386.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/i386/i386.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -3716,7 +3716,7 @@
- ;
+ rtx op1 = operands[1];
+@@ -5248,7 +5248,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(const_int 0)]
+ {
+ operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
+@@ -5270,7 +5270,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(const_int 0)]
+ {
+ rtx op1 = operands[1];
+@@ -5314,7 +5314,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(const_int 0)]
+ {
+ operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
+@@ -5375,7 +5375,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(set (match_dup 0) (float:MODEF (match_dup 1)))])
+
+ (define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit"
+@@ -5410,7 +5410,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 0) (float:MODEF (match_dup 2)))])
+
+@@ -5423,7 +5423,7 @@
+ && reload_completed
+ && (SSE_REG_P (operands[0])
+ || (GET_CODE (operands[0]) == SUBREG
+- && SSE_REG_P (operands[0])))"
++ && SSE_REG_P (SUBREG_REG (operands[0]))))"
+ [(set (match_dup 0) (float:MODEF (match_dup 1)))])
+
+ (define_insn "*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp"
+@@ -9222,7 +9222,7 @@
+ (match_dup 0)))
+ (set (match_dup 1)
+ (if_then_else:SWI48 (ne (reg:CCZ FLAGS_REG) (const_int 0))
+- (match_operand:SWI48 3 "register_operand" "r")
++ (match_operand:SWI48 3 "register_operand" "")
+ (match_dup 1)))]
+ "TARGET_CMOVE"
+ "operands[4] = GEN_INT (GET_MODE_BITSIZE (<MODE>mode));")
+@@ -14625,7 +14625,7 @@
+ emit_insn (gen_sse4_1_round<mode>2
+ (operands[0], operands[1], GEN_INT (0x04)));
+ else
+- ix86_expand_rint (operand0, operand1);
++ ix86_expand_rint (operands[0], operands[1]);
+ }
else
{
-- rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP);
-+ rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL);
- emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
- DONE;
- }
-@@ -3868,7 +3868,7 @@
- DONE;
- }
+@@ -14649,9 +14649,9 @@
+ if (optimize_insn_for_size_p ())
+ FAIL;
+ if (TARGET_64BIT || (<MODE>mode != DFmode))
+- ix86_expand_round (operand0, operand1);
++ ix86_expand_round (operands[0], operands[1]);
else
-- operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP);
-+ operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL);
+- ix86_expand_rounddf_32 (operand0, operand1);
++ ix86_expand_rounddf_32 (operands[0], operands[1]);
+ DONE;
+ })
+
+@@ -14796,7 +14796,7 @@
+ {
+ if (optimize_insn_for_size_p ())
+ FAIL;
+- ix86_expand_lround (operand0, operand1);
++ ix86_expand_lround (operands[0], operands[1]);
+ DONE;
})
- (define_insn "*truncxfsf2_mixed"
-@@ -3966,7 +3966,7 @@
- DONE;
+@@ -14871,9 +14871,9 @@
+ emit_insn (gen_sse4_1_round<mode>2
+ (operands[0], operands[1], GEN_INT (0x01)));
+ else if (TARGET_64BIT || (<MODE>mode != DFmode))
+- ix86_expand_floorceil (operand0, operand1, true);
++ ix86_expand_floorceil (operands[0], operands[1], true);
+ else
+- ix86_expand_floorceildf_32 (operand0, operand1, true);
++ ix86_expand_floorceildf_32 (operands[0], operands[1], true);
}
else
-- operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP);
-+ operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL);
+ {
+@@ -15053,7 +15053,7 @@
+ {
+ if (TARGET_64BIT && optimize_insn_for_size_p ())
+ FAIL;
+- ix86_expand_lfloorceil (operand0, operand1, true);
++ ix86_expand_lfloorceil (operands[0], operands[1], true);
+ DONE;
})
- (define_insn "*truncxfdf2_mixed"
-@@ -4749,7 +4749,7 @@
- (define_insn "*addti3_1"
- [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o")
- (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0")
-- (match_operand:TI 2 "general_operand" "roiF,riF")))
-+ (match_operand:TI 2 "x86_64_general_operand" "roe,re")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)"
- "#")
-@@ -4757,7 +4757,7 @@
- (define_split
- [(set (match_operand:TI 0 "nonimmediate_operand" "")
- (plus:TI (match_operand:TI 1 "nonimmediate_operand" "")
-- (match_operand:TI 2 "general_operand" "")))
-+ (match_operand:TI 2 "x86_64_general_operand" "")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && reload_completed"
- [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)]
-@@ -6483,7 +6483,7 @@
- (define_insn "*subti3_1"
- [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o")
- (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0")
-- (match_operand:TI 2 "general_operand" "roiF,riF")))
-+ (match_operand:TI 2 "x86_64_general_operand" "roe,re")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)"
- "#")
-@@ -6491,7 +6491,7 @@
- (define_split
- [(set (match_operand:TI 0 "nonimmediate_operand" "")
- (minus:TI (match_operand:TI 1 "nonimmediate_operand" "")
-- (match_operand:TI 2 "general_operand" "")))
-+ (match_operand:TI 2 "x86_64_general_operand" "")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && reload_completed"
- [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2)))
-@@ -9326,7 +9326,7 @@
-
- (define_insn "*negti2_1"
- [(set (match_operand:TI 0 "nonimmediate_operand" "=ro")
-- (neg:TI (match_operand:TI 1 "general_operand" "0")))
-+ (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT
- && ix86_unary_operator_ok (NEG, TImode, operands)"
-@@ -9334,7 +9334,7 @@
+@@ -15128,9 +15128,9 @@
+ else if (optimize_insn_for_size_p ())
+ FAIL;
+ else if (TARGET_64BIT || (<MODE>mode != DFmode))
+- ix86_expand_floorceil (operand0, operand1, false);
++ ix86_expand_floorceil (operands[0], operands[1], false);
+ else
+- ix86_expand_floorceildf_32 (operand0, operand1, false);
++ ix86_expand_floorceildf_32 (operands[0], operands[1], false);
+ }
+ else
+ {
+@@ -15308,7 +15308,7 @@
+ "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
+ && !flag_trapping_math"
+ {
+- ix86_expand_lfloorceil (operand0, operand1, false);
++ ix86_expand_lfloorceil (operands[0], operands[1], false);
+ DONE;
+ })
- (define_split
- [(set (match_operand:TI 0 "nonimmediate_operand" "")
-- (neg:TI (match_operand:TI 1 "general_operand" "")))
-+ (neg:TI (match_operand:TI 1 "nonimmediate_operand" "")))
- (clobber (reg:CC FLAGS_REG))]
- "TARGET_64BIT && reload_completed"
- [(parallel
+@@ -15383,9 +15383,9 @@
+ else if (optimize_insn_for_size_p ())
+ FAIL;
+ else if (TARGET_64BIT || (<MODE>mode != DFmode))
+- ix86_expand_trunc (operand0, operand1);
++ ix86_expand_trunc (operands[0], operands[1]);
+ else
+- ix86_expand_truncdf_32 (operand0, operand1);
++ ix86_expand_truncdf_32 (operands[0], operands[1]);
+ }
+ else
+ {
+@@ -18285,8 +18285,8 @@
+ (match_operand:SI 3 "const_int_operand" "i")]
+ UNSPECV_LWPVAL_INTRINSIC)]
+ "TARGET_LWP"
+- "/* Avoid unused variable warning. */
+- (void) operand0;")
++ ;; Avoid unused variable warning.
++ "(void) operands[0];")
+
+ (define_insn "*lwp_lwpval<mode>3_1"
+ [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")
Index: gcc/config/i386/sse.md
===================================================================
---- gcc/config/i386/sse.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/i386/sse.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2055,11 +2055,11 @@
- (match_dup 1))
- (parallel [(const_int 0)
- (const_int 2)])))]
-- "TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
-+ "TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
- "@
- movddup\t{%1, %0|%0, %1}
- #"
-- [(set_attr "type" "sselog,ssemov")
-+ [(set_attr "type" "sselog1,ssemov")
- (set_attr "mode" "V2DF")])
-
- (define_split
-@@ -3494,9 +3494,10 @@
- "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+--- gcc/config/i386/sse.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/sse.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4521,15 +4521,14 @@
+ [(set (match_operand:V4DF 0 "register_operand" "=x,x")
+ (vec_select:V4DF
+ (vec_concat:V8DF
+- (match_operand:V4DF 1 "nonimmediate_operand" "xm,x")
+- (match_operand:V4DF 2 "nonimmediate_operand" " 1,xm"))
++ (match_operand:V4DF 1 "nonimmediate_operand" " x,m")
++ (match_operand:V4DF 2 "nonimmediate_operand" "xm,1"))
+ (parallel [(const_int 0) (const_int 4)
+ (const_int 2) (const_int 6)])))]
+- "TARGET_AVX
+- && (!MEM_P (operands[1]) || rtx_equal_p (operands[1], operands[2]))"
++ "TARGET_AVX"
"@
- movhps\t{%1, %0|%0, %1}
-- psrldq\t{$4, %0|%0, 4}
-+ psrldq\t{$8, %0|%0, 8}
- movq\t{%H1, %0|%0, %H1}"
- [(set_attr "type" "ssemov,sseishft,ssemov")
-+ (set_attr "memory" "*,none,*")
- (set_attr "mode" "V2SF,TI,TI")])
-
- ;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva
+- vmovddup\t{%1, %0|%0, %1}
+- vunpcklpd\t{%2, %1, %0|%0, %1, %2}"
++ vunpcklpd\t{%2, %1, %0|%0, %1, %2}
++ vmovddup\t{%1, %0|%0, %1}"
+ [(set_attr "type" "sselog")
+ (set_attr "prefix" "vex")
+ (set_attr "mode" "V4DF")])
+Index: gcc/config/i386/freebsd.h
+===================================================================
+--- gcc/config/i386/freebsd.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/freebsd.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -147,3 +147,6 @@
+ #if FBSD_MAJOR >= 6
+ #define SUBTARGET32_DEFAULT_CPU "i486"
+ #endif
++
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+Index: gcc/config/i386/driver-i386.c
+===================================================================
+--- gcc/config/i386/driver-i386.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/driver-i386.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -507,7 +507,7 @@
+ processor = PROCESSOR_AMDFAM10;
+ else if (has_sse2 || has_longmode)
+ processor = PROCESSOR_K8;
+- else if (has_3dnowp)
++ else if (has_3dnowp && family == 6)
+ processor = PROCESSOR_ATHLON;
+ else if (has_mmx)
+ processor = PROCESSOR_K6;
+Index: gcc/config/i386/avxintrin.h
+===================================================================
+--- gcc/config/i386/avxintrin.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/avxintrin.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -759,7 +759,7 @@
+
+ #ifdef __x86_64__
+ extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+-_mm256_insert_epi64 (__m256i __X, int __D, int const __N)
++_mm256_insert_epi64 (__m256i __X, long long __D, int const __N)
+ {
+ __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1);
+ __Y = _mm_insert_epi64 (__Y, __D, __N % 2);
Index: gcc/config/i386/i386.c
===================================================================
---- gcc/config/i386/i386.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/i386/i386.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -13478,6 +13478,9 @@
-
- gcc_assert (n < MAX_386_STACK_LOCALS);
-
-+ /* Virtual slot is valid only before vregs are instantiated. */
-+ gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated);
-+
- for (s = ix86_stack_locals; s; s = s->next)
- if (s->mode == mode && s->n == n)
- return s->rtl;
-@@ -14567,6 +14570,7 @@
- IX86_BUILTIN_VEC_EXT_V4SF,
- IX86_BUILTIN_VEC_EXT_V4SI,
- IX86_BUILTIN_VEC_EXT_V8HI,
-+ IX86_BUILTIN_VEC_EXT_V16QI,
- IX86_BUILTIN_VEC_EXT_V2SI,
- IX86_BUILTIN_VEC_EXT_V4HI,
- IX86_BUILTIN_VEC_SET_V8HI,
-@@ -15539,13 +15543,13 @@
- /* Access to the vec_extract patterns. */
- ftype = build_function_type_list (double_type_node, V2DF_type_node,
- integer_type_node, NULL_TREE);
-- def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df",
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df",
- ftype, IX86_BUILTIN_VEC_EXT_V2DF);
-
- ftype = build_function_type_list (long_long_integer_type_node,
- V2DI_type_node, integer_type_node,
- NULL_TREE);
-- def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di",
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di",
- ftype, IX86_BUILTIN_VEC_EXT_V2DI);
-
- ftype = build_function_type_list (float_type_node, V4SF_type_node,
-@@ -15555,12 +15559,12 @@
-
- ftype = build_function_type_list (intSI_type_node, V4SI_type_node,
- integer_type_node, NULL_TREE);
-- def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si",
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si",
- ftype, IX86_BUILTIN_VEC_EXT_V4SI);
-
- ftype = build_function_type_list (intHI_type_node, V8HI_type_node,
- integer_type_node, NULL_TREE);
-- def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi",
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi",
- ftype, IX86_BUILTIN_VEC_EXT_V8HI);
-
- ftype = build_function_type_list (intHI_type_node, V4HI_type_node,
-@@ -15573,11 +15577,15 @@
- def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si",
- ftype, IX86_BUILTIN_VEC_EXT_V2SI);
-
-+ ftype = build_function_type_list (intQI_type_node, V16QI_type_node,
-+ integer_type_node, NULL_TREE);
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI);
-+
- /* Access to the vec_set patterns. */
- ftype = build_function_type_list (V8HI_type_node, V8HI_type_node,
- intHI_type_node,
- integer_type_node, NULL_TREE);
-- def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi",
-+ def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi",
- ftype, IX86_BUILTIN_VEC_SET_V8HI);
-
- ftype = build_function_type_list (V4HI_type_node, V4HI_type_node,
-@@ -16121,13 +16129,13 @@
-
- case IX86_BUILTIN_LDMXCSR:
- op0 = expand_normal (TREE_VALUE (arglist));
-- target = assign_386_stack_local (SImode, SLOT_TEMP);
-+ target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
- emit_move_insn (target, op0);
- emit_insn (gen_sse_ldmxcsr (target));
- return 0;
+--- gcc/config/i386/i386.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/i386/i386.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -16329,7 +16329,6 @@
+ basic_block bb = BLOCK_FOR_INSN (insn);
+ int distance = 0;
+ df_ref *def_rec;
+- enum attr_type insn_type;
- case IX86_BUILTIN_STMXCSR:
-- target = assign_386_stack_local (SImode, SLOT_TEMP);
-+ target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
- emit_insn (gen_sse_stmxcsr (target));
- return copy_to_mode_reg (SImode, target);
-
-@@ -16489,6 +16497,7 @@
- case IX86_BUILTIN_VEC_EXT_V4SF:
- case IX86_BUILTIN_VEC_EXT_V4SI:
- case IX86_BUILTIN_VEC_EXT_V8HI:
-+ case IX86_BUILTIN_VEC_EXT_V16QI:
- case IX86_BUILTIN_VEC_EXT_V2SI:
- case IX86_BUILTIN_VEC_EXT_V4HI:
- return ix86_expand_vec_ext_builtin (arglist, target);
-Index: gcc/config/sh/sh.c
-===================================================================
---- gcc/config/sh/sh.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/sh/sh.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -5295,7 +5295,13 @@
- temp = scavenge_reg (&temps);
+ if (insn != BB_HEAD (bb))
+ {
+@@ -16345,8 +16344,8 @@
+ && (regno1 == DF_REF_REGNO (*def_rec)
+ || regno2 == DF_REF_REGNO (*def_rec)))
+ {
+- insn_type = get_attr_type (prev);
+- if (insn_type != TYPE_LEA)
++ if (recog_memoized (prev) < 0
++ || get_attr_type (prev) != TYPE_LEA)
+ goto done;
+ }
}
- if (temp < 0 && live_regs_mask)
-- temp = scavenge_reg (live_regs_mask);
-+ {
-+ HARD_REG_SET temps;
-+
-+ COPY_HARD_REG_SET (temps, *live_regs_mask);
-+ CLEAR_HARD_REG_BIT (temps, REGNO (reg));
-+ temp = scavenge_reg (&temps);
-+ }
- if (temp < 0)
+@@ -16385,8 +16384,8 @@
+ && (regno1 == DF_REF_REGNO (*def_rec)
+ || regno2 == DF_REF_REGNO (*def_rec)))
+ {
+- insn_type = get_attr_type (prev);
+- if (insn_type != TYPE_LEA)
++ if (recog_memoized (prev) < 0
++ || get_attr_type (prev) != TYPE_LEA)
+ goto done;
+ }
+ }
+Index: gcc/config/avr/libgcc.S
+===================================================================
+--- gcc/config/avr/libgcc.S (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/avr/libgcc.S (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -582,7 +582,16 @@
+ push r17
+ push r28
+ push r29
++#if defined (__AVR_HAVE_8BIT_SP__)
++;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
++;; so this lines are dead code. To make it work, devices without
++;; SP_H must get their own multilib(s), see PR51345.
+ in r28,__SP_L__
++ sub r28,r26
++ clr r29
++ out __SP_L__,r28
++#else
++ in r28,__SP_L__
+ in r29,__SP_H__
+ sub r28,r26
+ sbc r29,r27
+@@ -591,6 +600,7 @@
+ out __SP_H__,r29
+ out __SREG__,__tmp_reg__
+ out __SP_L__,r28
++#endif
+ #if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+ #else
+@@ -625,6 +635,15 @@
+ ldd r16,Y+4
+ ldd r17,Y+3
+ ldd r26,Y+2
++#if defined (__AVR_HAVE_8BIT_SP__)
++;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
++;; so this lines are dead code. To make it work, devices without
++;; SP_H must get their own multilib(s).
++ ldd r29,Y+1
++ add r28,r30
++ out __SP_L__,r28
++ mov r28, r26
++#else
+ ldd r27,Y+1
+ add r28,r30
+ adc r29,__zero_reg__
+@@ -635,6 +654,7 @@
+ out __SP_L__,r28
+ mov_l r28, r26
+ mov_h r29, r27
++#endif
+ ret
+ .endfunc
+ #endif /* defined (L_epilogue) */
+Index: gcc/config/avr/avr.md
+===================================================================
+--- gcc/config/avr/avr.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/avr/avr.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -299,7 +299,7 @@
+ [(set (match_operand:HI 0 "stack_register_operand" "=q")
+ (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
+ UNSPECV_WRITE_SP_IRQ_OFF))]
+- ""
++ "!AVR_HAVE_8BIT_SP"
+ "out __SP_H__, %B1
+ out __SP_L__, %A1"
+ [(set_attr "length" "2")
+@@ -309,7 +309,7 @@
+ [(set (match_operand:HI 0 "stack_register_operand" "=q")
+ (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
+ UNSPECV_WRITE_SP_IRQ_ON))]
+- ""
++ "!AVR_HAVE_8BIT_SP"
+ "cli
+ out __SP_H__, %B1
+ sei
+Index: gcc/config/avr/avr-devices.c
+===================================================================
+--- gcc/config/avr/avr-devices.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/avr/avr-devices.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -70,7 +70,7 @@
+ { "attiny2313a", ARCH_AVR25, "__AVR_ATtiny2313A__", 1, 0x0060, "tn2313a" },
+ { "attiny24", ARCH_AVR25, "__AVR_ATtiny24__", 1, 0x0060, "tn24" },
+ { "attiny24a", ARCH_AVR25, "__AVR_ATtiny24A__", 1, 0x0060, "tn24a" },
+- { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 1, 0x0060, "tn4313" },
++ { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 0, 0x0060, "tn4313" },
+ { "attiny44", ARCH_AVR25, "__AVR_ATtiny44__", 0, 0x0060, "tn44" },
+ { "attiny44a", ARCH_AVR25, "__AVR_ATtiny44A__", 0, 0x0060, "tn44a" },
+ { "attiny84", ARCH_AVR25, "__AVR_ATtiny84__", 0, 0x0060, "tn84" },
+@@ -88,7 +88,7 @@
+ { "attiny87", ARCH_AVR25, "__AVR_ATtiny87__", 0, 0x0100, "tn87" },
+ { "attiny48", ARCH_AVR25, "__AVR_ATtiny48__", 0, 0x0100, "tn48" },
+ { "attiny88", ARCH_AVR25, "__AVR_ATtiny88__", 0, 0x0100, "tn88" },
+- { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 1, 0x0060, "86401" },
++ { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 0, 0x0060, "86401" },
+ /* Classic, > 8K, <= 64K. */
+ { "avr3", ARCH_AVR3, NULL, 0, 0x0060, "43355" },
+ { "at43usb355", ARCH_AVR3, "__AVR_AT43USB355__", 0, 0x0060, "43355" },
+Index: gcc/config/avr/avr.c
+===================================================================
+--- gcc/config/avr/avr.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/avr/avr.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1879,9 +1879,12 @@
+ }
+ else if (test_hard_reg_class (STACK_REG, src))
{
- rtx adj_reg, tmp_reg, mem;
-@@ -5344,6 +5350,9 @@
- emit_move_insn (adj_reg, mem);
- mem = gen_tmp_stack_mem (Pmode, gen_rtx_POST_INC (Pmode, reg));
- emit_move_insn (tmp_reg, mem);
-+ /* Tell flow the insns that pop r4/r5 aren't dead. */
-+ emit_insn (gen_rtx_USE (VOIDmode, tmp_reg));
-+ emit_insn (gen_rtx_USE (VOIDmode, adj_reg));
- return;
+- *l = 2;
+- return (AS2 (in,%A0,__SP_L__) CR_TAB
+- AS2 (in,%B0,__SP_H__));
++ *l = 2;
++ return AVR_HAVE_8BIT_SP
++ ? (AS2 (in,%A0,__SP_L__) CR_TAB
++ AS1 (clr,%B0))
++ : (AS2 (in,%A0,__SP_L__) CR_TAB
++ AS2 (in,%B0,__SP_H__));
}
- const_reg = gen_rtx_REG (GET_MODE (reg), temp);
-@@ -8618,7 +8627,7 @@
- else if (TARGET_SH4
- && get_attr_type (insn) == TYPE_DYN_SHIFT
- && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES
-- && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)),
-+ && reg_overlap_mentioned_p (SET_DEST (single_set (dep_insn)),
- XEXP (SET_SRC (single_set (insn)),
- 1)))
- cost++;
-Index: gcc/config/sh/sh.md
-===================================================================
---- gcc/config/sh/sh.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/sh/sh.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -413,10 +413,12 @@
- (eq_attr "type" "jump")
- (cond [(eq_attr "med_branch_p" "yes")
- (const_int 2)
-- (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))")
-- (symbol_ref "INSN"))
-- (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))")
-- (symbol_ref "code_for_indirect_jump_scratch")))
-+ (and (ne (symbol_ref "prev_nonnote_insn (insn)")
-+ (const_int 0))
-+ (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))")
-+ (symbol_ref "INSN"))
-+ (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))")
-+ (symbol_ref "code_for_indirect_jump_scratch"))))
- (cond [(eq_attr "braf_branch_p" "yes")
- (const_int 6)
- (eq (symbol_ref "flag_pic") (const_int 0))
-@@ -750,54 +752,6 @@
- (set_attr "type" "arith3")])
-
- (define_insn "cmpeqsi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (eq:DI (match_operand:SI 1 "logical_operand" "%r")
-- (match_operand:SI 2 "cmp_operand" "Nr")))]
-- "TARGET_SHMEDIA"
-- "cmpeq %1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpeqdi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (eq:DI (match_operand:DI 1 "register_operand" "%r")
-- (match_operand:DI 2 "cmp_operand" "Nr")))]
-- "TARGET_SHMEDIA"
-- "cmpeq %1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpgtsi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gt:DI (match_operand:SI 1 "cmp_operand" "Nr")
-- (match_operand:SI 2 "cmp_operand" "rN")))]
-- "TARGET_SHMEDIA"
-- "cmpgt %N1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpgtdi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr")
-- (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))]
-- "TARGET_SHMEDIA"
-- "cmpgt %N1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpgtusi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gtu:DI (match_operand:SI 1 "cmp_operand" "Nr")
-- (match_operand:SI 2 "cmp_operand" "rN")))]
-- "TARGET_SHMEDIA"
-- "cmpgtu %N1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpgtudi_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gtu:DI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr")
-- (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))]
-- "TARGET_SHMEDIA"
-- "cmpgtu %N1, %N2, %0"
-- [(set_attr "type" "cmp_media")])
--
--(define_insn "cmpsieqsi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (eq:SI (match_operand:SI 1 "logical_operand" "%r")
- (match_operand:SI 2 "cmp_operand" "Nr")))]
-@@ -805,7 +759,7 @@
- "cmpeq %1, %N2, %0"
- [(set_attr "type" "cmp_media")])
-
--(define_insn "cmpsieqdi_media"
-+(define_insn "cmpeqdi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (eq:SI (match_operand:DI 1 "register_operand" "%r")
- (match_operand:DI 2 "cmp_operand" "Nr")))]
-@@ -813,7 +767,7 @@
- "cmpeq %1, %N2, %0"
- [(set_attr "type" "cmp_media")])
-
--(define_insn "cmpsigtsi_media"
-+(define_insn "cmpgtsi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gt:SI (match_operand:SI 1 "cmp_operand" "Nr")
- (match_operand:SI 2 "cmp_operand" "rN")))]
-@@ -821,7 +775,7 @@
- "cmpgt %N1, %N2, %0"
- [(set_attr "type" "cmp_media")])
-
--(define_insn "cmpsigtdi_media"
-+(define_insn "cmpgtdi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gt:SI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr")
- (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))]
-@@ -829,7 +783,7 @@
- "cmpgt %N1, %N2, %0"
- [(set_attr "type" "cmp_media")])
-
--(define_insn "cmpsigtusi_media"
-+(define_insn "cmpgtusi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gtu:SI (match_operand:SI 1 "cmp_operand" "Nr")
- (match_operand:SI 2 "cmp_operand" "rN")))]
-@@ -837,7 +791,7 @@
- "cmpgtu %N1, %N2, %0"
- [(set_attr "type" "cmp_media")])
-
--(define_insn "cmpsigtudi_media"
-+(define_insn "cmpgtudi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gtu:SI (match_operand:DI 1 "arith_reg_or_0_operand" "Nr")
- (match_operand:DI 2 "arith_reg_or_0_operand" "rN")))]
-@@ -846,13 +800,6 @@
- [(set_attr "type" "cmp_media")])
-
- ; These two patterns are for combine.
--(define_insn "*cmpne0si_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (ne:DI (match_operand:SI 1 "arith_reg_operand" "r") (const_int 0)))]
-- "TARGET_SHMEDIA"
-- "cmpgtu %1,r63,%0"
-- [(set_attr "type" "cmp_media")])
--
- (define_insn "*cmpne0sisi_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (ne:SI (match_operand:SI 1 "arith_reg_operand" "r") (const_int 0)))]
-@@ -1177,7 +1124,7 @@
- {
- emit_insn (gen_movsicc_false (operands[0], operands[1], operands[2],
- operands[3]));
-- emit_insn (gen_cmpsigtusi_media (operands[5], operands[4], operands[0]));
-+ emit_insn (gen_cmpgtusi_media (operands[5], operands[4], operands[0]));
- emit_insn (gen_movsicc_false (operands[0], operands[5], operands[4],
- operands[0]));
- DONE;
-@@ -7200,7 +7147,7 @@
- }")
-
- (define_expand "bunordered"
-- [(set (match_dup 1) (unordered:DI (match_dup 2) (match_dup 3)))
-+ [(set (match_dup 1) (unordered:SI (match_dup 2) (match_dup 3)))
- (set (pc)
- (if_then_else (ne (match_dup 1) (const_int 0))
- (match_operand 0 "" "")
-@@ -7209,7 +7156,7 @@
- "
- {
- operands[0] = gen_rtx_LABEL_REF (Pmode, operands[0]);
-- operands[1] = gen_reg_rtx (DImode);
-+ operands[1] = gen_reg_rtx (SImode);
- operands[2] = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- operands[3] = force_reg (GET_MODE (sh_compare_op1), sh_compare_op1);
- }")
-@@ -8397,6 +8344,20 @@
- operands[2],
- gen_rtx_REG (Pmode, PIC_REG)));
-
-+ /* When stack protector inserts codes after the result is set to
-+ R0, @(rX, r12) will cause a spill failure for R0. Don't schedule
-+ insns to avoid combining (set A (plus rX r12)) and (set op0 (mem A))
-+ when rX is a GOT address for the guard symbol. Ugly but doesn't
-+ matter because this is a rare situation. */
-+ if (!TARGET_SHMEDIA
-+ && flag_stack_protect
-+ && GET_CODE (operands[1]) == CONST
-+ && GET_CODE (XEXP (operands[1], 0)) == UNSPEC
-+ && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == SYMBOL_REF
-+ && strcmp (XSTR (XVECEXP (XEXP (operands[1], 0), 0, 0), 0),
-+ \"__stack_chk_guard\") == 0)
-+ emit_insn (gen_blockage ());
-+
- /* N.B. This is not constant for a GOTPLT relocation. */
- mem = gen_rtx_MEM (Pmode, operands[3]);
- MEM_NOTRAP_P (mem) = 1;
-@@ -9112,6 +9073,8 @@
+
+ if (AVR_HAVE_MOVW)
+@@ -5151,6 +5154,7 @@
+ if (new_decl_p
+ && decl && DECL_P (decl)
+ && NULL_TREE == DECL_INITIAL (decl)
++ && !DECL_EXTERNAL (decl)
+ && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
+ {
+ warning (OPT_Wuninitialized,
+@@ -5173,10 +5177,10 @@
+
+ default_file_start ();
+
+-/* fprintf (asm_out_file, "\t.arch %s\n", avr_mcu_name);*/
+- fputs ("__SREG__ = 0x3f\n"
+- "__SP_H__ = 0x3e\n"
+- "__SP_L__ = 0x3d\n", asm_out_file);
++ fputs ("__SREG__ = 0x3f\n", asm_out_file);
++ if (!AVR_HAVE_8BIT_SP)
++ fputs ("__SP_H__ = 0x3e\n", asm_out_file);
++ fputs ("__SP_L__ = 0x3d\n", asm_out_file);
+
+ fputs ("__tmp_reg__ = 0\n"
+ "__zero_reg__ = 1\n", asm_out_file);
+Index: gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2612,6 +2612,7 @@
+ off. */
+ rs6000_altivec_abi = 1;
+ TARGET_ALTIVEC_VRSAVE = 1;
++ rs6000_current_abi = ABI_DARWIN;
+
+ if (DEFAULT_ABI == ABI_DARWIN
+ && TARGET_64BIT)
+@@ -6824,6 +6825,7 @@
+ #if TARGET_MACHO
+ && DEFAULT_ABI == ABI_DARWIN
+ && (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
++ && machopic_symbol_defined_p (x)
+ #else
+ && DEFAULT_ABI == ABI_V4
+ && !flag_pic
+@@ -16613,7 +16615,7 @@
+ if (TARGET_RELOCATABLE
+ && in_section != toc_section
+ && in_section != text_section
+- && !unlikely_text_section_p (in_section)
++ && (in_section && (in_section->common.flags & SECTION_CODE)) == 0
+ && !recurse
+ && GET_CODE (x) != CONST_INT
+ && GET_CODE (x) != CONST_DOUBLE
+@@ -20227,7 +20229,7 @@
{
- if (TARGET_SHMEDIA)
+ /* This blockage is needed so that sched doesn't decide to move
+ the sp change before the register restores. */
+- if (frame_reg_rtx != sp_reg_rtx
++ if (DEFAULT_ABI == ABI_V4
+ || (TARGET_SPE_ABI
+ && info->spe_64bit_regs_used != 0
+ && info->first_gp_reg_save != 32))
+@@ -20644,56 +20646,52 @@
{
-+ rtx reg;
+ int i;
+ rtx spe_save_area_ptr;
+-
++ int save_ptr_to_sp;
++ int ool_adjust = 0;
++
+ /* Determine whether we can address all of the registers that need
+- to be saved with an offset from the stack pointer that fits in
++ to be saved with an offset from frame_reg_rtx that fits in
+ the small const field for SPE memory instructions. */
+- int spe_regs_addressable_via_sp
+- = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
+- + (32 - info->first_gp_reg_save - 1) * reg_size)
++ int spe_regs_addressable
++ = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
++ + reg_size * (32 - info->first_gp_reg_save - 1))
+ && saving_GPRs_inline);
+ int spe_offset;
+-
+- if (spe_regs_addressable_via_sp)
+
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9126,26 +9089,26 @@
- switch (GET_MODE (sh_compare_op0))
- {
- case SImode:
-- emit_insn (gen_cmpsieqsi_media (operands[0],
-+ emit_insn (gen_cmpeqsi_media (operands[0],
- sh_compare_op0, sh_compare_op1));
- break;
-
- case DImode:
-- emit_insn (gen_cmpsieqdi_media (operands[0],
-+ emit_insn (gen_cmpeqdi_media (operands[0],
- sh_compare_op0, sh_compare_op1));
- break;
-
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpsieqsf_media (operands[0],
-+ emit_insn (gen_cmpeqsf_media (operands[0],
- sh_compare_op0, sh_compare_op1));
- break;
-
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpsieqdf_media (operands[0],
-+ emit_insn (gen_cmpeqdf_media (operands[0],
- sh_compare_op0, sh_compare_op1));
- break;
-
-@@ -9155,38 +9118,44 @@
- DONE;
++ if (spe_regs_addressable)
+ {
+ spe_save_area_ptr = frame_reg_rtx;
++ save_ptr_to_sp = info->total_size - sp_offset;
+ spe_offset = info->spe_gp_save_offset + sp_offset;
}
-
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
-
- switch (GET_MODE (sh_compare_op0))
+ else
{
- case SImode:
-- emit_insn (gen_cmpeqsi_media (operands[0],
-+ emit_insn (gen_cmpeqsi_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
-
- case DImode:
-- emit_insn (gen_cmpeqdi_media (operands[0],
-+ emit_insn (gen_cmpeqdi_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
-
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpeqsf_media (operands[0],
-+ emit_insn (gen_cmpeqsf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
-
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpeqdf_media (operands[0],
-+ emit_insn (gen_cmpeqdf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
-
- default:
- FAIL;
+ /* Make r11 point to the start of the SPE save area. We need
+ to be careful here if r11 is holding the static chain. If
+- it is, then temporarily save it in r0. We would use r0 as
+- our base register here, but using r0 as a base register in
+- loads and stores means something different from what we
+- would like. */
+- int ool_adjust = (saving_GPRs_inline
+- ? 0
+- : (info->first_gp_reg_save
+- - (FIRST_SAVRES_REGISTER+1))*8);
+- HOST_WIDE_INT offset = (info->spe_gp_save_offset
+- + sp_offset - ool_adjust);
++ it is, then temporarily save it in r0. */
++ int offset;
+
++ if (!saving_GPRs_inline)
++ ool_adjust = 8 * (info->first_gp_reg_save
++ - (FIRST_SAVRES_REGISTER + 1));
++ offset = info->spe_gp_save_offset + sp_offset - ool_adjust;
++ spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
++ save_ptr_to_sp = info->total_size - sp_offset + offset;
++ spe_offset = 0;
++
+ if (using_static_chain_p)
+ {
+ rtx r0 = gen_rtx_REG (Pmode, 0);
+ gcc_assert (info->first_gp_reg_save > 11);
+-
+- emit_move_insn (r0, gen_rtx_REG (Pmode, 11));
++
++ emit_move_insn (r0, spe_save_area_ptr);
+ }
+-
+- spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
+- insn = emit_insn (gen_addsi3 (spe_save_area_ptr,
+- frame_reg_rtx,
+- GEN_INT (offset)));
+- /* We need to make sure the move to r11 gets noted for
+- properly outputting unwind information. */
+- if (!saving_GPRs_inline)
+- rs6000_frame_related (insn, frame_reg_rtx, offset,
+- NULL_RTX, NULL_RTX);
+- spe_offset = 0;
++ emit_insn (gen_addsi3 (spe_save_area_ptr,
++ frame_reg_rtx, GEN_INT (offset)));
++ if (REGNO (frame_reg_rtx) == 11)
++ sp_offset = -info->spe_gp_save_offset + ool_adjust;
}
+-
+
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
+ if (saving_GPRs_inline)
+ {
+ for (i = 0; i < 32 - info->first_gp_reg_save; i++)
+@@ -20705,36 +20703,34 @@
+ /* We're doing all this to ensure that the offset fits into
+ the immediate offset of 'evstdd'. */
+ gcc_assert (SPE_CONST_OFFSET_OK (reg_size * i + spe_offset));
+-
+
- DONE;
- }
- if (sh_expand_t_scc (EQ, operands[0]))
-@@ -9204,8 +9173,8 @@
- {
- if (TARGET_SHMEDIA)
- {
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ rtx reg;
-+
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9213,35 +9182,44 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
-+
- switch (GET_MODE (sh_compare_op0))
+ offset = GEN_INT (reg_size * i + spe_offset);
+ addr = gen_rtx_PLUS (Pmode, spe_save_area_ptr, offset);
+ mem = gen_rtx_MEM (V2SImode, addr);
+-
++
+ insn = emit_move_insn (mem, reg);
+-
+- rs6000_frame_related (insn, spe_save_area_ptr,
+- info->spe_gp_save_offset
+- + sp_offset + reg_size * i,
+- offset, const0_rtx);
++
++ rs6000_frame_related (insn,
++ spe_save_area_ptr, save_ptr_to_sp,
++ NULL_RTX, NULL_RTX);
+ }
+ }
+ else
{
- case SImode:
-- emit_insn (gen_cmpgtsi_media (operands[0],
-+ emit_insn (gen_cmpgtsi_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
-
- case DImode:
-- emit_insn (gen_cmpgtdi_media (operands[0],
-+ emit_insn (gen_cmpgtdi_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
-
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgtsf_media (operands[0],
-+ emit_insn (gen_cmpgtsf_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
-
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgtdf_media (operands[0],
-+ emit_insn (gen_cmpgtdf_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
-
- default:
- FAIL;
+ rtx par;
+
+- par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
+- 0, reg_mode,
++ par = rs6000_make_savres_rtx (info, spe_save_area_ptr,
++ ool_adjust, reg_mode,
+ /*savep=*/true, /*gpr=*/true,
+ /*lr=*/false);
+ insn = emit_insn (par);
+- rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
++ rs6000_frame_related (insn, spe_save_area_ptr, save_ptr_to_sp,
+ NULL_RTX, NULL_RTX);
}
+-
+-
+
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-+
- DONE;
+ /* Move the static chain pointer back. */
+- if (using_static_chain_p && !spe_regs_addressable_via_sp)
+- emit_move_insn (gen_rtx_REG (Pmode, 11), gen_rtx_REG (Pmode, 0));
++ if (using_static_chain_p && !spe_regs_addressable)
++ emit_move_insn (spe_save_area_ptr, gen_rtx_REG (Pmode, 0));
}
- if (! currently_expanding_to_rtl)
-@@ -9258,8 +9236,8 @@
-
- if (TARGET_SHMEDIA)
+ else if (!WORLD_SAVE_P (info) && !saving_GPRs_inline)
{
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ rtx reg;
-+
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9267,45 +9245,54 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
-+
- switch (GET_MODE (sh_compare_op0))
- {
- case SImode:
- {
-- tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
+@@ -20743,10 +20739,12 @@
+ /* Need to adjust r11 (r12) if we saved any FPRs. */
+ if (info->first_fp_reg_save != 64)
+ {
+- rtx dest_reg = gen_rtx_REG (reg_mode, DEFAULT_ABI == ABI_AIX
+- ? 12 : 11);
+- rtx offset = GEN_INT (sp_offset
+- + (-8 * (64-info->first_fp_reg_save)));
++ rtx dest_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
++ int save_off = 8 * (64 - info->first_fp_reg_save);
++ rtx offset = GEN_INT (sp_offset - save_off);
++
++ if (REGNO (dest_reg) == REGNO (frame_reg_rtx))
++ sp_offset = save_off;
+ emit_insn (gen_add3_insn (dest_reg, frame_reg_rtx, offset));
+ }
- emit_insn (gen_cmpgtsi_media (tmp,
- sh_compare_op0, sh_compare_op1));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
- break;
- }
+@@ -21622,40 +21620,39 @@
+ && info->first_gp_reg_save != 32)
+ {
+ /* Determine whether we can address all of the registers that need
+- to be saved with an offset from the stack pointer that fits in
+- the small const field for SPE memory instructions. */
+- int spe_regs_addressable_via_sp
+- = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
+- + (32 - info->first_gp_reg_save - 1) * reg_size)
++ to be saved with an offset from frame_reg_rtx that fits in
++ the small const field for SPE memory instructions. */
++ int spe_regs_addressable
++ = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
++ + reg_size * (32 - info->first_gp_reg_save - 1))
+ && restoring_GPRs_inline);
+ int spe_offset;
++ int ool_adjust = 0;
+
+- if (spe_regs_addressable_via_sp)
++ if (spe_regs_addressable)
+ spe_offset = info->spe_gp_save_offset + sp_offset;
+ else
+- {
++ {
+ rtx old_frame_reg_rtx = frame_reg_rtx;
+- /* Make r11 point to the start of the SPE save area. We worried about
+- not clobbering it when we were saving registers in the prologue.
+- There's no need to worry here because the static chain is passed
+- anew to every function. */
+- int ool_adjust = (restoring_GPRs_inline
+- ? 0
+- : (info->first_gp_reg_save
+- - (FIRST_SAVRES_REGISTER+1))*8);
++ /* Make r11 point to the start of the SPE save area. We worried about
++ not clobbering it when we were saving registers in the prologue.
++ There's no need to worry here because the static chain is passed
++ anew to every function. */
+
+- if (frame_reg_rtx == sp_reg_rtx)
+- frame_reg_rtx = gen_rtx_REG (Pmode, 11);
+- emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
++ if (!restoring_GPRs_inline)
++ ool_adjust = 8 * (info->first_gp_reg_save
++ - (FIRST_SAVRES_REGISTER + 1));
++ frame_reg_rtx = gen_rtx_REG (Pmode, 11);
++ emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
+ GEN_INT (info->spe_gp_save_offset
+ + sp_offset
+ - ool_adjust)));
+ /* Keep the invariant that frame_reg_rtx + sp_offset points
+ at the top of the stack frame. */
+- sp_offset = -info->spe_gp_save_offset;
++ sp_offset = -info->spe_gp_save_offset + ool_adjust;
+
+- spe_offset = 0;
+- }
++ spe_offset = 0;
++ }
- case DImode:
- {
-- tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
+ if (restoring_GPRs_inline)
+ {
+@@ -21695,8 +21692,8 @@
+ {
+ rtx par;
+
+- par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
+- 0, reg_mode,
++ par = rs6000_make_savres_rtx (info, frame_reg_rtx,
++ ool_adjust, reg_mode,
+ /*savep=*/false, /*gpr=*/true,
+ /*lr=*/true);
+ emit_jump_insn (par);
+@@ -21717,12 +21714,12 @@
+ sp_offset, can_use_exit);
+ else
+ {
+- emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX
+- ? 12 : 11),
+- frame_reg_rtx,
++ rtx src_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
++
++ emit_insn (gen_add3_insn (src_reg, frame_reg_rtx,
+ GEN_INT (sp_offset - info->fp_size)));
+- if (REGNO (frame_reg_rtx) == 11)
+- sp_offset += info->fp_size;
++ if (REGNO (frame_reg_rtx) == REGNO (src_reg))
++ sp_offset = info->fp_size;
+ }
- emit_insn (gen_cmpgtdi_media (tmp,
- sh_compare_op0, sh_compare_op1));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
- break;
- }
+ par = rs6000_make_savres_rtx (info, frame_reg_rtx,
+@@ -27763,7 +27760,7 @@
+ if (strcmp (r, rs6000_opt_vars[i].name) == 0)
+ {
+ size_t j = rs6000_opt_vars[i].global_offset;
+- ((int *) &global_options)[j] = !invert;
++ *((int *) ((char *)&global_options + j)) = !invert;
+ error_p = false;
+ break;
+ }
+Index: gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -12241,8 +12241,8 @@
+ "
+ {
+ operands[3] = gen_reg_rtx (SImode);
+- operands[4] = gen_rtx_MEM (DImode,
+- gen_rtx_PLUS (DImode, stack_pointer_rtx,
++ operands[4] = gen_rtx_MEM (SImode,
++ gen_rtx_PLUS (SImode, stack_pointer_rtx,
+ GEN_INT (20)));
+
+ operands[5] = gen_rtx_MEM (SImode,
+Index: gcc/config/darwin.c
+===================================================================
+--- gcc/config/darwin.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/darwin.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1753,19 +1753,51 @@
+ return (!strncmp ((const char *)p, "_OBJC_", 6));
+ }
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgesf_media (operands[0],
-+ emit_insn (gen_cmpgesf_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
+-/* LTO support for Mach-O. */
++/* LTO support for Mach-O.
+
+-/* Section names for LTO sections. */
+-static unsigned int lto_section_names_offset = 0;
++ This version uses three mach-o sections to encapsulate the (unlimited
++ number of) lto sections.
+
+-/* This is the obstack which we use to allocate the many strings. */
+-static struct obstack lto_section_names_obstack;
++ __GNU_LTO, __lto_sections contains the concatented GNU LTO section data.
++ __GNU_LTO, __section_names contains the GNU LTO section names.
++ __GNU_LTO, __section_index contains an array of values that index these.
+
+-/* Segment name for LTO sections. */
++ Indexed thus:
++ <section offset from the start of __GNU_LTO, __lto_sections>,
++ <section length>
++ <name offset from the start of __GNU_LTO, __section_names,
++ <name length>.
++
++ At present, for both m32 and m64 mach-o files each of these fields is
++ represented by a uint32_t. This is because, AFAICT, a mach-o object
++ cannot exceed 4Gb because the section_64 offset field (see below) is 32bits.
++
++ uint32_t offset;
++ "offset An integer specifying the offset to this section in the file." */
++
++/* Count lto section numbers. */
++static unsigned int lto_section_num = 0;
++
++/* A vector of information about LTO sections, at present, we only have
++ the name. TODO: see if we can get the data length somehow. */
++typedef struct GTY (()) darwin_lto_section_e {
++ const char *sectname;
++} darwin_lto_section_e ;
++DEF_VEC_O(darwin_lto_section_e);
++DEF_VEC_ALLOC_O(darwin_lto_section_e, gc);
++
++static GTY (()) VEC (darwin_lto_section_e, gc) * lto_section_names;
++
++/* Segment for LTO data. */
+ #define LTO_SEGMENT_NAME "__GNU_LTO"
+
+-/* Section name for LTO section names section. */
+-#define LTO_NAMES_SECTION "__section_names"
++/* Section wrapper scheme (used here to wrap the unlimited number of LTO
++ sections into three Mach-O ones).
++ NOTE: These names MUST be kept in sync with those in
++ libiberty/simple-object-mach-o. */
++#define LTO_SECTS_SECTION "__wrapper_sects"
++#define LTO_NAMES_SECTION "__wrapper_names"
++#define LTO_INDEX_SECTION "__wrapper_index"
+
+ /* File to temporarily store LTO data. This is appended to asm_out_file
+ in darwin_end_file. */
+@@ -1808,37 +1840,38 @@
+ unsigned int flags,
+ tree decl ATTRIBUTE_UNUSED)
+ {
+- /* LTO sections go in a special segment __GNU_LTO. We want to replace the
+- section name with something we can use to represent arbitrary-length
+- names (section names in Mach-O are at most 16 characters long). */
++ /* LTO sections go in a special section that encapsulates the (unlimited)
++ number of GNU LTO sections within a single mach-o one. */
+ if (strncmp (name, LTO_SECTION_NAME_PREFIX,
+ strlen (LTO_SECTION_NAME_PREFIX)) == 0)
+ {
++ darwin_lto_section_e e;
+ /* We expect certain flags to be set... */
+ gcc_assert ((flags & (SECTION_DEBUG | SECTION_NAMED))
+ == (SECTION_DEBUG | SECTION_NAMED));
+
+- /* Add the section name to the things to output when we end the
+- current assembler output file.
+- This is all not very efficient, but that doesn't matter -- this
+- shouldn't be a hot path in the compiler... */
+- obstack_1grow (<o_section_names_obstack, '\t');
+- obstack_grow (<o_section_names_obstack, ".ascii ", 7);
+- obstack_1grow (<o_section_names_obstack, '"');
+- obstack_grow (<o_section_names_obstack, name, strlen (name));
+- obstack_grow (<o_section_names_obstack, "\\0\"\n", 4);
+-
+- /* Output the dummy section name. */
+- fprintf (asm_out_file, "\t# %s\n", name);
+- fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\n",
+- LTO_SEGMENT_NAME, lto_section_names_offset);
+-
+- /* Update the offset for the next section name. Make sure we stay
+- within reasonable length. */
+- lto_section_names_offset += strlen (name) + 1;
+- gcc_assert (lto_section_names_offset > 0
+- && lto_section_names_offset < ((unsigned) 1 << 31));
+- }
++ /* Switch to our combined section. */
++ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
++ LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
++ /* Output a label for the start of this sub-section. */
++ fprintf (asm_out_file, "L_GNU_LTO%d:\t;# %s\n",
++ lto_section_num, name);
++ /* We have to jump through hoops to get the values of the intra-section
++ offsets... */
++ fprintf (asm_out_file, "\t.set L$gnu$lto$offs%d,L_GNU_LTO%d-L_GNU_LTO0\n",
++ lto_section_num, lto_section_num);
++ fprintf (asm_out_file,
++ "\t.set L$gnu$lto$size%d,L_GNU_LTO%d-L_GNU_LTO%d\n",
++ lto_section_num, lto_section_num+1, lto_section_num);
++ lto_section_num++;
++ e.sectname = xstrdup (name);
++ /* Keep the names, we'll need to make a table later.
++ TODO: check that we do not revisit sections, that would break
++ the assumption of how this is done. */
++ if (lto_section_names == NULL)
++ lto_section_names = VEC_alloc (darwin_lto_section_e, gc, 16);
++ VEC_safe_push (darwin_lto_section_e, gc, lto_section_names, &e);
++ }
+ else if (strncmp (name, "__DWARF,", 8) == 0)
+ darwin_asm_dwarf_section (name, flags, decl);
+ else
+@@ -2711,16 +2744,12 @@
+ darwin_asm_output_dwarf_delta (file, size, lab, sname);
+ }
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgedf_media (operands[0],
-+ emit_insn (gen_cmpgedf_media (reg,
- sh_compare_op1, sh_compare_op0));
- break;
+-/* Called from the within the TARGET_ASM_FILE_START for each target.
+- Initialize the stuff we need for LTO long section names support. */
++/* Called from the within the TARGET_ASM_FILE_START for each target. */
- default:
- FAIL;
- }
-+
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-+
- DONE;
- }
+ void
+ darwin_file_start (void)
+ {
+- /* We fill this obstack with the complete section text for the lto section
+- names to write in darwin_file_end. */
+- obstack_init (<o_section_names_obstack);
+- lto_section_names_offset = 0;
++ /* Nothing to do. */
+ }
-@@ -9323,8 +9310,12 @@
+ /* Called for the TARGET_ASM_FILE_END hook.
+@@ -2731,8 +2760,6 @@
+ void
+ darwin_file_end (void)
{
- if (TARGET_SHMEDIA)
+- const char *lto_section_names;
+-
+ machopic_finish (asm_out_file);
+ if (strcmp (lang_hooks.name, "GNU C++") == 0)
{
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ rtx reg;
-+
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9335,32 +9326,36 @@
- switch (GET_MODE (sh_compare_op0))
- {
- case SImode:
-- emit_insn (gen_cmpgtsi_media (operands[0],
-+ emit_insn (gen_cmpgtsi_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
+@@ -2762,6 +2789,13 @@
+ lto_asm_txt = buf = (char *) xmalloc (n + 1);
+ while (fgets (lto_asm_txt, n, lto_asm_out_file))
+ fputs (lto_asm_txt, asm_out_file);
++ /* Put a termination label. */
++ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
++ LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
++ fprintf (asm_out_file, "L_GNU_LTO%d:\t;# end of lto\n",
++ lto_section_num);
++ /* Make sure our termination label stays in this section. */
++ fputs ("\t.space\t1\n", asm_out_file);
+ }
- case DImode:
-- emit_insn (gen_cmpgtdi_media (operands[0],
-+ emit_insn (gen_cmpgtdi_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
+ /* Remove the temporary file. */
+@@ -2770,21 +2804,50 @@
+ free (lto_asm_out_name);
+ }
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgtsf_media (operands[0],
-+ emit_insn (gen_cmpgtsf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
+- /* Finish the LTO section names obstack. Don't output anything if
+- there are no recorded section names. */
+- obstack_1grow (<o_section_names_obstack, '\0');
+- lto_section_names = XOBFINISH (<o_section_names_obstack, const char *);
+- if (strlen (lto_section_names) > 0)
++ /* Output the names and indices. */
++ if (lto_section_names && VEC_length (darwin_lto_section_e, lto_section_names))
+ {
+- fprintf (asm_out_file,
+- "\t.section %s,%s,regular,debug\n",
++ int count;
++ darwin_lto_section_e *ref;
++ /* For now, we'll make the offsets 4 bytes and unaligned - we'll fix
++ the latter up ourselves. */
++ const char *op = integer_asm_op (4,0);
++
++ /* Emit the names. */
++ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
+ LTO_SEGMENT_NAME, LTO_NAMES_SECTION);
+- fprintf (asm_out_file,
+- "\t# Section names in %s are offsets into this table\n",
+- LTO_SEGMENT_NAME);
+- fprintf (asm_out_file, "%s\n", lto_section_names);
++ FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
++ {
++ fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\n", count);
++ /* We have to jump through hoops to get the values of the intra-section
++ offsets... */
++ fprintf (asm_out_file,
++ "\t.set L$gnu$lto$noff%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME0\n",
++ count, count);
++ fprintf (asm_out_file,
++ "\t.set L$gnu$lto$nsiz%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME%d\n",
++ count, count+1, count);
++ fprintf (asm_out_file, "\t.asciz\t\"%s\"\n", ref->sectname);
++ }
++ fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\t;# end\n", lto_section_num);
++ /* make sure our termination label stays in this section. */
++ fputs ("\t.space\t1\n", asm_out_file);
++
++ /* Emit the Index. */
++ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
++ LTO_SEGMENT_NAME, LTO_INDEX_SECTION);
++ fputs ("\t.align\t2\n", asm_out_file);
++ fputs ("# Section offset, Section length, Name offset, Name length\n",
++ asm_out_file);
++ FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
++ {
++ fprintf (asm_out_file, "%s L$gnu$lto$offs%d\t;# %s\n",
++ op, count, ref->sectname);
++ fprintf (asm_out_file, "%s L$gnu$lto$size%d\n", op, count);
++ fprintf (asm_out_file, "%s L$gnu$lto$noff%d\n", op, count);
++ fprintf (asm_out_file, "%s L$gnu$lto$nsiz%d\n", op, count);
++ }
+ }
+- obstack_free (<o_section_names_obstack, NULL);
+
+ /* If we have section anchors, then we must prevent the linker from
+ re-arranging data. */
+Index: gcc/config/arm/thumb2.md
+===================================================================
+--- gcc/config/arm/thumb2.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/arm/thumb2.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -257,7 +257,7 @@
+ (not:SI (match_operator:SI 1 "arm_comparison_operator"
+ [(match_operand 2 "cc_register" "") (const_int 0)])))]
+ "TARGET_THUMB2"
+- "ite\\t%D1\;mov%D1\\t%0, #0\;mvn%d1\\t%0, #1"
++ "ite\\t%D1\;mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1"
+ [(set_attr "conds" "use")
+ (set_attr "length" "10")]
+ )
+Index: gcc/config/arm/arm.c
+===================================================================
+--- gcc/config/arm/arm.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/arm/arm.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3570,6 +3570,10 @@
+ add_libcall (libcall_htab,
+ convert_optab_libfunc (trunc_optab, HFmode, SFmode));
+ add_libcall (libcall_htab,
++ convert_optab_libfunc (sfix_optab, SImode, DFmode));
++ add_libcall (libcall_htab,
++ convert_optab_libfunc (ufix_optab, SImode, DFmode));
++ add_libcall (libcall_htab,
+ convert_optab_libfunc (sfix_optab, DImode, DFmode));
+ add_libcall (libcall_htab,
+ convert_optab_libfunc (ufix_optab, DImode, DFmode));
+@@ -5077,6 +5081,14 @@
+ if (IS_STACKALIGN (func_type))
+ return false;
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgtdf_media (operands[0],
-+ emit_insn (gen_cmpgtdf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
++ /* The AAPCS says that, on bare-metal, calls to unresolved weak
++ references should become a NOP. Don't convert such calls into
++ sibling calls. */
++ if (TARGET_AAPCS_BASED
++ && arm_abi == ARM_ABI_AAPCS
++ && DECL_WEAK (decl))
++ return false;
++
+ /* Everything else is ok. */
+ return true;
+ }
+@@ -5379,11 +5391,7 @@
- default:
- FAIL;
+ if (TARGET_32BIT)
+ {
+- emit_insn (gen_pic_load_addr_32bit (pic_reg, pic_rtx));
+- if (TARGET_ARM)
+- emit_insn (gen_pic_add_dot_plus_eight (pic_reg, pic_reg, labelno));
+- else
+- emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno));
++ emit_insn (gen_pic_load_addr_unified (pic_reg, pic_rtx, labelno));
}
-+
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-+
- DONE;
- }
- if (! currently_expanding_to_rtl)
-@@ -9376,12 +9371,15 @@
- {
- if (TARGET_SHMEDIA)
- {
-+ rtx reg;
- enum machine_mode mode = GET_MODE (sh_compare_op0);
-
- if ((mode) == VOIDmode)
- mode = GET_MODE (sh_compare_op1);
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (mode, sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (mode, sh_compare_op1);
-@@ -9390,41 +9388,45 @@
+ else /* TARGET_THUMB1 */
{
- case SImode:
- {
-- rtx tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ rtx tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
-
- emit_insn (gen_cmpgtsi_media (tmp,
- sh_compare_op1, sh_compare_op0));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
- break;
- }
+@@ -5396,10 +5404,10 @@
+ thumb_find_work_register (saved_regs));
+ emit_insn (gen_pic_load_addr_thumb1 (pic_tmp, pic_rtx));
+ emit_insn (gen_movsi (pic_offset_table_rtx, pic_tmp));
++ emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno));
+ }
+ else
+- emit_insn (gen_pic_load_addr_thumb1 (pic_reg, pic_rtx));
+- emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno));
++ emit_insn (gen_pic_load_addr_unified (pic_reg, pic_rtx, labelno));
+ }
+ }
- case DImode:
- {
-- rtx tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ rtx tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
+@@ -5429,20 +5437,7 @@
+ UNSPEC_SYMBOL_OFFSET);
+ offset_rtx = gen_rtx_CONST (Pmode, offset_rtx);
- emit_insn (gen_cmpgtdi_media (tmp,
- sh_compare_op1, sh_compare_op0));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
- break;
- }
+- if (TARGET_32BIT)
+- {
+- emit_insn (gen_pic_load_addr_32bit (reg, offset_rtx));
+- if (TARGET_ARM)
+- insn = emit_insn (gen_pic_add_dot_plus_eight (reg, reg, labelno));
+- else
+- insn = emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno));
+- }
+- else /* TARGET_THUMB1 */
+- {
+- emit_insn (gen_pic_load_addr_thumb1 (reg, offset_rtx));
+- insn = emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno));
+- }
+-
++ insn = emit_insn (gen_pic_load_addr_unified (reg, offset_rtx, labelno));
+ return insn;
+ }
- case SFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgesf_media (operands[0],
-+ emit_insn (gen_cmpgesf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
+@@ -5485,7 +5480,7 @@
+ will_be_in_index_register (const_rtx x)
+ {
+ /* arm.md: calculate_pic_address will split this into a register. */
+- return GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM;
++ return GET_CODE (x) == UNSPEC && (XINT (x, 1) == UNSPEC_PIC_SYM);
+ }
- case DFmode:
- if (! TARGET_SHMEDIA_FPU)
- FAIL;
-- emit_insn (gen_cmpgedf_media (operands[0],
-+ emit_insn (gen_cmpgedf_media (reg,
- sh_compare_op0, sh_compare_op1));
- break;
+ /* Return nonzero if X is a valid ARM state address operand. */
+@@ -7233,6 +7228,15 @@
+ *total = COSTS_N_INSNS (4);
+ return true;
- default:
- FAIL;
- }
-+
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
++ case UNSPEC:
++ /* We cost this as high as our memory costs to allow this to
++ be hoisted from loops. */
++ if (XINT (x, 1) == UNSPEC_PIC_UNIFIED)
++ {
++ *total = COSTS_N_INSNS (2 + ARM_NUM_REGS (mode));
++ }
++ return true;
+
- DONE;
- }
-
-@@ -9456,8 +9458,12 @@
- {
- if (TARGET_SHMEDIA)
- {
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ rtx reg;
-+
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) == DImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9465,8 +9471,11 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-- emit_insn (gen_cmpgtudi_media (operands[0],
-+ emit_insn (gen_cmpgtudi_media (reg,
- sh_compare_op0, sh_compare_op1));
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-+
- DONE;
- }
- if (! currently_expanding_to_rtl)
-@@ -9482,8 +9491,12 @@
- {
- if (TARGET_SHMEDIA)
- {
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ rtx reg;
-+
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) == DImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9491,8 +9504,11 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-- emit_insn (gen_cmpgtudi_media (operands[0],
-+ emit_insn (gen_cmpgtudi_media (reg,
- sh_compare_op1, sh_compare_op0));
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-+
- DONE;
- }
- if (! currently_expanding_to_rtl)
-@@ -9508,10 +9524,12 @@
- {
- if (TARGET_SHMEDIA)
- {
-- rtx tmp;
-+ rtx tmp, reg;
-
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9519,10 +9537,12 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-- tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
-
- emit_insn (gen_cmpgtudi_media (tmp, sh_compare_op0, sh_compare_op1));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-
- DONE;
- }
-@@ -9539,10 +9559,12 @@
- {
- if (TARGET_SHMEDIA)
- {
-- rtx tmp;
-+ rtx tmp, reg;
-
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- sh_compare_op0 = force_reg (GET_MODE (sh_compare_op0), sh_compare_op0);
- if (sh_compare_op1 != const0_rtx)
- sh_compare_op1 = force_reg (GET_MODE (sh_compare_op1) == VOIDmode
-@@ -9550,10 +9572,12 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-- tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (SImode);
-
- emit_insn (gen_cmpgtudi_media (tmp, sh_compare_op1, sh_compare_op0));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-
- DONE;
- }
-@@ -9584,11 +9608,12 @@
+ default:
+ *total = COSTS_N_INSNS (4);
+ return false;
+@@ -9426,7 +9430,8 @@
+ arm_note_pic_base (rtx *x, void *date ATTRIBUTE_UNUSED)
{
- if (TARGET_SHMEDIA)
- {
-- rtx tmp;
-+ rtx tmp, reg;
+ if (GET_CODE (*x) == UNSPEC
+- && XINT (*x, 1) == UNSPEC_PIC_BASE)
++ && (XINT (*x, 1) == UNSPEC_PIC_BASE
++ || XINT (*x, 1) == UNSPEC_PIC_UNIFIED))
+ return 1;
+ return 0;
+ }
+@@ -9812,6 +9817,9 @@
+ rtx base_reg_rtx = NULL;
+ int i, stm_case;
+
++ /* Write back of base register is currently only supported for Thumb 1. */
++ int base_writeback = TARGET_THUMB1;
++
+ /* Can only handle up to MAX_LDM_STM_OPS insns at present, though could be
+ easily extended if required. */
+ gcc_assert (nops >= 2 && nops <= MAX_LDM_STM_OPS);
+@@ -9869,7 +9877,9 @@
+ /* If it isn't an integer register, then we can't do this. */
+ if (unsorted_regs[i] < 0
+ || (TARGET_THUMB1 && unsorted_regs[i] > LAST_LO_REGNUM)
+- || (TARGET_THUMB2 && unsorted_regs[i] == base_reg)
++ /* The effects are unpredictable if the base register is
++ both updated and stored. */
++ || (base_writeback && unsorted_regs[i] == base_reg)
+ || (TARGET_THUMB2 && unsorted_regs[i] == SP_REGNUM)
+ || unsorted_regs[i] > 14)
+ return 0;
+@@ -19571,39 +19581,34 @@
+ emit_move_insn (mem, tmp2);
+ }
-- if (GET_MODE (operands[0]) != DImode)
-- operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0);
--
-+ reg = operands[0];
-+ if (GET_MODE (operands[0]) != SImode)
-+ reg = no_new_pseudos ? gen_rtx_SUBREG (SImode, operands[0], 0)
-+ : gen_reg_rtx (SImode);
- if (! TARGET_SHMEDIA_FPU
- && GET_MODE (sh_compare_op0) != DImode
- && GET_MODE (sh_compare_op0) != SImode)
-@@ -9601,10 +9626,12 @@
- : GET_MODE (sh_compare_op1),
- sh_compare_op1);
-
-- tmp = no_new_pseudos ? operands[0] : gen_reg_rtx (DImode);
-+ tmp = no_new_pseudos ? reg : gen_reg_rtx (SImode);
-
- emit_insn (gen_seq (tmp));
-- emit_insn (gen_cmpeqdi_media (operands[0], tmp, const0_rtx));
-+ emit_insn (gen_cmpeqdi_media (reg, tmp, const0_rtx));
-+ if (GET_MODE (operands[0]) == DImode)
-+ emit_insn (gen_extendsidi2 (operands[0], reg));
-
- DONE;
- }
-@@ -9618,8 +9645,8 @@
- }")
-
- (define_expand "sunordered"
-- [(set (match_operand:DI 0 "arith_reg_operand" "")
-- (unordered:DI (match_dup 1) (match_dup 2)))]
-+ [(set (match_operand:SI 0 "arith_reg_operand" "")
-+ (unordered:SI (match_dup 1) (match_dup 2)))]
- "TARGET_SHMEDIA_FPU"
- "
+-/* Set up operands for a register copy from src to dest, taking care not to
+- clobber registers in the process.
+- FIXME: This has rather high polynomial complexity (O(n^3)?) but shouldn't
+- be called with a large N, so that should be OK. */
++/* Set up OPERANDS for a register copy from SRC to DEST, taking care
++ not to early-clobber SRC registers in the process.
+
++ We assume that the operands described by SRC and DEST represent a
++ decomposed copy of OPERANDS[1] into OPERANDS[0]. COUNT is the
++ number of components into which the copy has been decomposed. */
+ void
+ neon_disambiguate_copy (rtx *operands, rtx *dest, rtx *src, unsigned int count)
{
-@@ -10378,14 +10405,6 @@
- (set_attr "fp_mode" "single")])
-
- (define_insn "cmpeqsf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (eq:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")
-- (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
-- "TARGET_SHMEDIA_FPU"
-- "fcmpeq.s %1, %2, %0"
-- [(set_attr "type" "fcmp_media")])
--
--(define_insn "cmpsieqsf_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (eq:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")
- (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
-@@ -10394,24 +10413,24 @@
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpgtsf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gt:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gt:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")
- (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpgt.s %1, %2, %0"
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpgesf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (ge:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ge:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")
- (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpge.s %1, %2, %0"
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpunsf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (unordered:DI (match_operand:SF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unordered:SI (match_operand:SF 1 "fp_arith_reg_operand" "f")
- (match_operand:SF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpun.s %1, %2, %0"
-@@ -10884,14 +10903,6 @@
- (set_attr "fp_mode" "double")])
-
- (define_insn "cmpeqdf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (eq:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
-- (match_operand:DF 2 "fp_arith_reg_operand" "f")))]
-- "TARGET_SHMEDIA_FPU"
-- "fcmpeq.d %1,%2,%0"
-- [(set_attr "type" "fcmp_media")])
--
--(define_insn "cmpsieqdf_media"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (eq:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")
- (match_operand:DF 2 "fp_arith_reg_operand" "f")))]
-@@ -10900,24 +10911,24 @@
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpgtdf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (gt:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (gt:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")
- (match_operand:DF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpgt.d %1,%2,%0"
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpgedf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (ge:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (ge:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")
- (match_operand:DF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpge.d %1,%2,%0"
- [(set_attr "type" "fcmp_media")])
-
- (define_insn "cmpundf_media"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-- (unordered:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unordered:SI (match_operand:DF 1 "fp_arith_reg_operand" "f")
- (match_operand:DF 2 "fp_arith_reg_operand" "f")))]
- "TARGET_SHMEDIA_FPU"
- "fcmpun.d %1,%2,%0"
-Index: gcc/config/score/predicates.md
-===================================================================
---- gcc/config/score/predicates.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/score/predicates.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -75,14 +75,3 @@
- return IMM_IN_RANGE (INTVAL (op), 15, 1);
- })
+- unsigned int copied = 0, opctr = 0;
+- unsigned int done = (1 << count) - 1;
+- unsigned int i, j;
++ unsigned int i;
--(define_predicate "const_pow2"
-- (match_code "const_int")
--{
-- return IMM_IS_POW_OF_2 ((unsigned HOST_WIDE_INT) INTVAL (op), 0, 31);
--})
--
--(define_predicate "const_npow2"
-- (match_code "const_int")
--{
-- return IMM_IS_POW_OF_2 (~(unsigned HOST_WIDE_INT) INTVAL (op), 0, 31);
--})
-Index: gcc/config/score/misc.md
-===================================================================
---- gcc/config/score/misc.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/score/misc.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -380,38 +380,3 @@
- [(set_attr "type" "arith")
- (set_attr "mode" "SI")])
-
--(define_insn "bitclr_c"
-- [(set (match_operand:SI 0 "register_operand" "=e,d")
-- (and:SI (match_operand:SI 1 "register_operand" "0,d")
-- (match_operand:SI 2 "const_npow2")))
-- (clobber (reg:CC CC_REGNUM))]
-- ""
-- "@
-- bitclr! %0, %F2
-- bitclr.c %0, %1, %F2"
-- [(set_attr "type" "arith")
-- (set_attr "mode" "SI")])
+- while (copied != done)
++ if (!reg_overlap_mentioned_p (operands[0], operands[1])
++ || REGNO (operands[0]) < REGNO (operands[1]))
+ {
+ for (i = 0; i < count; i++)
+- {
+- int good = 1;
-
--(define_insn "bitset_c"
-- [(set (match_operand:SI 0 "register_operand" "=e,d")
-- (ior:SI (match_operand:SI 1 "register_operand" "0,d")
-- (match_operand:SI 2 "const_pow2")))
-- (clobber (reg:CC CC_REGNUM))]
-- ""
-- "@
-- bitset! %0, %E2
-- bitset.c %0, %1, %E2"
-- [(set_attr "type" "arith")
-- (set_attr "mode" "SI")])
+- for (j = 0; good && j < count; j++)
+- if (i != j && (copied & (1 << j)) == 0
+- && reg_overlap_mentioned_p (src[j], dest[i]))
+- good = 0;
-
--(define_insn "bittgl_c"
-- [(set (match_operand:SI 0 "register_operand" "=e,d")
-- (xor:SI (match_operand:SI 1 "register_operand" "0,d")
-- (match_operand:SI 2 "const_pow2")))
-- (clobber (reg:CC CC_REGNUM))]
-- ""
-- "@
-- bittgl! %0, %E2
-- bittgl.c %0, %1, %E2"
-- [(set_attr "type" "arith")
-- (set_attr "mode" "SI")])
-Index: gcc/config/score/score.c
-===================================================================
---- gcc/config/score/score.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/score/score.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1168,7 +1168,7 @@
- {
- gcc_assert (code == CONST_INT);
- fprintf (file, HOST_WIDE_INT_PRINT_HEX,
-- (unsigned HOST_WIDE_INT) INTVAL (op) >> 16);
-+ (INTVAL (op) >> 16) & 0xffff);
+- if (good)
+- {
+- operands[opctr++] = dest[i];
+- operands[opctr++] = src[i];
+- copied |= 1 << i;
+- }
+- }
++ {
++ operands[2 * i] = dest[i];
++ operands[2 * i + 1] = src[i];
++ }
}
- else if (c == 'D')
+-
+- gcc_assert (opctr == count * 2);
++ else
++ {
++ for (i = 0; i < count; i++)
++ {
++ operands[2 * i] = dest[count - i - 1];
++ operands[2 * i + 1] = src[count - i - 1];
++ }
++ }
+ }
+
+ /* Expand an expression EXP that calls a built-in function,
+@@ -20859,6 +20864,8 @@
+ gcc_assert (amount >= 0);
+ if (amount)
{
-@@ -1176,7 +1176,7 @@
- {
- rtx temp = gen_lowpart (SImode, op);
- gcc_assert (GET_MODE (op) == SFmode);
-- fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp));
-+ fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp) & 0xffffffff);
- }
- else
- output_addr_const (file, op);
-Index: gcc/config/score/score.h
-===================================================================
---- gcc/config/score/score.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/score/score.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -785,6 +785,7 @@
- output anything and let undefined symbol become external. However
- the assembler uses length information on externals to allocate in
- data/sdata bss/sbss, thereby saving exec time. */
-+#undef ASM_OUTPUT_EXTERNAL
- #define ASM_OUTPUT_EXTERNAL(STREAM, DECL, NAME) \
- score_output_external (STREAM, DECL, NAME)
-
-Index: gcc/config/pa/pa.md
-===================================================================
---- gcc/config/pa/pa.md (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/pa/pa.md (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -39,6 +39,9 @@
- (UNSPEC_TLSLDBASE 7)
- (UNSPEC_TLSIE 8)
- (UNSPEC_TLSLE 9)
-+ (UNSPEC_TLSGD_PIC 10)
-+ (UNSPEC_TLSLDM_PIC 11)
-+ (UNSPEC_TLSIE_PIC 12)
- ])
-
- ;; UNSPEC_VOLATILE:
-@@ -9890,33 +9893,55 @@
- (define_insn "tgd_load"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (unspec:SI [(match_operand 1 "tgd_symbolic_operand" "")] UNSPEC_TLSGD))
-- (clobber (reg:SI 1))]
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 27))]
- ""
- "*
- {
-- if (flag_pic)
-- return \"addil LT'%1-$tls_gdidx$,%%r19\;ldo RT'%1-$tls_gdidx$(%%r1),%0\";
-- else
-- return \"addil LR'%1-$tls_gdidx$,%%r27\;ldo RR'%1-$tls_gdidx$(%%r1),%0\";
-+ return \"addil LR'%1-$tls_gdidx$,%%r27\;ldo RR'%1-$tls_gdidx$(%%r1),%0\";
- }"
- [(set_attr "type" "multi")
- (set_attr "length" "8")])
-
-+(define_insn "tgd_load_pic"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "tgd_symbolic_operand" "")] UNSPEC_TLSGD_PIC))
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 19))]
-+ ""
-+ "*
-+{
-+ return \"addil LT'%1-$tls_gdidx$,%%r19\;ldo RT'%1-$tls_gdidx$(%%r1),%0\";
-+}"
-+ [(set_attr "type" "multi")
-+ (set_attr "length" "8")])
-+
- (define_insn "tld_load"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (unspec:SI [(match_operand 1 "tld_symbolic_operand" "")] UNSPEC_TLSLDM))
-- (clobber (reg:SI 1))]
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 27))]
- ""
- "*
- {
-- if (flag_pic)
-- return \"addil LT'%1-$tls_ldidx$,%%r19\;ldo RT'%1-$tls_ldidx$(%%r1),%0\";
-- else
-- return \"addil LR'%1-$tls_ldidx$,%%r27\;ldo RR'%1-$tls_ldidx$(%%r1),%0\";
-+ return \"addil LR'%1-$tls_ldidx$,%%r27\;ldo RR'%1-$tls_ldidx$(%%r1),%0\";
- }"
- [(set_attr "type" "multi")
- (set_attr "length" "8")])
-
-+(define_insn "tld_load_pic"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "tld_symbolic_operand" "")] UNSPEC_TLSLDM_PIC))
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 19))]
-+ ""
-+ "*
-+{
-+ return \"addil LT'%1-$tls_ldidx$,%%r19\;ldo RT'%1-$tls_ldidx$(%%r1),%0\";
-+}"
-+ [(set_attr "type" "multi")
-+ (set_attr "length" "8")])
-+
- (define_insn "tld_offset_load"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (unspec:SI [(match_operand 1 "tld_symbolic_operand" "")]
-@@ -9942,18 +9967,29 @@
- (define_insn "tie_load"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (unspec:SI [(match_operand 1 "tie_symbolic_operand" "")] UNSPEC_TLSIE))
-- (clobber (reg:SI 1))]
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 27))]
- ""
- "*
- {
-- if (flag_pic)
-- return \"addil LT'%1-$tls_ieoff$,%%r19\;ldw RT'%1-$tls_ieoff$(%%r1),%0\";
-- else
-- return \"addil LR'%1-$tls_ieoff$,%%r27\;ldw RR'%1-$tls_ieoff$(%%r1),%0\";
-+ return \"addil LR'%1-$tls_ieoff$,%%r27\;ldw RR'%1-$tls_ieoff$(%%r1),%0\";
- }"
- [(set_attr "type" "multi")
- (set_attr "length" "8")])
-
-+(define_insn "tie_load_pic"
-+ [(set (match_operand:SI 0 "register_operand" "=r")
-+ (unspec:SI [(match_operand 1 "tie_symbolic_operand" "")] UNSPEC_TLSIE_PIC))
-+ (clobber (reg:SI 1))
-+ (use (reg:SI 19))]
-+ ""
-+ "*
-+{
-+ return \"addil LT'%1-$tls_ieoff$,%%r19\;ldw RT'%1-$tls_ieoff$(%%r1),%0\";
-+}"
-+ [(set_attr "type" "multi")
-+ (set_attr "length" "8")])
++ emit_insn (gen_blockage ());
++
+ if (amount < 512)
+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
+ GEN_INT (amount)));
+Index: gcc/config/arm/arm.md
+===================================================================
+--- gcc/config/arm/arm.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/arm/arm.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -104,6 +104,7 @@
+ (UNSPEC_SYMBOL_OFFSET 27) ; The offset of the start of the symbol from
+ ; another symbolic address.
+ (UNSPEC_MEMORY_BARRIER 28) ; Represent a memory barrier.
++ (UNSPEC_PIC_UNIFIED 29) ; Create a common pic addressing form.
+ ]
+ )
+
+@@ -3272,7 +3273,7 @@
+ bool need_else;
+
+ if (which_alternative != 0 || operands[3] != const0_rtx
+- || (code != PLUS && code != MINUS && code != IOR && code != XOR))
++ || (code != PLUS && code != IOR && code != XOR))
+ need_else = true;
+ else
+ need_else = false;
+@@ -5257,6 +5258,30 @@
+ "operands[3] = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0];"
+ )
+
++;; operand1 is the memory address to go into
++;; pic_load_addr_32bit.
++;; operand2 is the PIC label to be emitted
++;; from pic_add_dot_plus_eight.
++;; We do this to allow hoisting of the entire insn.
++(define_insn_and_split "pic_load_addr_unified"
++ [(set (match_operand:SI 0 "s_register_operand" "=r,r,l")
++ (unspec:SI [(match_operand:SI 1 "" "mX,mX,mX")
++ (match_operand:SI 2 "" "")]
++ UNSPEC_PIC_UNIFIED))]
++ "flag_pic"
++ "#"
++ "&& reload_completed"
++ [(set (match_dup 0) (unspec:SI [(match_dup 1)] UNSPEC_PIC_SYM))
++ (set (match_dup 0) (unspec:SI [(match_dup 0) (match_dup 3)
++ (match_dup 2)] UNSPEC_PIC_BASE))]
++ "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);"
++ [(set_attr "type" "load1,load1,load1")
++ (set_attr "pool_range" "4096,4096,1024")
++ (set_attr "neg_pool_range" "4084,0,0")
++ (set_attr "arch" "a,t2,t1")
++ (set_attr "length" "8,6,4")]
++)
+
- (define_insn "tle_load"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (unspec:SI [(match_operand 1 "tle_symbolic_operand" "")]
+ ;; The rather odd constraints on the following are to force reload to leave
+ ;; the insn alone, and to force the minipool generation pass to then move
+ ;; the GOT symbol to memory.
+@@ -7346,7 +7371,7 @@
+ (not:SI (match_operator:SI 1 "arm_comparison_operator"
+ [(match_operand 2 "cc_register" "") (const_int 0)])))]
+ "TARGET_ARM"
+- "mov%D1\\t%0, #0\;mvn%d1\\t%0, #1"
++ "mvn%D1\\t%0, #0\;mvn%d1\\t%0, #1"
+ [(set_attr "conds" "use")
+ (set_attr "insn" "mov")
+ (set_attr "length" "8")]
Index: gcc/config/pa/pa.c
===================================================================
---- gcc/config/pa/pa.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/pa/pa.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -726,7 +726,10 @@
+--- gcc/config/pa/pa.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/pa/pa.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1863,6 +1863,11 @@
+ /* Handle the most common case: storing into a register. */
+ else if (register_operand (operand0, mode))
{
- case TLS_MODEL_GLOBAL_DYNAMIC:
- tmp = gen_reg_rtx (Pmode);
-- emit_insn (gen_tgd_load (tmp, addr));
-+ if (flag_pic)
-+ emit_insn (gen_tgd_load_pic (tmp, addr));
-+ else
-+ emit_insn (gen_tgd_load (tmp, addr));
- ret = hppa_tls_call (tmp);
- break;
-
-@@ -734,7 +737,10 @@
- ret = gen_reg_rtx (Pmode);
- tmp = gen_reg_rtx (Pmode);
- start_sequence ();
-- emit_insn (gen_tld_load (tmp, addr));
-+ if (flag_pic)
-+ emit_insn (gen_tld_load_pic (tmp, addr));
-+ else
-+ emit_insn (gen_tld_load (tmp, addr));
- t1 = hppa_tls_call (tmp);
- insn = get_insns ();
- end_sequence ();
-@@ -750,7 +756,10 @@
- tmp = gen_reg_rtx (Pmode);
- ret = gen_reg_rtx (Pmode);
- emit_insn (gen_tp_load (tp));
-- emit_insn (gen_tie_load (tmp, addr));
-+ if (flag_pic)
-+ emit_insn (gen_tie_load_pic (tmp, addr));
-+ else
-+ emit_insn (gen_tie_load (tmp, addr));
- emit_move_insn (ret, gen_rtx_PLUS (Pmode, tp, tmp));
- break;
-
-Index: gcc/config/soft-fp/quad.h
-===================================================================
---- gcc/config/soft-fp/quad.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/quad.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Definitions for IEEE Quad Precision.
-- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com),
- Jakub Jelinek (jj@ultra.linux.cz),
-@@ -176,15 +176,15 @@
- } longs;
- struct {
- #if __BYTE_ORDER == __BIG_ENDIAN
-- unsigned sign : 1;
-- unsigned exp : _FP_EXPBITS_Q;
-- unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
-- unsigned long frac0 : _FP_W_TYPE_SIZE;
-+ unsigned sign : 1;
-+ unsigned exp : _FP_EXPBITS_Q;
-+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
-+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
- #else
-- unsigned long frac0 : _FP_W_TYPE_SIZE;
-- unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
-- unsigned exp : _FP_EXPBITS_Q;
-- unsigned sign : 1;
-+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
-+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
-+ unsigned exp : _FP_EXPBITS_Q;
-+ unsigned sign : 1;
- #endif
- } bits;
- };
-Index: gcc/config/soft-fp/floatunsidf.c
++ /* Legitimize TLS symbol references. This happens for references
++ that aren't a legitimate constant. */
++ if (PA_SYMBOL_REF_TLS_P (operand1))
++ operand1 = legitimize_tls_address (operand1);
++
+ if (register_operand (operand1, mode)
+ || (GET_CODE (operand1) == CONST_INT
+ && cint_ok_for_move (INTVAL (operand1)))
+Index: gcc/config/pa/pa.h
+===================================================================
+--- gcc/config/pa/pa.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/pa/pa.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -848,6 +848,9 @@
+ && (NEW_HP_ASSEMBLER \
+ || TARGET_GAS \
+ || GET_CODE (X) != LABEL_REF) \
++ && (!PA_SYMBOL_REF_TLS_P (X) \
++ || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC \
++ && SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC)) \
+ && (!TARGET_64BIT \
+ || GET_CODE (X) != CONST_DOUBLE) \
+ && (!TARGET_64BIT \
+Index: gcc/config/mips/mips.md
+===================================================================
+--- gcc/config/mips/mips.md (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/config/mips/mips.md (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -4707,7 +4707,7 @@
+ ;; of _gp from the start of this function. Operand 1 is the incoming
+ ;; function address.
+ (define_insn_and_split "loadgp_newabi_<mode>"
+- [(set (match_operand:P 0 "register_operand" "=d")
++ [(set (match_operand:P 0 "register_operand" "=&d")
+ (unspec:P [(match_operand:P 1)
+ (match_operand:P 2 "register_operand" "d")]
+ UNSPEC_LOADGP))]
+Index: gcc/cfgrtl.c
+===================================================================
+--- gcc/cfgrtl.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/cfgrtl.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1642,9 +1642,10 @@
+ putc ('\n', outf);
+ }
+
+- for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
+- insn = NEXT_INSN (insn))
+- print_rtl_single (outf, insn);
++ if (bb->index != ENTRY_BLOCK && bb->index != EXIT_BLOCK)
++ for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
++ insn = NEXT_INSN (insn))
++ print_rtl_single (outf, insn);
+
+ if (df)
+ {
+Index: gcc/reload1.c
===================================================================
---- gcc/config/soft-fp/floatunsidf.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/floatunsidf.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Convert a 32bit unsigned integer to IEEE double
-- Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com) and
- Jakub Jelinek (jj@ultra.linux.cz).
-@@ -32,8 +32,7 @@
- #include "soft-fp.h"
- #include "double.h"
-
--double
--__floatunsidf(USItype i)
-+DFtype __floatunsidf(USItype i)
- {
- FP_DECL_EX;
- FP_DECL_D(A);
-Index: gcc/config/soft-fp/floatundidf.c
+--- gcc/reload1.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ gcc/reload1.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -3899,6 +3899,10 @@
+ if (XEXP (x, 0))
+ set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
+
++ for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
++ if (XEXP (x, 0))
++ set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
++
+ for_each_eh_label (set_initial_eh_label_offset);
+ }
+
+Index: zlib/configure
+===================================================================
+--- zlib/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ zlib/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8600,7 +8600,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9516,7 +9516,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9534,7 +9534,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: zlib/ChangeLog
===================================================================
---- gcc/config/soft-fp/floatundidf.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/floatundidf.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Convert a 64bit unsigned integer to IEEE double
-- Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com) and
- Jakub Jelinek (jj@ultra.linux.cz).
-@@ -32,8 +32,7 @@
- #include "soft-fp.h"
- #include "double.h"
-
--double
--__floatundidf(UDItype i)
-+DFtype __floatundidf(UDItype i)
- {
- FP_DECL_EX;
- FP_DECL_D(A);
-Index: gcc/config/soft-fp/extended.h
+--- zlib/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ zlib/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
++
++ * configure: Regenerate.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: libstdc++-v3/configure
===================================================================
---- gcc/config/soft-fp/extended.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/extended.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Definitions for IEEE Extended Precision.
-- Copyright (C) 1999,2006 Free Software Foundation, Inc.
-+ Copyright (C) 1999,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek (jj@ultra.linux.cz).
-
-@@ -94,12 +94,6 @@
- X##_f[1] = _flo.bits.frac1; \
- X##_e = _flo.bits.exp; \
- X##_s = _flo.bits.sign; \
-- if (!X##_e && (X##_f[1] || X##_f[0]) \
-- && !(X##_f[1] & _FP_IMPLBIT_E)) \
-- { \
-- X##_e++; \
-- FP_SET_EXCEPTION(FP_EX_DENORM); \
-- } \
- } while (0)
-
- #define FP_UNPACK_RAW_EP(X, val) \
-@@ -112,12 +106,6 @@
- X##_f[1] = _flo->bits.frac1; \
- X##_e = _flo->bits.exp; \
- X##_s = _flo->bits.sign; \
-- if (!X##_e && (X##_f[1] || X##_f[0]) \
-- && !(X##_f[1] & _FP_IMPLBIT_E)) \
-- { \
-- X##_e++; \
-- FP_SET_EXCEPTION(FP_EX_DENORM); \
-- } \
- } while (0)
-
- #define FP_PACK_RAW_E(val, X) \
-@@ -164,13 +152,13 @@
-
- #define FP_UNPACK_SEMIRAW_E(X,val) \
- do { \
-- _FP_UNPACK_RAW_E(X,val); \
-+ FP_UNPACK_RAW_E(X,val); \
- _FP_UNPACK_SEMIRAW(E,4,X); \
- } while (0)
-
- #define FP_UNPACK_SEMIRAW_EP(X,val) \
- do { \
-- _FP_UNPACK_RAW_EP(X,val); \
-+ FP_UNPACK_RAW_EP(X,val); \
- _FP_UNPACK_SEMIRAW(E,4,X); \
- } while (0)
-
-@@ -189,13 +177,13 @@
- #define FP_PACK_SEMIRAW_E(val,X) \
- do { \
- _FP_PACK_SEMIRAW(E,4,X); \
-- _FP_PACK_RAW_E(val,X); \
-+ FP_PACK_RAW_E(val,X); \
- } while (0)
-
- #define FP_PACK_SEMIRAW_EP(val,X) \
- do { \
- _FP_PACK_SEMIRAW(E,4,X); \
-- _FP_PACK_RAW_EP(val,X); \
-+ FP_PACK_RAW_EP(val,X); \
- } while (0)
-
- #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X)
-@@ -277,14 +265,14 @@
- XFtype flt;
- struct {
- #if __BYTE_ORDER == __BIG_ENDIAN
-- unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
-- unsigned sign : 1;
-- unsigned exp : _FP_EXPBITS_E;
-- unsigned long frac : _FP_W_TYPE_SIZE;
-+ _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
-+ unsigned sign : 1;
-+ unsigned exp : _FP_EXPBITS_E;
-+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
- #else
-- unsigned long frac : _FP_W_TYPE_SIZE;
-- unsigned exp : _FP_EXPBITS_E;
-- unsigned sign : 1;
-+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
-+ unsigned exp : _FP_EXPBITS_E;
-+ unsigned sign : 1;
- #endif
- } bits;
- };
-@@ -299,11 +287,6 @@
- X##_f1 = 0; \
- X##_e = _flo.bits.exp; \
- X##_s = _flo.bits.sign; \
-- if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
-- { \
-- X##_e++; \
-- FP_SET_EXCEPTION(FP_EX_DENORM); \
-- } \
- } while (0)
-
- #define FP_UNPACK_RAW_EP(X, val) \
-@@ -315,11 +298,6 @@
- X##_f1 = 0; \
- X##_e = _flo->bits.exp; \
- X##_s = _flo->bits.sign; \
-- if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
-- { \
-- X##_e++; \
-- FP_SET_EXCEPTION(FP_EX_DENORM); \
-- } \
- } while (0)
-
- #define FP_PACK_RAW_E(val, X) \
-@@ -365,13 +343,13 @@
-
- #define FP_UNPACK_SEMIRAW_E(X,val) \
- do { \
-- _FP_UNPACK_RAW_E(X,val); \
-+ FP_UNPACK_RAW_E(X,val); \
- _FP_UNPACK_SEMIRAW(E,2,X); \
- } while (0)
-
- #define FP_UNPACK_SEMIRAW_EP(X,val) \
- do { \
-- _FP_UNPACK_RAW_EP(X,val); \
-+ FP_UNPACK_RAW_EP(X,val); \
- _FP_UNPACK_SEMIRAW(E,2,X); \
- } while (0)
-
-@@ -390,13 +368,13 @@
- #define FP_PACK_SEMIRAW_E(val,X) \
- do { \
- _FP_PACK_SEMIRAW(E,2,X); \
-- _FP_PACK_RAW_E(val,X); \
-+ FP_PACK_RAW_E(val,X); \
- } while (0)
-
- #define FP_PACK_SEMIRAW_EP(val,X) \
- do { \
- _FP_PACK_SEMIRAW(E,2,X); \
-- _FP_PACK_RAW_EP(val,X); \
-+ FP_PACK_RAW_EP(val,X); \
- } while (0)
-
- #define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X)
-Index: gcc/config/soft-fp/floatunsisf.c
-===================================================================
---- gcc/config/soft-fp/floatunsisf.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/floatunsisf.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Convert a 32bit unsigned integer to IEEE single
-- Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com) and
- Jakub Jelinek (jj@ultra.linux.cz).
-@@ -32,8 +32,7 @@
- #include "soft-fp.h"
- #include "single.h"
-
--float
--__floatunsisf(USItype i)
-+SFtype __floatunsisf(USItype i)
- {
- FP_DECL_EX;
- FP_DECL_S(A);
-Index: gcc/config/soft-fp/op-common.h
-===================================================================
---- gcc/config/soft-fp/op-common.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/op-common.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1153,7 +1153,8 @@
- if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs \
- || (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs \
- < _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs) \
-- || _FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \
-+ || (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \
-+ && _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs)) \
- abort(); \
- D##_s = S##_s; \
- _FP_FRAC_COPY_##dwc##_##swc(D, S); \
-@@ -1168,6 +1169,14 @@
- { \
- if (_FP_FRAC_ZEROP_##swc(S)) \
- D##_e = 0; \
-+ else if (_FP_EXPBIAS_##dfs \
-+ < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \
-+ { \
-+ FP_SET_EXCEPTION(FP_EX_DENORM); \
-+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \
-+ - _FP_FRACBITS_##sfs)); \
-+ D##_e = 0; \
-+ } \
- else \
- { \
- int _lz; \
-@@ -1199,7 +1208,8 @@
- #define FP_TRUNC(dfs,sfs,dwc,swc,D,S) \
- do { \
- if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs \
-- || _FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \
-+ || (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \
-+ && _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs)) \
- abort(); \
- D##_s = S##_s; \
- if (_FP_EXP_NORMAL(sfs, swc, S)) \
-@@ -1211,8 +1221,11 @@
- { \
- if (D##_e <= 0) \
- { \
-- if (D##_e <= 1 - _FP_FRACBITS_##dfs) \
-- _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
-+ if (D##_e < 1 - _FP_FRACBITS_##dfs) \
-+ { \
-+ _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \
-+ _FP_FRAC_LOW_##swc(S) |= 1; \
-+ } \
- else \
- { \
- _FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \
-@@ -1234,11 +1247,24 @@
- if (S##_e == 0) \
- { \
- D##_e = 0; \
-- _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
-- if (!_FP_FRAC_ZEROP_##swc(S)) \
-+ if (_FP_FRAC_ZEROP_##swc(S)) \
-+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
-+ else \
- { \
- FP_SET_EXCEPTION(FP_EX_DENORM); \
-- FP_SET_EXCEPTION(FP_EX_INEXACT); \
-+ if (_FP_EXPBIAS_##sfs \
-+ < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \
-+ { \
-+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \
-+ - _FP_WFRACBITS_##dfs), \
-+ _FP_WFRACBITS_##sfs); \
-+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \
-+ } \
-+ else \
-+ { \
-+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \
-+ _FP_FRAC_LOW_##dwc(D) |= 1; \
-+ } \
- } \
- } \
- else \
-Index: gcc/config/soft-fp/floatundisf.c
-===================================================================
---- gcc/config/soft-fp/floatundisf.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/floatundisf.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Convert a 64bit unsigned integer to IEEE single
-- Copyright (C) 1997,1999, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com) and
- Jakub Jelinek (jj@ultra.linux.cz).
-@@ -32,8 +32,7 @@
- #include "soft-fp.h"
- #include "single.h"
-
--float
--__floatundisf(UDItype i)
-+SFtype __floatundisf(UDItype i)
- {
- FP_DECL_EX;
- FP_DECL_S(A);
-Index: gcc/config/soft-fp/op-2.h
+--- libstdc++-v3/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -9698,7 +9698,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -10614,7 +10614,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -10632,7 +10632,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -12522,7 +12522,7 @@
+ esac
+ ;;
+
+- freebsd[12]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+@@ -14297,7 +14297,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -14315,7 +14315,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libstdc++-v3/include/debug/unordered_map
===================================================================
---- gcc/config/soft-fp/op-2.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/op-2.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Basic two-word fraction declaration and manipulation.
-- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com),
- Jakub Jelinek (jj@ultra.linux.cz),
-@@ -613,3 +613,5 @@
- #define _FP_FRAC_COPY_1_2(D, S) (D##_f = S##_f0)
-
- #define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0))
-+
-+#define _FP_FRAC_COPY_2_2(D,S) _FP_FRAC_COPY_2(D,S)
-Index: gcc/config/soft-fp/op-4.h
-===================================================================
---- gcc/config/soft-fp/op-4.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/op-4.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Basic four-word fraction declaration and manipulation.
-- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com),
- Jakub Jelinek (jj@ultra.linux.cz),
-@@ -684,3 +684,5 @@
- D##_f[1] = S##_f1; \
- D##_f[2] = D##_f[3] = 0; \
- } while (0)
-+
-+#define _FP_FRAC_COPY_4_4(D,S) _FP_FRAC_COPY_4(D,S)
-Index: gcc/config/soft-fp/double.h
-===================================================================
---- gcc/config/soft-fp/double.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/config/soft-fp/double.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,6 @@
- /* Software floating-point emulation.
- Definitions for IEEE Double Precision
-- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
-+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@cygnus.com),
- Jakub Jelinek (jj@ultra.linux.cz),
-@@ -168,13 +168,13 @@
- DFtype flt;
- struct {
- #if __BYTE_ORDER == __BIG_ENDIAN
-- unsigned sign : 1;
-- unsigned exp : _FP_EXPBITS_D;
-- unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
-+ unsigned sign : 1;
-+ unsigned exp : _FP_EXPBITS_D;
-+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
+--- libstdc++-v3/include/debug/unordered_map (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/debug/unordered_map (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -276,6 +276,10 @@
+ }
+
+ iterator
++ erase(iterator __it)
++ { return erase(const_iterator(__it)); }
++
++ iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+@@ -558,6 +562,10 @@
+ }
+
+ iterator
++ erase(iterator __it)
++ { return erase(const_iterator(__it)); }
++
++ iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+Index: libstdc++-v3/include/debug/unordered_set
+===================================================================
+--- libstdc++-v3/include/debug/unordered_set (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/debug/unordered_set (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -269,6 +269,10 @@
+ }
+
+ iterator
++ erase(iterator __it)
++ { return erase(const_iterator(__it)); }
++
++ iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+@@ -539,6 +543,10 @@
+ }
+
+ iterator
++ erase(iterator __it)
++ { return erase(const_iterator(__it)); }
++
++ iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+Index: libstdc++-v3/include/debug/map.h
+===================================================================
+--- libstdc++-v3/include/debug/map.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/debug/map.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -273,6 +273,10 @@
+ this->_M_invalidate_if(_Equal(__position.base()));
+ return iterator(_Base::erase(__position.base()), this);
+ }
++
++ iterator
++ erase(iterator __position)
++ { return erase(const_iterator(__position)); }
#else
-- unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
-- unsigned exp : _FP_EXPBITS_D;
-- unsigned sign : 1;
-+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
-+ unsigned exp : _FP_EXPBITS_D;
-+ unsigned sign : 1;
- #endif
- } bits __attribute__((packed));
- };
-Index: gcc/tree-ssa-operands.c
+ void
+ erase(iterator __position)
+Index: libstdc++-v3/include/debug/multimap.h
+===================================================================
+--- libstdc++-v3/include/debug/multimap.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/debug/multimap.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -254,6 +254,10 @@
+ this->_M_invalidate_if(_Equal(__position.base()));
+ return iterator(_Base::erase(__position.base()), this);
+ }
++
++ iterator
++ erase(iterator __position)
++ { return erase(const_iterator(__position)); }
+ #else
+ void
+ erase(iterator __position)
+Index: libstdc++-v3/include/std/condition_variable
+===================================================================
+--- libstdc++-v3/include/std/condition_variable (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/std/condition_variable (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -198,10 +198,25 @@
+ void
+ wait(_Lock& __lock)
+ {
+- unique_lock<mutex> __my_lock(_M_mutex);
+- __lock.unlock();
+- _M_cond.wait(__my_lock);
+- __lock.lock();
++ // scoped unlock - unlocks in ctor, re-locks in dtor
++ struct _Unlock {
++ explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
++ ~_Unlock() noexcept(false)
++ {
++ if (uncaught_exception())
++ __try { _M_lock.lock(); } __catch(...) { }
++ else
++ _M_lock.lock();
++ }
++ _Lock& _M_lock;
++ };
++
++ unique_lock<mutex> __my_lock(_M_mutex);
++ _Unlock __unlock(__lock);
++ // _M_mutex must be unlocked before re-locking __lock so move
++ // ownership of _M_mutex lock to an object with shorter lifetime.
++ unique_lock<mutex> __my_lock2(std::move(__my_lock));
++ _M_cond.wait(__my_lock2);
+ }
+
+
+Index: libstdc++-v3/include/std/complex
===================================================================
---- gcc/tree-ssa-operands.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ gcc/tree-ssa-operands.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2162,9 +2162,14 @@
- {
- stmt_ann_t ann = get_stmt_ann (stmt);
-
-- /* Initially assume that the statement has no volatile operands. */
-+ /* Initially assume that the statement has no volatile operands and
-+ does not take the address of any symbols. */
- if (ann)
-- ann->has_volatile_ops = false;
-+ {
-+ ann->has_volatile_ops = false;
-+ if (ann->addresses_taken)
-+ ann->addresses_taken = NULL;
-+ }
+--- libstdc++-v3/include/std/complex (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/std/complex (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,7 +1,7 @@
+ // The template and inlines for the -*- C++ -*- complex number classes.
- start_ssa_stmt_operands ();
+ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+-// 2006, 2007, 2008, 2009, 2010
++// 2006, 2007, 2008, 2009, 2010, 2011
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -1695,12 +1695,9 @@
+ std::complex<_Tp>
+ __complex_acosh(const std::complex<_Tp>& __z)
+ {
+- std::complex<_Tp> __t((__z.real() - __z.imag())
+- * (__z.real() + __z.imag()) - _Tp(1.0),
+- _Tp(2.0) * __z.real() * __z.imag());
+- __t = std::sqrt(__t);
+-
+- return std::log(__t + __z);
++ // Kahan's formula.
++ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
++ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
+ }
-Index: libstdc++-v3/configure
+ #if _GLIBCXX_USE_C99_COMPLEX_TR1
+Index: libstdc++-v3/include/ext/type_traits.h
===================================================================
---- libstdc++-v3/configure (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/configure (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -5764,8 +5764,6 @@
+--- libstdc++-v3/include/ext/type_traits.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/ext/type_traits.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,6 +1,7 @@
+ // -*- C++ -*-
+
+-// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
++// Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011
++// Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the terms
+@@ -161,44 +162,50 @@
+ struct __promote
+ { typedef double __type; };
+
++ // No nested __type member for non-integer non-floating point types,
++ // allows this type to be used for SFINAE to constrain overloads in
++ // <cmath> and <complex> to only the intended types.
+ template<typename _Tp>
+ struct __promote<_Tp, false>
+- { typedef _Tp __type; };
++ { };
+
+- template<typename _Tp, typename _Up>
++ template<>
++ struct __promote<long double>
++ { typedef long double __type; };
++
++ template<>
++ struct __promote<double>
++ { typedef double __type; };
++
++ template<>
++ struct __promote<float>
++ { typedef float __type; };
++
++ template<typename _Tp, typename _Up,
++ typename _Tp2 = typename __promote<_Tp>::__type,
++ typename _Up2 = typename __promote<_Up>::__type>
+ struct __promote_2
+ {
+- private:
+- typedef typename __promote<_Tp>::__type __type1;
+- typedef typename __promote<_Up>::__type __type2;
+-
+- public:
+- typedef __typeof__(__type1() + __type2()) __type;
++ typedef __typeof__(_Tp2() + _Up2()) __type;
+ };
+
+- template<typename _Tp, typename _Up, typename _Vp>
++ template<typename _Tp, typename _Up, typename _Vp,
++ typename _Tp2 = typename __promote<_Tp>::__type,
++ typename _Up2 = typename __promote<_Up>::__type,
++ typename _Vp2 = typename __promote<_Vp>::__type>
+ struct __promote_3
+ {
+- private:
+- typedef typename __promote<_Tp>::__type __type1;
+- typedef typename __promote<_Up>::__type __type2;
+- typedef typename __promote<_Vp>::__type __type3;
+-
+- public:
+- typedef __typeof__(__type1() + __type2() + __type3()) __type;
++ typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
+ };
+
+- template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
++ template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
++ typename _Tp2 = typename __promote<_Tp>::__type,
++ typename _Up2 = typename __promote<_Up>::__type,
++ typename _Vp2 = typename __promote<_Vp>::__type,
++ typename _Wp2 = typename __promote<_Wp>::__type>
+ struct __promote_4
+ {
+- private:
+- typedef typename __promote<_Tp>::__type __type1;
+- typedef typename __promote<_Up>::__type __type2;
+- typedef typename __promote<_Vp>::__type __type3;
+- typedef typename __promote<_Wp>::__type __type4;
+-
+- public:
+- typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
++ typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
+ };
+
+ _GLIBCXX_END_NAMESPACE_VERSION
+Index: libstdc++-v3/include/profile/map.h
+===================================================================
+--- libstdc++-v3/include/profile/map.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/profile/map.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -326,6 +326,10 @@
+ __profcxx_map_to_unordered_map_erase(this, size(), 1);
+ return __i;
+ }
++
++ iterator
++ erase(iterator __position)
++ { return erase(const_iterator(__position)); }
+ #else
+ void
+ erase(iterator __position)
+Index: libstdc++-v3/include/profile/multimap.h
+===================================================================
+--- libstdc++-v3/include/profile/multimap.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/profile/multimap.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -225,6 +225,10 @@
+ iterator
+ erase(const_iterator __position)
+ { return iterator(_Base::erase(__position)); }
++
++ iterator
++ erase(iterator __position)
++ { return iterator(_Base::erase(__position)); }
+ #else
+ void
+ erase(iterator __position)
+Index: libstdc++-v3/include/bits/hashtable.h
+===================================================================
+--- libstdc++-v3/include/bits/hashtable.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/hashtable.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -440,6 +440,11 @@
+ iterator
+ erase(const_iterator);
+
++ // LWG 2059.
++ iterator
++ erase(iterator __it)
++ { return erase(const_iterator(__it)); }
++
+ size_type
+ erase(const key_type&);
+
+Index: libstdc++-v3/include/bits/shared_ptr.h
+===================================================================
+--- libstdc++-v3/include/bits/shared_ptr.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/shared_ptr.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -100,6 +100,8 @@
+ constexpr shared_ptr()
+ : __shared_ptr<_Tp>() { }
+
++ shared_ptr(const shared_ptr&) = default; // never throws
++
+ /**
+ * @brief Construct a %shared_ptr that owns the pointer @a __p.
+ * @param __p A pointer that is convertible to element_type*.
+@@ -264,6 +266,8 @@
+ constexpr shared_ptr(nullptr_t __p)
+ : __shared_ptr<_Tp>(__p) { }
+
++ shared_ptr& operator=(const shared_ptr&) = default;
++
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+Index: libstdc++-v3/include/bits/stl_map.h
+===================================================================
+--- libstdc++-v3/include/bits/stl_map.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/stl_map.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -612,6 +612,11 @@
+ iterator
+ erase(const_iterator __position)
+ { return _M_t.erase(__position); }
++
++ // LWG 2059.
++ iterator
++ erase(iterator __position)
++ { return _M_t.erase(__position); }
+ #else
+ /**
+ * @brief Erases an element from a %map.
+Index: libstdc++-v3/include/bits/stl_multimap.h
+===================================================================
+--- libstdc++-v3/include/bits/stl_multimap.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/stl_multimap.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -533,6 +533,11 @@
+ iterator
+ erase(const_iterator __position)
+ { return _M_t.erase(__position); }
++
++ // LWG 2059.
++ iterator
++ erase(iterator __position)
++ { return _M_t.erase(__position); }
+ #else
+ /**
+ * @brief Erases an element from a %multimap.
+Index: libstdc++-v3/include/bits/stl_numeric.h
+===================================================================
+--- libstdc++-v3/include/bits/stl_numeric.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/stl_numeric.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -222,10 +222,10 @@
+ /**
+ * @brief Return list of partial sums
+ *
+- * Accumulates the values in the range [first,last) using operator+().
++ * Accumulates the values in the range [first,last) using the @c + operator.
+ * As each successive input value is added into the total, that partial sum
+- * is written to @a result. Therefore, the first value in result is the
+- * first value of the input, the second value in result is the sum of the
++ * is written to @p result. Therefore, the first value in @p result is the
++ * first value of the input, the second value in @p result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+@@ -261,15 +261,16 @@
+ /**
+ * @brief Return list of partial sums
+ *
+- * Accumulates the values in the range [first,last) using operator+().
++ * Accumulates the values in the range [first,last) using @p binary_op.
+ * As each successive input value is added into the total, that partial sum
+- * is written to @a result. Therefore, the first value in result is the
+- * first value of the input, the second value in result is the sum of the
++ * is written to @a result. Therefore, the first value in @p result is the
++ * first value of the input, the second value in @p result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
++ * @param binary_op Function object.
+ * @return Iterator pointing just beyond the values written to result.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+Index: libstdc++-v3/include/bits/stl_uninitialized.h
+===================================================================
+--- libstdc++-v3/include/bits/stl_uninitialized.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/stl_uninitialized.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,7 +1,7 @@
+ // Raw memory manipulators -*- C++ -*-
+ // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+-// 2009, 2010
++// 2009, 2010, 2011
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -530,7 +530,22 @@
+ __uninit_default_n(__first, __n);
+ }
++ template<typename _Tp, typename _Allocator>
++ inline auto
++ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, void*)
++ -> decltype(__alloc.construct(__ptr))
++ { return __alloc.construct(__ptr); }
+
++ template<typename _Tp, typename _Allocator>
++ inline void
++ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, ...)
++ { _Construct(__ptr); }
++
++ template<typename _Tp, typename _Allocator>
++ inline void
++ _Construct_default_a(_Tp* __ptr, _Allocator& __alloc)
++ { _Construct_default_a_impl(__ptr, __alloc, nullptr); }
++
+ // __uninitialized_default_a
+ // Fills [first, last) with std::distance(first, last) default
+ // constructed value_types(s), constructed with the allocator alloc.
+@@ -544,7 +559,7 @@
+ __try
+ {
+ for (; __cur != __last; ++__cur)
+- __alloc.construct(std::__addressof(*__cur));
++ _Construct_default_a(std::__addressof(*__cur), __alloc);
+ }
+ __catch(...)
+ {
+@@ -573,7 +588,7 @@
+ __try
+ {
+ for (; __n > 0; --__n, ++__cur)
+- __alloc.construct(std::__addressof(*__cur));
++ _Construct_default_a(std::__addressof(*__cur), __alloc);
+ }
+ __catch(...)
+ {
+Index: libstdc++-v3/include/bits/shared_ptr_base.h
+===================================================================
+--- libstdc++-v3/include/bits/shared_ptr_base.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/shared_ptr_base.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -799,7 +799,8 @@
+ : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
+ { }
+
+- // generated copy constructor, assignment, destructor are fine.
++ __shared_ptr(const __shared_ptr&) = default; // never throws
++ __shared_ptr& operator=(const __shared_ptr&) = default; // never throws
+
+ template<typename _Tp1, typename = typename
+ std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
+Index: libstdc++-v3/include/bits/regex.h
+===================================================================
+--- libstdc++-v3/include/bits/regex.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/regex.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2219,7 +2219,7 @@
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ {
+- std::string __result;
++ basic_string<_Ch_type> __result;
+ regex_replace(std::back_inserter(__result),
+ __s.begin(), __s.end(), __e, __fmt, __flags);
+ return __result;
+Index: libstdc++-v3/include/bits/stl_tree.h
+===================================================================
+--- libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -760,6 +760,16 @@
+ _M_erase_aux(__position);
+ return __result._M_const_cast();
+ }
++
++ // LWG 2059.
++ iterator
++ erase(iterator __position)
++ {
++ iterator __result = __position;
++ ++__result;
++ _M_erase_aux(__position);
++ return __result;
++ }
+ #else
+ void
+ erase(iterator __position)
+Index: libstdc++-v3/include/c_global/cmath
+===================================================================
+--- libstdc++-v3/include/c_global/cmath (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/c_global/cmath (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,7 +1,7 @@
+ // -*- C++ -*- C forwarding header.
-- echo "$as_me:$LINENO: checking for C locale to use" >&5
--echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6
- # Check whether --enable-clocale or --disable-clocale was given.
- if test "${enable_clocale+set}" = set; then
- enableval="$enable_clocale"
-@@ -5782,32 +5780,53 @@
- fi;
+ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+-// 2006, 2007, 2008, 2009, 2010
++// 2006, 2007, 2008, 2009, 2010, 2011
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -156,10 +156,7 @@
+
+ template<typename _Tp, typename _Up>
+ inline
+- typename __gnu_cxx::__promote_2<
+- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+- && __is_arithmetic<_Up>::__value,
+- _Tp>::__type, _Up>::__type
++ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ atan2(_Tp __y, _Up __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+@@ -374,10 +371,7 @@
+
+ template<typename _Tp, typename _Up>
+ inline
+- typename __gnu_cxx::__promote_2<
+- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+- && __is_arithmetic<_Up>::__value,
+- _Tp>::__type, _Up>::__type
++ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ pow(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+Index: libstdc++-v3/include/tr1/complex
+===================================================================
+--- libstdc++-v3/include/tr1/complex (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/tr1/complex (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -185,12 +185,9 @@
+ std::complex<_Tp>
+ __complex_acosh(const std::complex<_Tp>& __z)
+ {
+- std::complex<_Tp> __t((__z.real() - __z.imag())
+- * (__z.real() + __z.imag()) - _Tp(1.0),
+- _Tp(2.0) * __z.real() * __z.imag());
+- __t = std::sqrt(__t);
+-
+- return std::log(__t + __z);
++ // Kahan's formula.
++ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
++ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
+ }
+ #if _GLIBCXX_USE_C99_COMPLEX_TR1
+Index: libstdc++-v3/include/tr1/poly_hermite.tcc
+===================================================================
+--- libstdc++-v3/include/tr1/poly_hermite.tcc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/include/tr1/poly_hermite.tcc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,6 +1,6 @@
+ // Special functions -*- C++ -*-
-- # If they didn't use this option switch, or if they specified --enable
-- # with no specific model, we'll have to look for one. If they
-- # specified --disable (???), do likewise.
-+ # Deal with gettext issues. Default to not using it (=no) until we detect
-+ # support for it later. Let the user turn it off via --e/d, but let that
-+ # default to on for easier handling.
-+ USE_NLS=no
-+ # Check whether --enable-nls or --disable-nls was given.
-+if test "${enable_nls+set}" = set; then
-+ enableval="$enable_nls"
+-// Copyright (C) 2006, 2007, 2008, 2009, 2010
++// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -84,7 +84,7 @@
+ unsigned int __i;
+ for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i)
+ {
+- __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2);
++ __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2);
+ __H_nm2 = __H_nm1;
+ __H_nm1 = __H_n;
+ }
+Index: libstdc++-v3/ChangeLog
+===================================================================
+--- libstdc++-v3/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,131 @@
++2012-01-03 Chase Douglas <chase.douglas@canonical.com>
++ Jonathan Wakely <jwakely.gcc@gmail.com>
+
-+else
-+ enable_nls=yes
-+fi;
++ * include/bits/shared_ptr.h: Default copy ctor and assignment.
++ * include/bits/shared_ptr_base.h: Likewise.
++ * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error
++ line numbers.
++ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
+
-+ # Either a known packaage, or "auto"
- if test $enable_clocale = no || test $enable_clocale = yes; then
- enable_clocale=auto
- fi
--
-- # Either a known package, or "auto"
- enable_clocale_flag=$enable_clocale
-
-- # Probe for locale support if no specific model is specified.
-+ # Probe for locale model to use if none specified.
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-- cat >conftest.$ac_ext <<_ACEOF
-+ enable_clocale_flag=gnu
-+ ;;
-+ darwin* | freebsd*)
-+ enable_clocale_flag=darwin
-+ ;;
-+ *)
-+ enable_clocale_flag=generic
-+ ;;
-+ esac
-+ fi
-+
-+ # Sanity check model, and test for special functionality.
-+ if test $enable_clocale_flag = gnu; then
-+ cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-
-- #include <features.h>
-- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-- _GLIBCXX_ok
-- #endif
-+ #include <features.h>
-+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-+ _GLIBCXX_ok
-+ #endif
-
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-@@ -5819,9 +5838,8 @@
- rm -f conftest*
-
-
-- # Test for bugs early in glibc-2.2.x series
-- if test $enable_clocale_flag = gnu; then
-- if test "$cross_compiling" = yes; then
-+ # Test for bugs early in glibc-2.2.x series
-+ if test "$cross_compiling" = yes; then
- enable_clocale_flag=generic
- else
- cat >conftest.$ac_ext <<_ACEOF
-@@ -5831,28 +5849,28 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-
-- #define _GNU_SOURCE 1
-- #include <locale.h>
-- #include <string.h>
-- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-- extern __typeof(newlocale) __newlocale;
-- extern __typeof(duplocale) __duplocale;
-- extern __typeof(strcoll_l) __strcoll_l;
-- #endif
-- int main()
-- {
-- const char __one[] = "Äuglein Augmen";
-- const char __two[] = "Äuglein";
-- int i;
-- int j;
-- __locale_t loc;
-- __locale_t loc_dup;
-- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-- loc_dup = __duplocale(loc);
-- i = __strcoll_l(__one, __two, loc);
-- j = __strcoll_l(__one, __two, loc_dup);
-- return 0;
-- }
-+ #define _GNU_SOURCE 1
-+ #include <locale.h>
-+ #include <string.h>
-+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-+ extern __typeof(newlocale) __newlocale;
-+ extern __typeof(duplocale) __duplocale;
-+ extern __typeof(strcoll_l) __strcoll_l;
-+ #endif
-+ int main()
-+ {
-+ const char __one[] = "Äuglein Augmen";
-+ const char __two[] = "Äuglein";
-+ int i;
-+ int j;
-+ __locale_t loc;
-+ __locale_t loc_dup;
-+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-+ loc_dup = __duplocale(loc);
-+ i = __strcoll_l(__one, __two, loc);
-+ j = __strcoll_l(__one, __two, loc_dup);
-+ return 0;
-+ }
-
- _ACEOF
- rm -f conftest$ac_exeext
-@@ -5877,32 +5895,176 @@
- fi
- rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
-- fi
-
-- # ... at some point put __strxfrm_l tests in as well.
-- ;;
-- darwin* | freebsd*)
-- enable_clocale_flag=darwin
-- ;;
-- *)
-- enable_clocale_flag=generic
-- ;;
-- esac
-+ # Set it to scream when it hurts.
-+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS="-Wimplicit-function-declaration -Werror"
-+
-+ # Use strxfrm_l if available.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>
-+int
-+main ()
++2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR libstdc++/51711
++ * include/bits/regex.h (regex_replace): Fix thinko.
++ * testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New.
++ * testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc:
++ Likewise.
++
++2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ PR libstdc++/51626
++ * include/bits/stl_uninitialized.h (_Construct_default_a_impl): Define
++ overloaded functions to conditionally use allocator::construct.
++ (_Construct_default_a): Define to dispatch to appropriate
++ _Construct_default_a_impl overload.
++ (__uninitialized_default_a, __uninitialized_default_n_a): Use
++ _Construct_default_a.
++ * testsuite/20_util/allocator/51626.cc: New.
++
++2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
++ dg-error line numbers.
++ * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
++ * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
++ * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
++
++2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ * include/c_global/cmath: Update copyright years.
++ * include/ext/type_traits.h: Likewise.
++
++2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ Backport from mainline
++ 2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
++
++ * include/c_global/cmath (atan2, pow): Simplify constraining on the
++ return type.
++
++ Backport from mainline
++ 2011-11-12 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ PR libstdc++/51083
++ * include/ext/type_traits.h (__promote): Only define __type member
++ for integral and floating point types, to prevent math functions
++ participating in overload resolution for other types.
++ (__promote_2, __promote_3, __promote_4): Use __promote in default
++ template argument values, so deduction only succeeds for integral and
++ floating point types.
++ * testsuite/26_numerics/cmath/51083.cc: New.
++ * testsuite/26_numerics/complex/51083.cc: New.
++ * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
++ * testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
++
++2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ PR libstdc++/50862
++ * include/std/condition_variable (condition_variable_any::wait): Fix
++ deadlock and ensure _Lock::lock() is called on exit.
++ * testsuite/30_threads/condition_variable_any/50862.cc: New.
++
++2011-12-18 Jonathan Wakely <jwakely.gcc@gmail.com>
++
++ PR libstdc++/51540
++ * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments.
++
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
++
++ * configure: Regenerate.
++
++2011-11-16 Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR libstdc++/51142
++ * include/debug/unordered_map (unordered_map<>::erase(iterator),
++ unordered_multimap<>::erase(iterator)): Add, consistently with
++ LWG 2059.
++ * include/debug/unordered_set (unordered_set<>::erase(iterator),
++ unordered_multiset<>::erase(iterator)): Likewise.
++ * include/debug/map.h (map<>::erase(iterator)): Likewise.
++ * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
++ * include/profile/map.h (map<>::erase(iterator)): Likewise.
++ * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
++ * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
++ * include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
++ * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
++ * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
++ * testsuite/23_containers/unordered_map/erase/51142.cc: New.
++ * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
++ * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
++ * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
++ * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
++ * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
++ * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
++ * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.
++
++2011-11-15 Jason Dick <dickphd@gmail.com>
++
++ PR libstdc++/51133
++ * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
++ wrong sign in recursion relation.
++
++2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
++ Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR libstdc++/50880
++ * include/std/complex (__complex_acosh): Fix in a better way,
++ use Kahan's formula.
++ * include/tr1/complex (__complex_acosh): Likewise.
++
++2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
++ Paolo Carlini <paolo.carlini@oracle.com>
++
++ PR libstdc++/50880
++ * include/std/complex (__complex_acosh): Fix for __z.real() < 0.
++ * include/tr1/complex (__complex_acosh): Likewise.
++ * testsuite/26_numerics/complex/50880.cc: New.
++ * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc
+===================================================================
+--- libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,31 @@
++// { dg-options "-std=gnu++0x" }
++// { dg-do compile }
++
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++#include <regex>
++#include <string>
++
++// libstdc++/51711
++void test01()
+{
-+char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);
-+ ;
-+ return 0;
++ std::wstring toProcess(L"Bug\r\n");
++ std::wstring result __attribute__((unused))
++ = std::regex_replace(toProcess, std::wregex(L"\\r"), std::wstring(L"\\r"));
+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STRXFRM_L 1
-+_ACEOF
+Index: libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc
+===================================================================
+--- libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,31 @@
++// { dg-options "-std=gnu++0x" }
++// { dg-do compile }
+
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++#include <regex>
++#include <string>
++
++// libstdc++/51711
++void test01()
++{
++ std::string toProcess("Bug\r\n");
++ std::string result __attribute__((unused))
++ = std::regex_replace(toProcess, std::regex("\\r"), std::string("\\r"));
++}
+Index: libstdc++-v3/testsuite/26_numerics/complex/51083.cc
+===================================================================
+--- libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,54 @@
++// { dg-options "-std=gnu++0x" }
++//
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <complex>
++
++namespace a
++{
++ template<typename> class Mat { };
+
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++ template<typename T> struct Mat2 : Mat<T> { };
+
-+ # Use strerror_l if available.
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>
-+int
-+main ()
++ template<typename T> int arg(Mat<T>) { return 1; }
++ template<typename T> int conj(Mat<T>) { return 1; }
++ template<typename T> int imag(Mat<T>) { return 1; }
++ template<typename T> int norm(Mat<T>) { return 1; }
++ template<typename T> int proj(Mat<T>) { return 1; }
++ template<typename T> int real(Mat<T>) { return 1; }
++
++ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
++ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
++}
++
++int main()
+{
-+__locale_t loc; strerror_l(5, loc);
-+ ;
-+ return 0;
++ int __attribute__((unused)) i;
++
++ using namespace std;
++
++ a::Mat2< std::complex<double> > c;
++ i = arg(c);
++ i = conj(c);
++ i = imag(c);
++ i = norm(c);
++ i = proj(c);
++ i = real(c);
++ i = pow(std::complex<float>(), c);
++ i = pow(c, std::complex<float>());
+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STRERROR_L 1
-+_ACEOF
+Index: libstdc++-v3/testsuite/26_numerics/complex/50880.cc
+===================================================================
+--- libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,53 @@
++// { dg-options "-std=gnu++0x" }
++//
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <complex>
++#include <testsuite_hooks.h>
++
++template<typename T>
++ void test01_do()
++ {
++ bool test __attribute__((unused)) = true;
+
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
++ const std::complex<T> ca(T(-2), T(2));
++ const std::complex<T> cb(T(-2), T(0));
++ const std::complex<T> cc(T(-2), T(-2));
+
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++ std::complex<T> cra = std::acosh(ca);
++ std::complex<T> crb = std::acosh(cb);
++ std::complex<T> crc = std::acosh(cc);
+
-+ CFLAGS="$ac_save_CFLAGS"
- fi
-
-- # Deal with gettext issues. Default to not using it (=no) until we detect
-- # support for it later. Let the user turn it off via --e/d, but let that
-- # default to on for easier handling.
-- USE_NLS=no
-- # Check whether --enable-nls or --disable-nls was given.
--if test "${enable_nls+set}" = set; then
-- enableval="$enable_nls"
-+ # Perhaps use strerror_r if available, and strerror_l isn't.
-+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS="-Wimplicit-function-declaration -Werror"
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>
-+int
-+main ()
++ VERIFY( cra.real() > T(0) );
++ VERIFY( crb.real() > T(0) );
++ VERIFY( crc.real() > T(0) );
++ }
++
++// libstdc++/50880
++void test01()
+{
-+char s[128]; strerror_r(5, s, 128);
-+ ;
++ test01_do<float>();
++ test01_do<double>();
++ test01_do<long double>();
++}
++
++int main()
++{
++ test01();
+ return 0;
+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STRERROR_R 1
-+_ACEOF
+Index: libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
+===================================================================
+--- libstdc++-v3/testsuite/26_numerics/cmath/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/26_numerics/cmath/51083.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,62 @@
++// { dg-options "-std=gnu++0x" }
++//
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <cmath>
++
++namespace a
++{
++ template<typename> class Mat { };
+
- else
-- enable_nls=yes
--fi;
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+ CFLAGS="$ac_save_CFLAGS"
-+
- # Set configure bits for specified locale package
-+ echo "$as_me:$LINENO: checking for C locale to use" >&5
-+echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6
- case ${enable_clocale_flag} in
- generic)
- echo "$as_me:$LINENO: result: generic" >&5
-@@ -8015,7 +8177,7 @@
-
- # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
- cat > conftest.$ac_ext << EOF
--#line 8018 "configure"
-+#line 8180 "configure"
- int main()
- {
- // NB: _Atomic_word not necessarily int.
-@@ -8395,11 +8557,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -54307,11 +54467,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -75669,11 +75827,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -77194,11 +77350,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -78687,11 +78841,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -100579,11 +100731,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -101426,11 +101576,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -102829,11 +102977,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -104624,11 +104770,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -105869,11 +106013,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-@@ -106898,11 +107040,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
-Index: libstdc++-v3/include/bits/ostream.tcc
-===================================================================
---- libstdc++-v3/include/bits/ostream.tcc (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/include/bits/ostream.tcc (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -334,7 +334,6 @@
- extern template ostream& operator<<(ostream&, const char*);
- extern template ostream& operator<<(ostream&, const unsigned char*);
- extern template ostream& operator<<(ostream&, const signed char*);
-- extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
-
- extern template ostream& ostream::_M_insert(long);
- extern template ostream& ostream::_M_insert(unsigned long);
-@@ -356,8 +355,6 @@
- extern template wostream& operator<<(wostream&, char);
- extern template wostream& operator<<(wostream&, const wchar_t*);
- extern template wostream& operator<<(wostream&, const char*);
-- extern template wostream& __ostream_insert(wostream&, const wchar_t*,
-- streamsize);
-
- extern template wostream& wostream::_M_insert(long);
- extern template wostream& wostream::_M_insert(unsigned long);
-Index: libstdc++-v3/include/bits/ostream_insert.h
-===================================================================
---- libstdc++-v3/include/bits/ostream_insert.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/include/bits/ostream_insert.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -109,6 +109,18 @@
- return __out;
- }
-
-+ // Inhibit implicit instantiations for required instantiations,
-+ // which are defined via explicit instantiations elsewhere.
-+ // NB: This syntax is a GNU extension.
-+#if _GLIBCXX_EXTERN_TEMPLATE
-+ extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
++ template<typename T> struct Mat2 : Mat<T> { };
+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ extern template wostream& __ostream_insert(wostream&, const wchar_t*,
-+ streamsize);
-+#endif
-+#endif
++ template<typename T>
++ int fdim(Mat<T>) { return 1; }
++
++ template<typename T, typename U>
++ int floor(Mat<T>, U) { return 1; }
++ template<typename T, typename U>
++ int floor(T, Mat<U>) { return 1; }
++
++ template<typename T, typename U, typename V>
++ int fma(Mat<T>, U, V) { return 1; }
++ template<typename T, typename U, typename V>
++ int fma(T, Mat<U>, V) { return 1; }
++ template<typename T, typename U, typename V>
++ int fma(T, U, Mat<V>) { return 1; }
++}
++
++int main()
++{
++ int __attribute__((unused)) i;
++
++ using namespace std;
++
++ a::Mat2<double> c;
++ i = fdim(c);
++ i = floor(c, 0.);
++ i = floor(0., c);
++ i = floor(c, 1);
++ i = floor(1, c);
++ i = fma(c, 0., 1.);
++ i = fma(0., c, 1.);
++ i = fma(0., 1., c);
++ i = fma(c, 0., 1);
++ i = fma(0., c, 1);
++ i = fma(0., 1, c);
++}
+Index: libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
+===================================================================
+--- libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,80 @@
++// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
++// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
++// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
++// { dg-require-cstdint "" }
++// { dg-require-gthreads "" }
++// { dg-require-sched-yield "" }
++
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <condition_variable>
++#include <thread>
++#include <mutex>
++#include <array>
++#include <sstream>
++
++struct scoped_thread
++{
++ ~scoped_thread() { if (t.joinable()) t.join(); }
++ std::thread t;
++};
+
- _GLIBCXX_END_NAMESPACE
++int main()
++{
++ typedef std::unique_lock<std::mutex> Lock;
++
++ std::mutex m;
++ std::condition_variable_any cond;
++ unsigned int product = 0;
++ const unsigned int count = 10;
++
++ // writing to stream causes timing changes which makes deadlock easier
++ // to reproduce - do not remove
++ std::ostringstream out;
++
++ // create consumers
++ std::array<scoped_thread, 2> threads;
++ for (std::size_t i = 0; i < threads.size(); ++i)
++ threads[i].t
++ = std::thread( [&]
++ {
++ for (unsigned int i = 0; i < count; ++i)
++ {
++ std::this_thread::yield();
++ Lock lock(m);
++ while(product == 0)
++ cond.wait(lock);
++ out << "got product "
++ << std::this_thread::get_id()
++ << ' ' << product << std::endl;
++ --product;
++ }
++ } );
++
++ // single producer
++ for (std::size_t i = 0; i < threads.size() * count; ++i)
++ {
++ std::this_thread::yield();
++ Lock lock(m);
++ ++product;
++ out << "setting product " << std::this_thread::get_id()
++ << ' ' << product << std::endl;
++ cond.notify_one();
++ }
++}
+Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
+===================================================================
+--- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -36,4 +36,4 @@
+ }
- #endif /* _OSTREAM_INSERT_H */
-Index: libstdc++-v3/include/std/std_fstream.h
+ // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
+-// { dg-error "declaration of" "" { target *-*-* } 106 }
++// { dg-error "declaration of" "" { target *-*-* } 107 }
+Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
===================================================================
---- libstdc++-v3/include/std/std_fstream.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/include/std/std_fstream.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,6 +1,7 @@
- // File based streams -*- C++ -*-
+--- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -35,4 +35,4 @@
+ }
--// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-+// 2006, 2007
- // Free Software Foundation, Inc.
- //
- // This file is part of the GNU ISO C++ Library. This library is free
-@@ -257,9 +258,30 @@
- * Otherwise it tries to open the file named @a s using the flags
- * given in @a mode.
- *
-- * [Table 92 gives the relation between openmode combinations and the
-- * equivalent fopen() flags, but the table has not been copied yet.]
-- */
-+ * Table 92, adapted here, gives the relation between openmode
-+ * combinations and the equivalent fopen() flags.
-+ * (NB: lines in|out|app and binary|in|out|app per DR 596)
-+ * +---------------------------------------------------------+
-+ * | ios_base Flag combination stdio equivalent |
-+ * |binary in out trunc app |
-+ * +---------------------------------------------------------+
-+ * | + "w" |
-+ * | + + "a" |
-+ * | + + "w" |
-+ * | + "r" |
-+ * | + + "r+" |
-+ * | + + + "w+" |
-+ * | + + + "a+" |
-+ * +---------------------------------------------------------+
-+ * | + + "wb" |
-+ * | + + + "ab" |
-+ * | + + + "wb" |
-+ * | + + "rb" |
-+ * | + + + "r+b" |
-+ * | + + + + "w+b" |
-+ * | + + + + "a+b" |
-+ * +---------------------------------------------------------+
-+ */
- __filebuf_type*
- open(const char* __s, ios_base::openmode __mode);
+ // { dg-error "instantiated from" "" { target *-*-* } 28 }
+-// { dg-error "no type" "" { target *-*-* } 69 }
++// { dg-error "no type" "" { target *-*-* } 70 }
+Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
+===================================================================
+--- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -35,4 +35,4 @@
+ }
-Index: libstdc++-v3/ChangeLog
+ // { dg-error "instantiated from" "" { target *-*-* } 28 }
+-// { dg-error "no type" "" { target *-*-* } 112 }
++// { dg-error "no type" "" { target *-*-* } 113 }
+Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
===================================================================
---- libstdc++-v3/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,39 @@
-+2007-06-08 Paolo Carlini <pcarlini@suse.de>
+--- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -36,4 +36,4 @@
+ }
+
+ // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
+-// { dg-error "declaration of" "" { target *-*-* } 63 }
++// { dg-error "declaration of" "" { target *-*-* } 64 }
+Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
+===================================================================
+--- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,54 @@
++// { dg-options "-std=gnu++0x" }
++//
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <tr1/complex>
++
++namespace a
++{
++ template<typename> class Mat { };
++
++ template<typename T> struct Mat2 : Mat<T> { };
++
++ template<typename T> int arg(Mat<T>) { return 1; }
++ template<typename T> int conj(Mat<T>) { return 1; }
++ template<typename T> int imag(Mat<T>) { return 1; }
++ template<typename T> int norm(Mat<T>) { return 1; }
++ template<typename T> int proj(Mat<T>) { return 1; }
++ template<typename T> int real(Mat<T>) { return 1; }
++
++ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
++ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
++}
++
++int main()
++{
++ int __attribute__((unused)) i;
++
++ using namespace std::tr1;
++
++ a::Mat2< std::complex<double> > c;
++ i = arg(c);
++ i = conj(c);
++ i = imag(c);
++ i = norm(c);
++ i = proj(c);
++ i = real(c);
++ i = pow(std::complex<float>(), c);
++ i = pow(c, std::complex<float>());
++}
+Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc
+===================================================================
+--- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,51 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <tr1/complex>
++#include <testsuite_hooks.h>
++
++template<typename T>
++ void test01_do()
++ {
++ bool test __attribute__((unused)) = true;
++
++ const std::complex<T> ca(T(-2), T(2));
++ const std::complex<T> cb(T(-2), T(0));
++ const std::complex<T> cc(T(-2), T(-2));
++
++ std::complex<T> cra = std::tr1::acosh(ca);
++ std::complex<T> crb = std::tr1::acosh(cb);
++ std::complex<T> crc = std::tr1::acosh(cc);
++
++ VERIFY( cra.real() > T(0) );
++ VERIFY( crb.real() > T(0) );
++ VERIFY( crc.real() > T(0) );
++ }
++
++// libstdc++/50880
++void test01()
++{
++ test01_do<float>();
++ test01_do<double>();
++ test01_do<long double>();
++}
++
++int main()
++{
++ test01();
++ return 0;
++}
+Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
+===================================================================
+--- libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,62 @@
++// { dg-options "-std=gnu++0x" }
++//
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <tr1/cmath>
++
++namespace a
++{
++ template<typename> class Mat { };
++
++ template<typename T> struct Mat2 : Mat<T> { };
++
++ template<typename T>
++ int fdim(Mat<T>) { return 1; }
++
++ template<typename T, typename U>
++ int floor(Mat<T>, U) { return 1; }
++ template<typename T, typename U>
++ int floor(T, Mat<U>) { return 1; }
++
++ template<typename T, typename U, typename V>
++ int fma(Mat<T>, U, V) { return 1; }
++ template<typename T, typename U, typename V>
++ int fma(T, Mat<U>, V) { return 1; }
++ template<typename T, typename U, typename V>
++ int fma(T, U, Mat<V>) { return 1; }
++}
++
++int main()
++{
++ int __attribute__((unused)) i;
++
++ using namespace std::tr1;
++
++ a::Mat2<double> c;
++ i = fdim(c);
++ i = floor(c, 0.);
++ i = floor(0., c);
++ i = floor(c, 1);
++ i = floor(1, c);
++ i = fma(c, 0., 1.);
++ i = fma(0., c, 1.);
++ i = fma(0., 1., c);
++ i = fma(c, 0., 1);
++ i = fma(0., c, 1);
++ i = fma(0., 1, c);
++}
+Index: libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
++
++#include <unordered_map>
++
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
++
++bool operator==(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::unordered_map<X, int>& s, X x)
++{
++ std::unordered_map<X, int>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
++
++#include <map>
++
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
++
++bool operator<(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::multimap<X, int>& s, X x)
++{
++ std::multimap<X, int>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
++
++#include <set>
++
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
++
++bool operator<(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::set<X>& s, X x)
++{
++ std::set<X>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
++
++#include <unordered_map>
++
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
++
++bool operator==(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::unordered_multimap<X, int>& s, X x)
++{
++ std::unordered_multimap<X, int>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
++
++#include <unordered_set>
++
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
++
++bool operator==(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::unordered_set<X>& s, X x)
++{
++ std::unordered_set<X>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
++
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
+
-+ * docs/html/install.html: Adjust consistently with libstdc++/31717.
++#include <set>
+
-+2007-06-08 Francesco Palagi <palagi@arcetri.astro.it>
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
+
-+ * include/std/std_fstream.h: Add Table 92 in comment.
++bool operator<(const X&, const X&) { return false; }
+
-+2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
-+ Frank Mori Hess <frank.hess@nist.gov>
-+
-+ * docs/html/debug.html: Correct link.
++// LWG 2059.
++void erasor(std::multiset<X>& s, X x)
++{
++ std::multiset<X>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
+
-+2007-05-28 Benjamin Kosnik <bkoz@redhat.com>
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
+
-+ PR libstdc++/31717
-+ * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check
-+ gnu locale model requests to make sure it will work for the requested
-+ target. Add checks for strxfrm_l, strerror_l when in gnu locale,
-+ and strerror_r everywhere.
-+ * aclocal.m4: Regenerated.
-+ * configure: Regenerated.
-+ * config.h.in: Regenerated.
++#include <unordered_set>
+
-+2007-05-24 Paolo Carlini <pcarlini@suse.de>
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
+
-+ * include/bits/ostream.tcc: Do not inhibit implicit instantiation
-+ of __ostream_insert here...
-+ * include/bits/ostream_insert.h: ... do it here.
++bool operator==(const X&, const X&) { return false; }
+
-+2007-05-21 Paolo Carlini <pcarlini@suse.de>
++// LWG 2059.
++void erasor(std::unordered_multiset<X>& s, X x)
++{
++ std::unordered_multiset<X>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc
+===================================================================
+--- libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,38 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++//
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++//
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++//
+
-+ PR libstdc++/31621
-+ * acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
-+ * configure: Regenerate.
++// { dg-do compile }
++// { dg-options "-std=gnu++0x" }
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-Index: libstdc++-v3/docs/html/debug.html
-===================================================================
---- libstdc++-v3/docs/html/debug.html (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/docs/html/debug.html (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -420,7 +420,7 @@
-
-
- <h3 class="left"><a name="verbterm">Tracking uncaught exceptions</a></h3>
--<p>The <a href="19_diagnostics/howto.html#4">verbose termination handler</a>
-+<p>The <a href="18_support/howto.html#4">verbose termination handler</a>
- gives information about uncaught exceptions which are killing the
- program. It is described in the linked-to page.
- </p>
-Index: libstdc++-v3/docs/html/install.html
-===================================================================
---- libstdc++-v3/docs/html/install.html (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/docs/html/install.html (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -80,8 +80,9 @@
- information must be installed.
-
- <p>
-- The configure option --enable-clocale can be used force a
-- particular behavior.
-+ Note that those sanity checks are also perfomed when an explicit
-+ --enable-clocale=gnu configure option is used: this behavior is
-+ new in gcc 4.2.1 and defends against misconfigurations.
- </p>
-
- <p>
-Index: libstdc++-v3/config.h.in
-===================================================================
---- libstdc++-v3/config.h.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/config.h.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -298,6 +298,12 @@
- /* Define to 1 if you have the <stdlib.h> header file. */
- #undef HAVE_STDLIB_H
-
-+/* Define if strerror_l is available in <string.h>. */
-+#undef HAVE_STRERROR_L
-+
-+/* Define if strerror_r is available in <string.h>. */
-+#undef HAVE_STRERROR_R
-+
- /* Define to 1 if you have the <strings.h> header file. */
- #undef HAVE_STRINGS_H
-
-@@ -310,6 +316,9 @@
- /* Define to 1 if you have the `strtold' function. */
- #undef HAVE_STRTOLD
-
-+/* Define if strxfrm_l is available in <string.h>. */
-+#undef HAVE_STRXFRM_L
-+
- /* Define to 1 if you have the <sys/filio.h> header file. */
- #undef HAVE_SYS_FILIO_H
-
-Index: libstdc++-v3/acinclude.m4
-===================================================================
---- libstdc++-v3/acinclude.m4 (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libstdc++-v3/acinclude.m4 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -251,11 +251,9 @@
- # NB: This flag only works reliably after 2.16.1. Configure tests
- # for this are difficult, so hard wire a value that should work.
-
-- # All these tests are for C++, but run with the "C" compiler driver.
-- # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
-- CFLAGS='-x c++ -Wl,--gc-sections'
-+ CFLAGS='-Wl,--gc-sections'
-
- # Check for -Wl,--gc-sections
- AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
-@@ -1334,64 +1332,31 @@
- dnl Default is generic.
- dnl
- AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
-- AC_MSG_CHECKING([for C locale to use])
- GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
- [use MODEL for target locale package],
- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
-+
-+ # Deal with gettext issues. Default to not using it (=no) until we detect
-+ # support for it later. Let the user turn it off via --e/d, but let that
-+ # default to on for easier handling.
-+ USE_NLS=no
-+ AC_ARG_ENABLE(nls,
-+ AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
-+ [],
-+ [enable_nls=yes])
-
-- # If they didn't use this option switch, or if they specified --enable
-- # with no specific model, we'll have to look for one. If they
-- # specified --disable (???), do likewise.
-+ # Either a known packaage, or "auto"
- if test $enable_clocale = no || test $enable_clocale = yes; then
- enable_clocale=auto
- fi
--
-- # Either a known package, or "auto"
- enable_clocale_flag=$enable_clocale
-
-- # Probe for locale support if no specific model is specified.
-+ # Probe for locale model to use if none specified.
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
-- AC_EGREP_CPP([_GLIBCXX_ok], [
-- #include <features.h>
-- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-- _GLIBCXX_ok
-- #endif
-- ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
--
-- # Test for bugs early in glibc-2.2.x series
-- if test $enable_clocale_flag = gnu; then
-- AC_TRY_RUN([
-- #define _GNU_SOURCE 1
-- #include <locale.h>
-- #include <string.h>
-- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-- extern __typeof(newlocale) __newlocale;
-- extern __typeof(duplocale) __duplocale;
-- extern __typeof(strcoll_l) __strcoll_l;
-- #endif
-- int main()
-- {
-- const char __one[] = "Äuglein Augmen";
-- const char __two[] = "Äuglein";
-- int i;
-- int j;
-- __locale_t loc;
-- __locale_t loc_dup;
-- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-- loc_dup = __duplocale(loc);
-- i = __strcoll_l(__one, __two, loc);
-- j = __strcoll_l(__one, __two, loc_dup);
-- return 0;
-- }
-- ],
-- [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
-- [enable_clocale_flag=generic])
-- fi
--
-- # ... at some point put __strxfrm_l tests in as well.
-+ enable_clocale_flag=gnu
- ;;
- darwin* | freebsd*)
- enable_clocale_flag=darwin
-@@ -1402,16 +1367,79 @@
- esac
- fi
-
-- # Deal with gettext issues. Default to not using it (=no) until we detect
-- # support for it later. Let the user turn it off via --e/d, but let that
-- # default to on for easier handling.
-- USE_NLS=no
-- AC_ARG_ENABLE(nls,
-- AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
-- [],
-- [enable_nls=yes])
-+ # Sanity check model, and test for special functionality.
-+ if test $enable_clocale_flag = gnu; then
-+ AC_EGREP_CPP([_GLIBCXX_ok], [
-+ #include <features.h>
-+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-+ _GLIBCXX_ok
-+ #endif
-+ ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
-
-+ # Test for bugs early in glibc-2.2.x series
-+ AC_TRY_RUN([
-+ #define _GNU_SOURCE 1
-+ #include <locale.h>
-+ #include <string.h>
-+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-+ extern __typeof(newlocale) __newlocale;
-+ extern __typeof(duplocale) __duplocale;
-+ extern __typeof(strcoll_l) __strcoll_l;
-+ #endif
-+ int main()
-+ {
-+ const char __one[] = "Äuglein Augmen";
-+ const char __two[] = "Äuglein";
-+ int i;
-+ int j;
-+ __locale_t loc;
-+ __locale_t loc_dup;
-+ loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-+ loc_dup = __duplocale(loc);
-+ i = __strcoll_l(__one, __two, loc);
-+ j = __strcoll_l(__one, __two, loc_dup);
-+ return 0;
-+ }
-+ ],
-+ [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
-+ [enable_clocale_flag=generic])
-+
-+ # Set it to scream when it hurts.
-+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS="-Wimplicit-function-declaration -Werror"
-+
-+ # Use strxfrm_l if available.
-+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>],
-+ [char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);],
-+ AC_DEFINE(HAVE_STRXFRM_L, 1,
-+ [Define if strxfrm_l is available in <string.h>.]),)
-+
-+ # Use strerror_l if available.
-+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>],
-+ [__locale_t loc; strerror_l(5, loc);],
-+ AC_DEFINE(HAVE_STRERROR_L, 1,
-+ [Define if strerror_l is available in <string.h>.]),)
-+
-+ CFLAGS="$ac_save_CFLAGS"
-+ fi
-+
-+ # Perhaps use strerror_r if available, and strerror_l isn't.
-+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS="-Wimplicit-function-declaration -Werror"
-+ AC_TRY_COMPILE([#define _GNU_SOURCE 1
-+ #include <string.h>
-+ #include <locale.h>],
-+ [char s[128]; strerror_r(5, s, 128);],
-+ AC_DEFINE(HAVE_STRERROR_R, 1,
-+ [Define if strerror_r is available in <string.h>.]),)
-+ CFLAGS="$ac_save_CFLAGS"
-+
- # Set configure bits for specified locale package
-+ AC_MSG_CHECKING([for C locale to use])
- case ${enable_clocale_flag} in
- generic)
- AC_MSG_RESULT(generic)
-Index: libgfortran/runtime/environ.c
-===================================================================
---- libgfortran/runtime/environ.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/runtime/environ.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -861,14 +861,13 @@
- static int
- do_parse (void)
- {
-- int tok, def;
-+ int tok;
- int unit1;
- int continue_ulist;
- char *start;
-
- unit_count = 0;
-
-- def = 0;
- start = p;
-
- /* Parse the string. First, let's look for a default. */
-@@ -923,6 +922,7 @@
- break;
-
- case END:
-+ def = endian;
- goto end;
- break;
-
-@@ -939,6 +939,18 @@
- tok = next_token ();
- switch (tok)
- {
-+ case NATIVE:
-+ if (next_token () != ':')
-+ goto error;
-+ endian = CONVERT_NATIVE;
-+ break;
++#include <map>
+
-+ case SWAP:
-+ if (next_token () != ':')
-+ goto error;
-+ endian = CONVERT_SWAP;
-+ break;
++struct X
++{
++ template<typename T>
++ X(T&) {}
++};
+
- case LITTLE:
- if (next_token () != ':')
- goto error;
-Index: libgfortran/intrinsics/reshape_generic.c
-===================================================================
---- libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -266,7 +266,7 @@
- else
- {
- scount[n]++;
-- sptr += sstride[n] * size;
-+ src += sstride[n] * size;
- }
- }
- }
-Index: libgfortran/intrinsics/ishftc.c
++bool operator<(const X&, const X&) { return false; }
++
++// LWG 2059.
++void erasor(std::map<X, int>& s, X x)
++{
++ std::map<X, int>::iterator it = s.find(x);
++ if (it != s.end())
++ s.erase(it);
++}
+Index: libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
===================================================================
---- libgfortran/intrinsics/ishftc.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/intrinsics/ishftc.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -36,8 +36,7 @@
- GFC_INTEGER_4
- ishftc4 (GFC_INTEGER_4 i, GFC_INTEGER_4 shift, GFC_INTEGER_4 size)
- {
-- GFC_INTEGER_4 mask;
-- GFC_UINTEGER_4 bits;
-+ GFC_UINTEGER_4 mask, bits;
-
- if (shift < 0)
- shift = shift + size;
-@@ -45,9 +44,14 @@
- if (shift == 0 || shift == size)
- return i;
-
-- mask = (~(GFC_INTEGER_4)0) << size;
-- bits = i & ~mask;
-- return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask);
-+ /* In C, the result of the shift operator is undefined if the right operand
-+ is greater than or equal to the number of bits in the left operand. So we
-+ have to special case it for fortran. */
-+ mask = ~((size == 32) ? 0 : (~0 << size));
-+
-+ bits = i & mask;
-+
-+ return (i & ~mask) | ((bits << shift) & mask) | (bits >> (size - shift));
- }
+--- libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -35,6 +35,6 @@
+ // { dg-error "incomplete" "" { target *-*-* } 766 }
- extern GFC_INTEGER_8 ishftc8 (GFC_INTEGER_8, GFC_INTEGER_4, GFC_INTEGER_4);
-@@ -56,8 +60,7 @@
- GFC_INTEGER_8
- ishftc8 (GFC_INTEGER_8 i, GFC_INTEGER_4 shift, GFC_INTEGER_4 size)
- {
-- GFC_INTEGER_8 mask;
-- GFC_UINTEGER_8 bits;
-+ GFC_UINTEGER_8 mask, bits;
-
- if (shift < 0)
- shift = shift + size;
-@@ -65,9 +68,14 @@
- if (shift == 0 || shift == size)
- return i;
-
-- mask = (~(GFC_INTEGER_8)0) << size;
-- bits = i & ~mask;
-- return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask);
-+ /* In C, the result of the shift operator is undefined if the right operand
-+ is greater than or equal to the number of bits in the left operand. So we
-+ have to special case it for fortran. */
-+ mask = ~((size == 64) ? 0 : (~0 << size));
-+
-+ bits = i & mask;
-+
-+ return (i & ~mask) | ((bits << shift) & mask) | (bits >> (size - shift));
- }
+ std::shared_ptr<X> p9(ap()); // { dg-error "here" }
+- // { dg-error "incomplete" "" { target *-*-* } 858 }
++ // { dg-error "incomplete" "" { target *-*-* } 859 }
- #ifdef HAVE_GFC_INTEGER_16
-@@ -77,8 +85,7 @@
- GFC_INTEGER_16
- ishftc16 (GFC_INTEGER_16 i, GFC_INTEGER_4 shift, GFC_INTEGER_4 size)
- {
-- GFC_INTEGER_16 mask;
-- GFC_UINTEGER_16 bits;
-+ GFC_UINTEGER_16 mask, bits;
-
- if (shift < 0)
- shift = shift + size;
-@@ -86,8 +93,13 @@
- if (shift == 0 || shift == size)
- return i;
-
-- mask = (~(GFC_INTEGER_16)0) << size;
-- bits = i & ~mask;
-- return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask);
-+ /* In C, the result of the shift operator is undefined if the right operand
-+ is greater than or equal to the number of bits in the left operand. So we
-+ have to special case it for fortran. */
-+ mask = ~((size == 128) ? 0 : (~0 << size));
-+
-+ bits = i & mask;
-+
-+ return (i & ~mask) | ((bits << shift) & mask) | (bits >> (size - shift));
}
- #endif
-Index: libgfortran/ChangeLog
-===================================================================
---- libgfortran/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,53 @@
-+2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
-+
-+ PR libfortran/31964
-+ Backport from trunk.
-+ * intrinsics/ishftc.c (ishftc4, ishftc8, ishftc16): Fix mask to handle
-+ shift of bit-size number of bits.
-+
-+2007-05-23 Tobias Burnus <burnus@net-b.de>
+Index: libstdc++-v3/testsuite/20_util/allocator/51626.cc
+===================================================================
+--- libstdc++-v3/testsuite/20_util/allocator/51626.cc (.../tags/gcc_4_6_2_release) (wersja 0)
++++ libstdc++-v3/testsuite/20_util/allocator/51626.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -0,0 +1,66 @@
++// Copyright (C) 2011 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-options "-std=gnu++0x" }
++
++#include <memory>
++#include <vector>
++#include <testsuite_hooks.h>
++
++int count = 0;
++
++template <class T>
++ struct allocator98 : std::allocator<T>
++ {
++ template <class U> struct rebind { typedef allocator98<U> other; };
+
-+ PR fortran/31917
-+ Backport from trunk.
-+ * runtime/environ.c (mark_range): Fix setting default convert unit.
++ allocator98() { }
+
-+2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
++ template <class U> allocator98(const allocator98<U>&) { };
+
-+ PR libfortran/31051
-+ Backport from trunk.
-+ * io/transfer.c (formatted_transfer_scalar): Adjust position for pending
-+ spaces when in writing mode. Clean up some formatting.
-+
-+2007-05-22 Tobias Burnus <burnus@net-b.de>
++ void construct(T* p, const T& val)
++ {
++ ++count;
++ std::allocator<T>::construct(p, val);
++ }
++ };
+
-+ PR libfortran/31915
-+ Backport from trunk.
-+ * io/transfer.c (unformatted_read): Use proper size for real(10).
-+ (unformatted_write): Ditto.
++template <class T>
++ struct allocator11 : std::allocator<T>
++ {
++ template <class U> struct rebind { typedef allocator11<U> other; };
+
-+2007-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
++ allocator11() { }
+
-+ PR libfortran/31395
-+ Backport from 4.3.
-+ * io/format.c (parse_format_list): Fix parsing. Regression against g77.
++ template <class U> allocator11(const allocator11<U>&) { };
+
-+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
++ template<typename... Args>
++ void construct(T* p, Args&&... args)
++ {
++ ++count;
++ std::allocator<T>::construct(p, std::forward<Args>(args)...);
++ }
++ };
+
-+ PR fortran/31618
-+ Backport from trunk.
-+ * io/transfer.c (read_block_direct): Instead of calling us_read,
-+ set dtp->u.p.current_unit->current_record = 0 so that pre_position
-+ will read the record marker.
-+ (data_transfer_init): For different error conditions, call
-+ generate_error, then return.
++int main()
++{
++ std::vector< int, allocator98<int> > v98(1);
++ VERIFY( count == 0 );
+
-+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
++ std::vector< int, allocator11<int> > v11(1);
++ VERIFY( count == 1 );
++}
+Index: libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
+===================================================================
+--- libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -42,8 +42,8 @@
+ return 0;
+ }
+
+-// { dg-warning "note" "" { target *-*-* } 354 }
+-// { dg-warning "note" "" { target *-*-* } 1085 }
++// { dg-warning "note" "" { target *-*-* } 358 }
++// { dg-warning "note" "" { target *-*-* } 1086 }
+ // { dg-warning "note" "" { target *-*-* } 468 }
+ // { dg-warning "note" "" { target *-*-* } 586 }
+ // { dg-warning "note" "" { target *-*-* } 1049 }
+Index: configure.ac
+===================================================================
+--- configure.ac (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ configure.ac (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -2428,10 +2428,6 @@
+ extra_arflags_for_target=" -X32_64"
+ extra_nmflags_for_target=" -B -X32_64"
+ ;;
+- *-*-darwin[[3-9]]*)
+- # ranlib before Darwin10 requires the -c flag to look at common symbols.
+- extra_ranlibflags_for_target=" -c"
+- ;;
+ mips*-*-pe | sh*-*-pe | *arm-wince-pe)
+ target_makefile_frag="config/mt-wince"
+ ;;
+Index: libobjc/configure
+===================================================================
+--- libobjc/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libobjc/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8797,7 +8797,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9713,7 +9713,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9731,7 +9731,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libobjc/ChangeLog
+===================================================================
+--- libobjc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libobjc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+ PR libfortran/31196
-+ Backport from trunk.
-+ * intrinsics/reshape_generic.c (reshape_internal): Increment
-+ correct variable.
++ * configure: Regenerate.
+
- 2007-05-13 Release Manager
+ 2011-10-26 Release Manager
- * GCC 4.2.0 released.
-Index: libgfortran/io/transfer.c
+ * GCC 4.6.2 released.
+Index: libgfortran/configure
===================================================================
---- libgfortran/io/transfer.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/io/transfer.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -493,11 +493,11 @@
- }
- else
- {
-- /* Let's make sure the file position is correctly set for the
-- next read statement. */
-+ /* Let's make sure the file position is correctly pre-positioned
-+ for the next read statement. */
-
-+ dtp->u.p.current_unit->current_record = 0;
- next_record_r_unf (dtp, 0);
-- us_read (dtp, 0);
- generate_error (&dtp->common, ERROR_SHORT_RECORD, NULL);
- return;
- }
-@@ -722,7 +722,11 @@
- of the padding. If we hit a short record, then sz is
- adjusted accordingly, making later reads no-ops. */
-
-- sz = kind;
-+ if (type == BT_REAL || type == BT_COMPLEX)
-+ sz = size_from_real_kind (kind);
-+ else
-+ sz = kind;
+--- libgfortran/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgfortran/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -10326,7 +10326,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -11242,7 +11242,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -11260,7 +11260,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -14162,7 +14162,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_FC=yes
+ hardcode_minus_L_FC=yes
+@@ -14870,7 +14870,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -14888,7 +14888,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libgfortran/ChangeLog
+===================================================================
+--- libgfortran/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libgfortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
- for (i=0; i<nelems; i++)
- {
- read_block_direct (dtp, buffer, &sz);
-@@ -767,7 +771,11 @@
- read kind bytes. We don't care about the contents
- of the padding. */
-
-- sz = kind;
-+ if (type == BT_REAL || type == BT_COMPLEX)
-+ sz = size_from_real_kind (kind);
-+ else
-+ sz = kind;
++ * configure: Regenerate.
+
- for (i=0; i<nelems; i++)
- {
- reverse_memcpy(buffer, p, size);
-@@ -1144,7 +1152,7 @@
- /* Format codes that don't transfer data. */
- case FMT_X:
- case FMT_TR:
-- consume_data_flag = 0 ;
-+ consume_data_flag = 0;
-
- pos = bytes_used + f->u.n + dtp->u.p.skips;
- dtp->u.p.skips = f->u.n + dtp->u.p.skips;
-@@ -1160,6 +1168,7 @@
- write_x (dtp, dtp->u.p.skips, dtp->u.p.pending_spaces);
- dtp->u.p.skips = dtp->u.p.pending_spaces = 0;
- }
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: Makefile.def
+===================================================================
+--- Makefile.def (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ Makefile.def (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -353,6 +353,7 @@
+ dependencies = { module=install-gcc ; on=install-fixincludes; };
+ dependencies = { module=install-gcc ; on=install-lto-plugin; };
+ dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; };
++dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
+
+ dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
+ dependencies = { module=configure-libcpp; on=configure-intl; };
+Index: libada/Makefile.in
+===================================================================
+--- libada/Makefile.in (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libada/Makefile.in (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -70,6 +70,7 @@
+ version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+ libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
+ ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
++ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
+
+ # exeext should not be used because it's the *host* exeext. We're building
+ # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
+@@ -96,10 +97,10 @@
+ "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
+
+ # Rules to build gnatlib.
+-.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
++.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
+ gnatlib: @default_gnatlib_target@
+
+-gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
++gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
+ test -f stamp-libada || \
+ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
+ && touch stamp-libada
+@@ -108,7 +109,7 @@
+ $(LN_S) $(ADA_RTS_DIR) adainclude
+ $(LN_S) $(ADA_RTS_DIR) adalib
+
+-gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
++gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
+ test -f stamp-libada || \
+ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
+ && touch stamp-libada
+@@ -117,8 +118,8 @@
+ $(LN_S) $(ADA_RTS_DIR) adainclude
+ $(LN_S) $(ADA_RTS_DIR) adalib
+
+-oscons:
+- $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads
++osconstool:
++ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
+
+ install-gnatlib: $(GCC_DIR)/ada/Makefile
+ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
+Index: libada/ChangeLog
+===================================================================
+--- libada/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libada/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,9 @@
++2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
++
++ Backport from mainline r181319
++ Makefile.in: Change dependency on oscons to depend on the generator
++ tool.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: libmudflap/configure
+===================================================================
+--- libmudflap/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libmudflap/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8818,7 +8818,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9731,7 +9731,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9749,7 +9749,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libmudflap/ChangeLog
+===================================================================
+--- libmudflap/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libmudflap/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
- if (dtp->u.p.mode == READING)
- read_x (dtp, f->u.n);
-
-@@ -1167,6 +1176,8 @@
-
- case FMT_TL:
- case FMT_T:
-+ consume_data_flag = 0;
++ * configure: Regenerate.
+
- if (f->format == FMT_TL)
- {
-
-@@ -1185,8 +1196,10 @@
- }
- else /* FMT_T */
- {
-- consume_data_flag = 0;
-- pos = f->u.n - 1;
-+ if (dtp->u.p.mode == READING)
-+ pos = f->u.n - 1;
-+ else
-+ pos = f->u.n - dtp->u.p.pending_spaces - 1;
- }
+ 2011-10-26 Release Manager
- /* Standard 10.6.1.1: excessive left tabbing is reset to the
-@@ -1753,16 +1766,19 @@
- /* Check the action. */
+ * GCC 4.6.2 released.
+Index: boehm-gc/ChangeLog
+===================================================================
+--- boehm-gc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ boehm-gc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
++
++ * configure: Regenerate.
++
+ 2011-10-26 Release Manager
- if (read_flag && dtp->u.p.current_unit->flags.action == ACTION_WRITE)
-- generate_error (&dtp->common, ERROR_BAD_ACTION,
-- "Cannot read from file opened for WRITE");
-+ {
-+ generate_error (&dtp->common, ERROR_BAD_ACTION,
-+ "Cannot read from file opened for WRITE");
-+ return;
-+ }
+ * GCC 4.6.2 released.
+Index: boehm-gc/configure
+===================================================================
+--- boehm-gc/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ boehm-gc/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -9604,7 +9604,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -10520,7 +10520,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -10538,7 +10538,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -12428,7 +12428,7 @@
+ esac
+ ;;
- if (!read_flag && dtp->u.p.current_unit->flags.action == ACTION_READ)
-- generate_error (&dtp->common, ERROR_BAD_ACTION,
-- "Cannot write to file opened for READ");
-+ {
-+ generate_error (&dtp->common, ERROR_BAD_ACTION,
-+ "Cannot write to file opened for READ");
-+ return;
-+ }
+- freebsd[12]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+@@ -14203,7 +14203,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -14221,7 +14221,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libiberty/ChangeLog
+===================================================================
+--- libiberty/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libiberty/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,17 @@
++2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
++
++ PR target/48108
++ Backport from mainline r180523
++ * simple-object-mach-o.c (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX,
++ GNU_WRAPPER_NAMES): New macros.
++ (simple_object_mach_o_segment): Handle wrapper scheme.
++ (simple_object_mach_o_write_section_header): Allow the segment name
++ to be supplied.
++ (simple_object_mach_o_write_segment): Handle wrapper scheme. Ensure
++ that the top-level segment name in the load command is empty.
++ (simple_object_mach_o_write_to_file): Determine the number of
++ sections during segment output, use that in writing the header.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: libiberty/simple-object-mach-o.c
+===================================================================
+--- libiberty/simple-object-mach-o.c (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libiberty/simple-object-mach-o.c (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,5 +1,5 @@
+ /* simple-object-mach-o.c -- routines to manipulate Mach-O object files.
+- Copyright 2010 Free Software Foundation, Inc.
++ Copyright 2010, 2011 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Google.
+
+ This program is free software; you can redistribute it and/or modify it
+@@ -174,6 +174,15 @@
+
+ #define GNU_SECTION_NAMES "__section_names"
+
++/* A GNU-specific extension to wrap multiple sections using three
++ mach-o sections within a given segment. The section '__wrapper_sects'
++ is subdivided according to the index '__wrapper_index' and each sub
++ sect is named according to the names supplied in '__wrapper_names'. */
++
++#define GNU_WRAPPER_SECTS "__wrapper_sects"
++#define GNU_WRAPPER_INDEX "__wrapper_index"
++#define GNU_WRAPPER_NAMES "__wrapper_names"
++
+ /* Private data for an simple_object_read. */
+
+ struct simple_object_mach_o_read
+@@ -214,8 +223,19 @@
+ unsigned int reserved;
+ };
-- if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
-- return;
--
- dtp->u.p.first_item = 1;
+-/* See if we have a Mach-O file. */
++/* See if we have a Mach-O MH_OBJECT file:
- /* Check the format. */
-@@ -1770,14 +1786,14 @@
- if ((cf & IOPARM_DT_HAS_FORMAT) != 0)
- parse_format (dtp);
++ A standard MH_OBJECT (from as) will have three load commands:
++ 0 - LC_SEGMENT/LC_SEGMENT64
++ 1 - LC_SYMTAB
++ 2 - LC_DYSYMTAB
++
++ The LC_SEGMENT/LC_SEGMENT64 will introduce a single anonymous segment
++ containing all the sections.
++
++ Files written by simple-object will have only the segment command
++ (no symbol tables). */
++
+ static void *
+ simple_object_mach_o_match (
+ unsigned char header[SIMPLE_OBJECT_MATCH_HEADER_LEN],
+@@ -356,9 +376,30 @@
+ }
+ }
-- if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
-- return;
--
- if (dtp->u.p.current_unit->flags.form == FORM_UNFORMATTED
- && (cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT))
- != 0)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "Format present for UNFORMATTED data transfer");
-+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "Format present for UNFORMATTED data transfer");
-+ return;
-+ }
+-/* Handle a segment in a Mach-O file. Return 1 if we should continue,
+- 0 if the caller should return. */
++/* Handle a segment in a Mach-O Object file.
- if ((cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0 && dtp->u.p.ionml != NULL)
- {
-@@ -1787,13 +1803,19 @@
- }
- else if (dtp->u.p.current_unit->flags.form == FORM_FORMATTED &&
- !(cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT)))
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "Missing format for FORMATTED data transfer");
-+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "Missing format for FORMATTED data transfer");
-+ }
++ This will callback to the function pfn for each "section found" the meaning
++ of which depends on gnu extensions to mach-o:
++
++ If we find mach-o sections (with the segment name as specified) which also
++ contain: a 'sects' wrapper, an index, and a name table, we expand this into
++ as many sections as are specified in the index. In this case, there will
++ be a callback for each of these.
++
++ We will also allow an extension that permits long names (more than 16
++ characters) to be used with mach-o. In this case, the section name has
++ a specific format embedding an index into a name table, and the file must
++ contain such name table.
++
++ Return 1 if we should continue, 0 if the caller should return. */
++
++#define SOMO_SECTS_PRESENT 0x01
++#define SOMO_INDEX_PRESENT 0x02
++#define SOMO_NAMES_PRESENT 0x04
++#define SOMO_LONGN_PRESENT 0x08
++#define SOMO_WRAPPING (SOMO_SECTS_PRESENT | SOMO_INDEX_PRESENT \
++ | SOMO_NAMES_PRESENT)
++
+ static int
+ simple_object_mach_o_segment (simple_object_read *sobj, off_t offset,
+ const unsigned char *segbuf,
+@@ -378,9 +419,20 @@
+ unsigned int nsects;
+ unsigned char *secdata;
+ unsigned int i;
++ unsigned int gnu_sections_found;
+ unsigned int strtab_index;
++ unsigned int index_index;
++ unsigned int nametab_index;
++ unsigned int sections_index;
+ char *strtab;
++ char *nametab;
++ unsigned char *index;
+ size_t strtab_size;
++ size_t nametab_size;
++ size_t index_size;
++ unsigned int n_wrapped_sects;
++ size_t wrapper_sect_size;
++ off_t wrapper_sect_offset;
+
+ fetch_32 = (omr->is_big_endian
+ ? simple_object_fetch_big_32
+@@ -409,6 +461,8 @@
+ nsects));
+ }
- if (is_internal_unit (dtp)
- && dtp->u.p.current_unit->flags.form == FORM_UNFORMATTED)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "Internal file cannot be accessed by UNFORMATTED data transfer");
-+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "Internal file cannot be accessed by UNFORMATTED "
-+ "data transfer");
-+ return;
-+ }
++ /* Fetch the section headers from the segment command. */
++
+ secdata = XNEWVEC (unsigned char, nsects * sechdrsize);
+ if (!simple_object_internal_read (sobj->descriptor, offset + seghdrsize,
+ secdata, nsects * sechdrsize, errmsg, err))
+@@ -417,9 +471,13 @@
+ return 0;
+ }
- /* Check the record or position number. */
+- /* Scan for a __section_names section. This is in effect a GNU
+- extension that permits section names longer than 16 chars. */
++ /* Scan for special sections that signal GNU extensions to the format. */
-@@ -1823,49 +1845,71 @@
- if (dtp->u.p.advance_status != ADVANCE_UNSPECIFIED)
++ gnu_sections_found = 0;
++ index_index = nsects;
++ sections_index = nsects;
++ strtab_index = nsects;
++ nametab_index = nsects;
+ for (i = 0; i < nsects; ++i)
{
- if (dtp->u.p.current_unit->flags.access == ACCESS_DIRECT)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "ADVANCE specification conflicts with sequential access");
+ size_t nameoff;
+@@ -427,19 +485,104 @@
+ nameoff = i * sechdrsize + segname_offset;
+ if (strcmp ((char *) secdata + nameoff, omr->segment_name) != 0)
+ continue;
++
+ nameoff = i * sechdrsize + sectname_offset;
+- if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
+- break;
++ if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_NAMES) == 0)
+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "ADVANCE specification conflicts with sequential access");
-+ return;
++ nametab_index = i;
++ gnu_sections_found |= SOMO_NAMES_PRESENT;
+ }
-
- if (is_internal_unit (dtp))
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "ADVANCE specification conflicts with internal file");
++ else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_INDEX) == 0)
+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "ADVANCE specification conflicts with internal file");
-+ return;
++ index_index = i;
++ gnu_sections_found |= SOMO_INDEX_PRESENT;
+ }
-
- if ((cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT))
- != IOPARM_DT_HAS_FORMAT)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "ADVANCE specification requires an explicit format");
++ else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_SECTS) == 0)
+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "ADVANCE specification requires an explicit format");
-+ return;
++ sections_index = i;
++ gnu_sections_found |= SOMO_SECTS_PRESENT;
+ }
- }
-
- if (read_flag)
- {
- if ((cf & IOPARM_EOR) != 0 && dtp->u.p.advance_status != ADVANCE_NO)
-- generate_error (&dtp->common, ERROR_MISSING_OPTION,
-- "EOR specification requires an ADVANCE specification of NO");
++ else if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
+ {
-+ generate_error (&dtp->common, ERROR_MISSING_OPTION,
-+ "EOR specification requires an ADVANCE specification "
-+ "of NO");
-+ return;
++ strtab_index = i;
++ gnu_sections_found |= SOMO_LONGN_PRESENT;
+ }
+ }
- if ((cf & IOPARM_DT_HAS_SIZE) != 0 && dtp->u.p.advance_status != ADVANCE_NO)
-- generate_error (&dtp->common, ERROR_MISSING_OPTION,
-- "SIZE specification requires an ADVANCE specification of NO");
--
+- strtab_index = i;
+- if (strtab_index >= nsects)
++ /* If any of the special wrapper section components is present, then
++ they all should be. */
++
++ if ((gnu_sections_found & SOMO_WRAPPING) != 0)
+ {
+- strtab = NULL;
+- strtab_size = 0;
++ off_t nametab_offset;
++ off_t index_offset;
++
++ if ((gnu_sections_found & SOMO_WRAPPING) != SOMO_WRAPPING)
+ {
-+ generate_error (&dtp->common, ERROR_MISSING_OPTION,
-+ "SIZE specification requires an ADVANCE specification of NO");
-+ return;
++ *errmsg = "GNU Mach-o section wrapper: required section missing";
++ *err = 0; /* No useful errno. */
++ XDELETEVEC (secdata);
++ return 0;
+ }
- }
- else
- { /* Write constraints. */
- if ((cf & IOPARM_END) != 0)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "END specification cannot appear in a write statement");
++
++ /* Fetch the name table. */
++
++ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
++ secdata + nametab_index * sechdrsize,
++ &nametab_offset, &nametab_size);
++ nametab = XNEWVEC (char, nametab_size);
++ if (!simple_object_internal_read (sobj->descriptor,
++ sobj->offset + nametab_offset,
++ (unsigned char *) nametab, nametab_size,
++ errmsg, err))
+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "END specification cannot appear in a write statement");
-+ return;
++ XDELETEVEC (nametab);
++ XDELETEVEC (secdata);
++ return 0;
+ }
-
- if ((cf & IOPARM_EOR) != 0)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "EOR specification cannot appear in a write statement");
++
++ /* Fetch the index. */
++
++ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
++ secdata + index_index * sechdrsize,
++ &index_offset, &index_size);
++ index = XNEWVEC (unsigned char, index_size);
++ if (!simple_object_internal_read (sobj->descriptor,
++ sobj->offset + index_offset,
++ index, index_size,
++ errmsg, err))
+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "EOR specification cannot appear in a write statement");
-+ return;
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
++ XDELETEVEC (secdata);
++ return 0;
+ }
++
++ /* The index contains 4 unsigned ints per sub-section:
++ sub-section offset/length, sub-section name/length.
++ We fix this for both 32 and 64 bit mach-o for now, since
++ other fields limit the maximum size of an object to 4G. */
++ n_wrapped_sects = index_size / 16;
++
++ /* Get the parameters for the wrapper too. */
++ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
++ secdata + sections_index * sechdrsize,
++ &wrapper_sect_offset,
++ &wrapper_sect_size);
+ }
+ else
+ {
++ index = NULL;
++ index_size = 0;
++ nametab = NULL;
++ nametab_size = 0;
++ n_wrapped_sects = 0;
++ }
++
++ /* If we have a long names section, fetch it. */
++
++ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
++ {
+ off_t strtab_offset;
- if ((cf & IOPARM_DT_HAS_SIZE) != 0)
-- generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-- "SIZE specification cannot appear in a write statement");
-+ {
-+ generate_error (&dtp->common, ERROR_OPTION_CONFLICT,
-+ "SIZE specification cannot appear in a write statement");
-+ return;
-+ }
+ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
+@@ -452,52 +595,120 @@
+ errmsg, err))
+ {
+ XDELETEVEC (strtab);
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
+ XDELETEVEC (secdata);
+ return 0;
+ }
}
++ else
++ {
++ strtab = NULL;
++ strtab_size = 0;
++ strtab_index = nsects;
++ }
- if (dtp->u.p.advance_status == ADVANCE_UNSPECIFIED)
- dtp->u.p.advance_status = ADVANCE_YES;
-- if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
-- return;
+ /* Process the sections. */
- /* Sanity checks on the record number. */
- if ((cf & IOPARM_DT_HAS_REC) != 0)
-Index: libgfortran/io/format.c
-===================================================================
---- libgfortran/io/format.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libgfortran/io/format.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -860,10 +860,11 @@
- case FMT_SLASH:
- get_fnode (fmt, &head, &tail, FMT_SLASH);
- tail->repeat = 1;
-+ goto optional_comma;
+ for (i = 0; i < nsects; ++i)
+ {
+ const unsigned char *sechdr;
+- char namebuf[MACH_O_NAME_LEN + 1];
++ char namebuf[MACH_O_NAME_LEN * 2 + 2];
+ char *name;
+ off_t secoffset;
+ size_t secsize;
++ int l;
-- /* Fall Through */
--
- case FMT_COLON:
-+ get_fnode (fmt, &head, &tail, FMT_COLON);
-+ tail->repeat = 1;
- goto optional_comma;
-
- case FMT_END:
-Index: boehm-gc/darwin_stop_world.c
-===================================================================
---- boehm-gc/darwin_stop_world.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/darwin_stop_world.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -10,7 +10,7 @@
- be allocated, is called the red zone. This area as shown in Figure 3-2 may
- be used for any purpose as long as a new stack frame does not need to be
- added to the stack."
--
-+
- Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then
- it must set up a stack frame just like routines that call other routines."
- */
-@@ -20,48 +20,6 @@
- # define PPC_RED_ZONE_SIZE 320
- #endif
+- if (i == strtab_index)
++ sechdr = secdata + i * sechdrsize;
++
++ /* We've already processed the long section names. */
++
++ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0
++ && i == strtab_index)
+ continue;
--/* Try to work out the right way to access thread state structure members.
-- The structure has changed its definition in different Darwin versions. */
--#if defined(__ppc__)
--# define THREAD_STATE ppc_thread_state_t
--# if defined (HAS_PPC_THREAD_STATE_R0)
--# define THREAD_FLD(x) x
--# elif defined (HAS_PPC_THREAD_STATE___R0)
--# define THREAD_FLD(x) __ ## x
--# else
--# error can not work out how to access fields of ppc_thread_state_t
--# endif
--#elif defined(__ppc64__)
--# define THREAD_STATE ppc_thread_state64_t
--# if defined (HAS_PPC_THREAD_STATE64_R0)
--# define THREAD_FLD(x) x
--# elif defined (HAS_PPC_THREAD_STATE64___R0)
--# define THREAD_FLD(x) __ ## x
--# else
--# error can not work out how to access fields of ppc_thread_state64_t
--# endif
--#elif defined(__i386__)
--# define THREAD_STATE i386_thread_state_t
--# if defined (HAS_I386_THREAD_STATE_EAX)
--# define THREAD_FLD(x) x
--# elif defined (HAS_I386_THREAD_STATE___EAX)
--# define THREAD_FLD(x) __ ## x
--# else
--# error can not work out how to access fields of i386_thread_state_t
--# endif
--#elif defined(__x86_64__)
--# define THREAD_STATE i386_thread_state_t
--# if defined (HAS_I386_THREAD_STATE_EAX)
--# define THREAD_FLD(x) x
--# elif defined (HAS_I386_THREAD_STATE___EAX)
--# define THREAD_FLD(x) __ ## x
--# else
--# error can not work out how to access fields of i386_thread_state_t
--# endif
--#else
--# error unknown architecture
--#endif
--
- typedef struct StackFrame {
- unsigned long savedSP;
- unsigned long savedCR;
-@@ -115,8 +73,8 @@
- GC_thread p;
- pthread_t me;
- ptr_t lo, hi;
-- THREAD_STATE state;
-- mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
-+ GC_THREAD_STATE_T state;
-+ mach_msg_type_number_t thread_state_count = GC_MACH_THREAD_STATE_COUNT;
-
- me = pthread_self();
- if (!GC_thr_initialized) GC_thr_init();
-@@ -128,11 +86,8 @@
- lo = GC_approx_sp();
- } else {
- /* Get the thread state (registers, etc) */
-- r = thread_get_state(
-- p->stop_info.mach_thread,
-- MACHINE_THREAD_STATE,
-- (natural_t*)&state,
-- &thread_state_count);
-+ r = thread_get_state(p->stop_info.mach_thread, GC_MACH_THREAD_STATE,
-+ (natural_t*)&state, &thread_state_count);
- if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
-
- #if defined(I386)
-@@ -144,7 +99,33 @@
- GC_push_one(state . THREAD_FLD (edx));
- GC_push_one(state . THREAD_FLD (edi));
- GC_push_one(state . THREAD_FLD (esi));
-- GC_push_one(state . THREAD_FLD (ebp));
-+ GC_push_one(state . THREAD_FLD (ebp));
-+
-+#elif defined(X86_64)
-+ lo = (void*)state . THREAD_FLD (rsp);
-+
-+ GC_push_one(state . THREAD_FLD (rax));
-+ GC_push_one(state . THREAD_FLD (rbx));
-+ GC_push_one(state . THREAD_FLD (rcx));
-+ GC_push_one(state . THREAD_FLD (rdx));
-+ GC_push_one(state . THREAD_FLD (rdi));
-+ GC_push_one(state . THREAD_FLD (rsi));
-+ GC_push_one(state . THREAD_FLD (rbp));
-+ GC_push_one(state . THREAD_FLD (rsp));
-+ GC_push_one(state . THREAD_FLD (r8));
-+ GC_push_one(state . THREAD_FLD (r9));
-+ GC_push_one(state . THREAD_FLD (r10));
-+ GC_push_one(state . THREAD_FLD (r11));
-+ GC_push_one(state . THREAD_FLD (r12));
-+ GC_push_one(state . THREAD_FLD (r13));
-+ GC_push_one(state . THREAD_FLD (r14));
-+ GC_push_one(state . THREAD_FLD (r15));
-+ GC_push_one(state . THREAD_FLD (rip));
-+ GC_push_one(state . THREAD_FLD (rflags));
-+ GC_push_one(state . THREAD_FLD (cs));
-+ GC_push_one(state . THREAD_FLD (fs));
-+ GC_push_one(state . THREAD_FLD (gs));
-+
- #elif defined(POWERPC)
- lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
-
-@@ -221,9 +202,9 @@
- hi = (ptr_t)FindTopOfStack(0);
- } else {
- # if defined(__ppc__) || defined(__ppc64__)
-- THREAD_STATE info;
-+ GC_THREAD_STATE_T info;
- mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-- r = thread_get_state(thread, MACHINE_THREAD_STATE,
-+ r = thread_get_state(thread, GC_MACH_THREAD_STATE,
- (natural_t *)&info, &outCount);
- if(r != KERN_SUCCESS) ABORT("task_get_state failed");
-
-@@ -264,10 +245,10 @@
- # else
- /* FIXME: Remove after testing: */
- WARN("This is completely untested and likely will not work\n", 0);
-- THREAD_STATE info;
-+ GC_THREAD_STATE_T info;
- mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-- r = thread_get_state(thread, MACHINE_THREAD_STATE,
-- (natural_t *)&info, &outCount);
-+ r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
-+ &outCount);
- if(r != KERN_SUCCESS) ABORT("task_get_state failed");
-
- lo = (void*)info . THREAD_FLD (esp);
-Index: boehm-gc/Makefile.in
-===================================================================
---- boehm-gc/Makefile.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/Makefile.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -224,6 +224,7 @@
- build_vendor = @build_vendor@
- datadir = @datadir@
- exec_prefix = @exec_prefix@
-+extra_ldflags_libgc = @extra_ldflags_libgc@
- host = @host@
- host_alias = @host_alias@
- host_cpu = @host_cpu@
-@@ -280,7 +281,7 @@
- # linuxthread semaphore functions get linked:
- libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
- libgcjgc_la_DEPENDENCIES = @addobjs@
--libgcjgc_la_LDFLAGS = -version-info 1:2:0 -rpath $(toolexeclibdir)
-+libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
- libgcjgc_convenience_la_LIBADD = @addobjs@
- libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
- AM_CXXFLAGS = @GC_CFLAGS@
-Index: boehm-gc/configure.ac
-===================================================================
---- boehm-gc/configure.ac (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/configure.ac (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -248,33 +248,46 @@
- case "$host" in
- powerpc*-*-darwin*)
- AC_CHECK_MEMBER(ppc_thread_state_t.r0,
-- AC_DEFINE(HAS_PPC_THREAD_STATE_R0,,[ppc_thread_state_t has field r0]),,
-+ AC_DEFINE(HAS_PPC_THREAD_STATE_R0,1,
-+ [ppc_thread_state_t has field r0]),,
- [#include <mach/thread_status.h>])
- AC_CHECK_MEMBER(ppc_thread_state_t.__r0,
-- AC_DEFINE(HAS_PPC_THREAD_STATE___R0,,dnl
-- [ppc_thread_state_t has field __r0]),,
-+ AC_DEFINE(HAS_PPC_THREAD_STATE___R0,1,dnl
-+ [ppc_thread_state_t has field __r0]),,
- [#include <mach/thread_status.h>])
- AC_CHECK_MEMBER(ppc_thread_state64_t.r0,
-- AC_DEFINE(HAS_PPC_THREAD_STATE64_R0,,dnl
-- [ppc_thread_state64_t has field r0]),,
-+ AC_DEFINE(HAS_PPC_THREAD_STATE64_R0,1,dnl
-+ [ppc_thread_state64_t has field r0]),,
- [#include <mach/thread_status.h>])
- AC_CHECK_MEMBER(ppc_thread_state64_t.__r0,
-- AC_DEFINE(HAS_PPC_THREAD_STATE64___R0,,dnl
-- [ppc_thread_state64_t has field __r0]),,
-+ AC_DEFINE(HAS_PPC_THREAD_STATE64___R0,1,dnl
-+ [ppc_thread_state64_t has field __r0]),,
- [#include <mach/thread_status.h>])
- ;;
- i?86*-*-darwin*)
-- AC_CHECK_MEMBER(i386_thread_state_t.eax,
-- AC_DEFINE(HAS_I386_THREAD_STATE_EAX,,dnl
-- [i386_thread_state_t has field eax]),,
-+ AC_CHECK_MEMBER(x86_thread_state32_t.eax,
-+ AC_DEFINE(HAS_X86_THREAD_STATE32_EAX,1,dnl
-+ [x86_thread_state32_t has field eax]),,
- [#include <sys/cdefs.h>
--#include <mach/thread_status.h>])
-- AC_CHECK_MEMBER(i386_thread_state_t.__eax,
-- AC_DEFINE(HAS_I386_THREAD_STATE___EAX,,dnl
-- [i386_thread_state_t has field __eax]),,
-+ #include <mach/thread_status.h>])
-+ AC_CHECK_MEMBER(x86_thread_state32_t.__eax,
-+ AC_DEFINE(HAS_X86_THREAD_STATE32___EAX,1,dnl
-+ [x86_thread_state32_t has field __eax]),,
- [#include <sys/cdefs.h>
--#include <mach/thread_status.h>])
-+ #include <mach/thread_status.h>])
- ;;
-+ x86_64-*-darwin*)
-+ AC_CHECK_MEMBER(x86_thread_state64_t.rax,
-+ AC_DEFINE(HAS_X86_THREAD_STATE64_RAX,1,dnl
-+ [x86_thread_state64_t has field rax]),,
-+ [#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>])
-+ AC_CHECK_MEMBER(x86_thread_state64_t.__rax,
-+ AC_DEFINE(HAS_X86_THREAD_STATE64___RAX,1,dnl
-+ [x86_thread_state64_t has field __rax]),,
-+ [#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>])
-+ ;;
- *) ;;
- esac
-
-@@ -287,6 +300,14 @@
- ;;
- esac
-
-+# extra LD Flags which are required for targets
-+case "${host}" in
-+ *-*-darwin*)
-+ extra_ldflags_libgc=-Wl,-single_module
-+ ;;
-+esac
-+AC_SUBST(extra_ldflags_libgc)
-+
- AC_SUBST(EXTRA_TEST_LIBS)
-
- target_all=libgcjgc.la
-Index: boehm-gc/include/Makefile.in
-===================================================================
---- boehm-gc/include/Makefile.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/include/Makefile.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -149,6 +149,7 @@
- build_vendor = @build_vendor@
- datadir = @datadir@
- exec_prefix = @exec_prefix@
-+extra_ldflags_libgc = @extra_ldflags_libgc@
- host = @host@
- host_alias = @host_alias@
- host_cpu = @host_cpu@
-Index: boehm-gc/include/gc_config.h.in
-===================================================================
---- boehm-gc/include/gc_config.h.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/include/gc_config.h.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -54,12 +54,6 @@
- /* support for win32 threads */
- #undef GC_WIN32_THREADS
-
--/* i386_thread_state_t has field eax */
--#undef HAS_I386_THREAD_STATE_EAX
--
--/* i386_thread_state_t has field __eax */
--#undef HAS_I386_THREAD_STATE___EAX
--
- /* ppc_thread_state64_t has field r0 */
- #undef HAS_PPC_THREAD_STATE64_R0
+- sechdr = secdata + i * sechdrsize;
++ /* We only act on the segment named. */
+
+ if (strcmp ((char *) sechdr + segname_offset, omr->segment_name) != 0)
+ continue;
-@@ -72,6 +66,18 @@
- /* ppc_thread_state_t has field __r0 */
- #undef HAS_PPC_THREAD_STATE___R0
+- memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
+- namebuf[MACH_O_NAME_LEN] = '\0';
++ /* Process sections associated with the wrapper. */
-+/* x86_thread_state32_t has field eax */
-+#undef HAS_X86_THREAD_STATE32_EAX
-+
-+/* x86_thread_state32_t has field __eax */
-+#undef HAS_X86_THREAD_STATE32___EAX
+- name = &namebuf[0];
+- if (strtab != NULL && name[0] == '_' && name[1] == '_')
++ if ((gnu_sections_found & SOMO_WRAPPING) != 0)
+ {
+- unsigned long stringoffset;
++ if (i == nametab_index || i == index_index)
++ continue;
+
+- if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
++ if (i == sections_index)
+ {
+- if (stringoffset >= strtab_size)
++ unsigned int j;
++ for (j = 0; j < n_wrapped_sects; ++j)
+ {
+- *errmsg = "section name offset out of range";
+- *err = 0;
+- XDELETEVEC (strtab);
+- XDELETEVEC (secdata);
+- return 0;
++ unsigned int subsect_offset, subsect_length, name_offset;
++ subsect_offset = (*fetch_32) (index + 16 * j);
++ subsect_length = (*fetch_32) (index + 16 * j + 4);
++ name_offset = (*fetch_32) (index + 16 * j + 8);
++ /* We don't need the name_length yet. */
++
++ secoffset = wrapper_sect_offset + subsect_offset;
++ secsize = subsect_length;
++ name = nametab + name_offset;
++
++ if (!(*pfn) (data, name, secoffset, secsize))
++ {
++ *errmsg = NULL;
++ *err = 0;
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
++ XDELETEVEC (strtab);
++ XDELETEVEC (secdata);
++ return 0;
++ }
+ }
+-
+- name = strtab + stringoffset;
++ continue;
+ }
+ }
+
++ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
++ {
++ memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
++ namebuf[MACH_O_NAME_LEN] = '\0';
+
-+/* x86_thread_state64_t has field rax */
-+#undef HAS_X86_THREAD_STATE64_RAX
++ name = &namebuf[0];
++ if (strtab != NULL && name[0] == '_' && name[1] == '_')
++ {
++ unsigned long stringoffset;
+
-+/* x86_thread_state64_t has field __rax */
-+#undef HAS_X86_THREAD_STATE64___RAX
++ if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
++ {
++ if (stringoffset >= strtab_size)
++ {
++ *errmsg = "section name offset out of range";
++ *err = 0;
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
++ XDELETEVEC (strtab);
++ XDELETEVEC (secdata);
++ return 0;
++ }
++
++ name = strtab + stringoffset;
++ }
++ }
++ }
++ else
++ {
++ /* Otherwise, make a name like __segment,__section as per the
++ convention in mach-o asm. */
++ name = &namebuf[0];
++ memset (namebuf, 0, MACH_O_NAME_LEN * 2 + 2);
++ memcpy (namebuf, (char *) sechdr + segname_offset, MACH_O_NAME_LEN);
++ l = strlen (namebuf);
++ namebuf[l] = ',';
++ memcpy (namebuf + l + 1, (char *) sechdr + sectname_offset,
++ MACH_O_NAME_LEN);
++ }
+
- /* Define to 1 if you have the <inttypes.h> header file. */
- #undef HAVE_INTTYPES_H
+ simple_object_mach_o_section_info (omr->is_big_endian, is_32, sechdr,
+ &secoffset, &secsize);
-Index: boehm-gc/include/private/gc_priv.h
-===================================================================
---- boehm-gc/include/private/gc_priv.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/include/private/gc_priv.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -286,6 +286,53 @@
- #endif
-
-
-+#if defined(DARWIN)
-+# if defined(POWERPC)
-+# if CPP_WORDSZ == 32
-+# define GC_THREAD_STATE_T ppc_thread_state_t
-+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
-+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
-+# define GC_MACH_HEADER mach_header
-+# define GC_MACH_SECTION section
-+# else
-+# define GC_THREAD_STATE_T ppc_thread_state64_t
-+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
-+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
-+# define GC_MACH_HEADER mach_header_64
-+# define GC_MACH_SECTION section_64
-+# endif
-+# elif defined(I386) || defined(X86_64)
-+# if CPP_WORDSZ == 32
-+# define GC_THREAD_STATE_T x86_thread_state32_t
-+# define GC_MACH_THREAD_STATE x86_THREAD_STATE32
-+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
-+# define GC_MACH_HEADER mach_header
-+# define GC_MACH_SECTION section
-+# else
-+# define GC_THREAD_STATE_T x86_thread_state64_t
-+# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
-+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
-+# define GC_MACH_HEADER mach_header_64
-+# define GC_MACH_SECTION section_64
-+# endif
-+# else
-+# error define GC_THREAD_STATE_T
-+# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
-+# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
-+# endif
-+/* Try to work out the right way to access thread state structure members.
-+ The structure has changed its definition in different Darwin versions.
-+ This now defaults to the (older) names without __, thus hopefully,
-+ not breaking any existing Makefile.direct builds. */
-+# if defined (HAS_PPC_THREAD_STATE___R0) \
-+ || defined (HAS_PPC_THREAD_STATE64___R0) \
-+ || defined (HAS_X86_THREAD_STATE32___EAX) \
-+ || defined (HAS_X86_THREAD_STATE64___RAX)
-+# define THREAD_FLD(x) __ ## x
-+# else
-+# define THREAD_FLD(x) x
-+# endif
-+#endif
- /*********************************/
- /* */
- /* OS interface routines */
-@@ -468,6 +515,53 @@
- # define GETENV(name) 0
- #endif
+@@ -505,12 +716,16 @@
+ {
+ *errmsg = NULL;
+ *err = 0;
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
+ XDELETEVEC (strtab);
+ XDELETEVEC (secdata);
+ return 0;
+ }
+ }
-+#if defined(DARWIN)
-+# if defined(POWERPC)
-+# if CPP_WORDSZ == 32
-+# define GC_THREAD_STATE_T ppc_thread_state_t
-+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
-+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
-+# define GC_MACH_HEADER mach_header
-+# define GC_MACH_SECTION section
-+# else
-+# define GC_THREAD_STATE_T ppc_thread_state64_t
-+# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
-+# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
-+# define GC_MACH_HEADER mach_header_64
-+# define GC_MACH_SECTION section_64
-+# endif
-+# elif defined(I386) || defined(X86_64)
-+# if CPP_WORDSZ == 32
-+# define GC_THREAD_STATE_T x86_thread_state32_t
-+# define GC_MACH_THREAD_STATE x86_THREAD_STATE32
-+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
-+# define GC_MACH_HEADER mach_header
-+# define GC_MACH_SECTION section
-+# else
-+# define GC_THREAD_STATE_T x86_thread_state64_t
-+# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
-+# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
-+# define GC_MACH_HEADER mach_header_64
-+# define GC_MACH_SECTION section_64
-+# endif
-+# else
-+# error define GC_THREAD_STATE_T
-+# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
-+# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
-+# endif
-+/* Try to work out the right way to access thread state structure members.
-+ The structure has changed its definition in different Darwin versions.
-+ This now defaults to the (older) names without __, thus hopefully,
-+ not breaking any existing Makefile.direct builds. */
-+# if defined (HAS_PPC_THREAD_STATE___R0) \
-+ || defined (HAS_PPC_THREAD_STATE64___R0) \
-+ || defined (HAS_X86_THREAD_STATE32___EAX) \
-+ || defined (HAS_X86_THREAD_STATE64___RAX)
-+# define THREAD_FLD(x) __ ## x
-+# else
-+# define THREAD_FLD(x) x
-+# endif
-+#endif
- /*********************************/
- /* */
- /* Word-size-dependent defines */
-Index: boehm-gc/include/private/gcconfig.h
-===================================================================
---- boehm-gc/include/private/gcconfig.h (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/include/private/gcconfig.h (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -302,7 +302,10 @@
- # if defined(__ppc__) || defined(__ppc64__)
- # define POWERPC
- # define mach_type_known
--# elif defined(__i386__) || defined(__x86_64)
-+# elif defined(__x86_64__)
-+# define X86_64
-+# define mach_type_known
-+# elif defined(__i386__)
- # define I386
- # define mach_type_known
- # endif
-@@ -791,26 +794,29 @@
- # define DATAEND (_end)
- # endif
- # ifdef DARWIN
--# if defined(__ppc64__) || defined(__x86_64)
-+# define OS_TYPE "DARWIN"
-+# define DYNAMIC_LOADING
-+# if defined(__ppc64__)
- # define ALIGNMENT 8
- # define CPP_WORDSZ 64
-+# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
-+# define CACHE_LINE_SIZE 64
-+# ifndef HBLKSIZE
-+# define HBLKSIZE 4096
-+# endif
- # else
- # define ALIGNMENT 4
-+# define STACKBOTTOM ((ptr_t) 0xc0000000)
- # endif
--# define OS_TYPE "DARWIN"
--# define DYNAMIC_LOADING
- /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-- These aren't used when dyld support is enabled (it is by default) */
-+ These aren't used when dyld support is enabled (it is by default) */
- # define DATASTART ((ptr_t) get_etext())
- # define DATAEND ((ptr_t) get_end())
--# define STACKBOTTOM ((ptr_t) 0xc0000000)
- # define USE_MMAP
- # define USE_MMAP_ANON
- # define USE_ASM_PUSH_REGS
-- /* This is potentially buggy. It needs more testing. See the comments in
-- os_dep.c. It relies on threads to track writes. */
- # ifdef GC_DARWIN_THREADS
--/* # define MPROTECT_VDB -- diabled for now. May work for some apps. */
-+# define MPROTECT_VDB
- # endif
- # include <unistd.h>
- # define GETPAGESIZE() getpagesize()
-@@ -822,7 +828,7 @@
- __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
- # endif
- /* There seems to be some issues with trylock hanging on darwin. This
-- should be looked into some more */
-+ should be looked into some more */
- # define NO_PTHREAD_TRYLOCK
- # endif
- # ifdef FREEBSD
-@@ -1317,23 +1323,21 @@
- # define DARWIN_DONT_PARSE_STACK
- # define DYNAMIC_LOADING
- /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-- These aren't used when dyld support is enabled (it is by default) */
-+ These aren't used when dyld support is enabled (it is by default) */
- # define DATASTART ((ptr_t) get_etext())
- # define DATAEND ((ptr_t) get_end())
- # define STACKBOTTOM ((ptr_t) 0xc0000000)
- # define USE_MMAP
- # define USE_MMAP_ANON
- # define USE_ASM_PUSH_REGS
-- /* This is potentially buggy. It needs more testing. See the comments in
-- os_dep.c. It relies on threads to track writes. */
- # ifdef GC_DARWIN_THREADS
--/* # define MPROTECT_VDB -- disabled for now. May work for some apps. */
-+# define MPROTECT_VDB
- # endif
- # include <unistd.h>
- # define GETPAGESIZE() getpagesize()
- /* There seems to be some issues with trylock hanging on darwin. This
-- should be looked into some more */
--# define NO_PTHREAD_TRYLOCK
-+ should be looked into some more */
-+# define NO_PTHREAD_TRYLOCK
- # endif /* DARWIN */
- # endif
++ XDELETEVEC (index);
++ XDELETEVEC (nametab);
+ XDELETEVEC (strtab);
+ XDELETEVEC (secdata);
+
+@@ -724,9 +939,9 @@
+ simple_object_mach_o_write_section_header (simple_object_write *sobj,
+ int descriptor,
+ size_t sechdr_offset,
+- const char *name, size_t secaddr,
+- size_t secsize, size_t offset,
+- unsigned int align,
++ const char *name, const char *segn,
++ size_t secaddr, size_t secsize,
++ size_t offset, unsigned int align,
+ const char **errmsg, int *err)
+ {
+ struct simple_object_mach_o_attributes *attrs =
+@@ -748,7 +963,7 @@
+ strncpy ((char *) hdr + offsetof (struct mach_o_section_32, sectname),
+ name, MACH_O_NAME_LEN);
+ strncpy ((char *) hdr + offsetof (struct mach_o_section_32, segname),
+- sobj->segment_name, MACH_O_NAME_LEN);
++ segn, MACH_O_NAME_LEN);
+ set_32 (hdr + offsetof (struct mach_o_section_32, addr), secaddr);
+ set_32 (hdr + offsetof (struct mach_o_section_32, size), secsize);
+ set_32 (hdr + offsetof (struct mach_o_section_32, offset), offset);
+@@ -773,7 +988,7 @@
+ strncpy ((char *) hdr + offsetof (struct mach_o_section_64, sectname),
+ name, MACH_O_NAME_LEN);
+ strncpy ((char *) hdr + offsetof (struct mach_o_section_64, segname),
+- sobj->segment_name, MACH_O_NAME_LEN);
++ segn, MACH_O_NAME_LEN);
+ set_64 (hdr + offsetof (struct mach_o_section_64, addr), secaddr);
+ set_64 (hdr + offsetof (struct mach_o_section_64, size), secsize);
+ set_32 (hdr + offsetof (struct mach_o_section_64, offset), offset);
+@@ -793,11 +1008,25 @@
+ sechdrsize, errmsg, err);
+ }
-@@ -1986,6 +1990,26 @@
- # define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
- # endif
- # endif
-+# ifdef DARWIN
-+# define OS_TYPE "DARWIN"
-+# define DARWIN_DONT_PARSE_STACK
-+# define DYNAMIC_LOADING
-+ /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-+ These aren't used when dyld support is enabled (it is by default) */
-+# define DATASTART ((ptr_t) get_etext())
-+# define DATAEND ((ptr_t) get_end())
-+# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
-+# define USE_MMAP
-+# define USE_MMAP_ANON
-+# ifdef GC_DARWIN_THREADS
-+# define MPROTECT_VDB
-+# endif
-+# include <unistd.h>
-+# define GETPAGESIZE() getpagesize()
-+ /* There seems to be some issues with trylock hanging on darwin. This
-+ should be looked into some more */
-+# define NO_PTHREAD_TRYLOCK
-+# endif
- # ifdef FREEBSD
- # define OS_TYPE "FREEBSD"
- # ifndef GC_FREEBSD_THREADS
-Index: boehm-gc/ChangeLog
-===================================================================
---- boehm-gc/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,72 @@
-+2007-06-22 Jakub Jelinek <jakub@redhat.com>
-+
-+ * pthread_support.c (GC_get_thread_stack_base): Handle
-+ pthread_getattr_np failures.
+-/* Write out the single segment and the sections of a Mach-O file. */
++/* Write out the single (anonymous) segment containing the sections of a Mach-O
++ Object file.
+
++ As a GNU extension to mach-o, when the caller specifies a segment name in
++ sobj->segment_name, all the sections passed will be output under a single
++ mach-o section header. The caller's sections are indexed within this
++ 'wrapper' section by a table stored in a second mach-o section. Finally,
++ arbitrary length section names are permitted by the extension and these are
++ stored in a table in a third mach-o section.
+
-+2007-05-22 Andreas Tobler <a.tobler@schweiz.org>
++ Note that this is only likely to make any sense for the __GNU_LTO segment
++ at present.
+
-+ * Backport r124870 from main.
++ If the wrapper extension is not in force, we assume that the section name
++ is in the form __SEGMENT_NAME,__section_name as per Mach-O asm. */
+
-+ 2007-05-20 Andreas Tobler <a.tobler@schweiz.org>
+ static int
+ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
+- size_t nsects, const char **errmsg,
++ size_t *nsects, const char **errmsg,
+ int *err)
+ {
+ struct simple_object_mach_o_attributes *attrs =
+@@ -814,6 +1043,10 @@
+ simple_object_write_section *section;
+ unsigned char hdrbuf[sizeof (struct mach_o_segment_command_64)];
+ unsigned char *hdr;
++ size_t nsects_in;
++ unsigned int *index;
++ char *snames;
++ unsigned int sect;
+
+ set_32 = (attrs->is_big_endian
+ ? simple_object_set_big_32
+@@ -834,19 +1067,62 @@
+ sechdrsize = sizeof (struct mach_o_section_64);
+ }
+
++ name_offset = 0;
++ *nsects = nsects_in = 0;
+
-+ * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
-+ * configure: Regenerate.
-+ * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
-+ * Makefile.in: Regenerate.
-+ * include/Makefile.in: Regenerate.
-+ * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
-+ targets. Remove comments. Prepare ppc64 support for Darwin.
++ /* Count the number of sections we start with. */
+
-+2007-05-19 Andreas Tobler <a.tobler@schweiz.org>
++ for (section = sobj->sections; section != NULL; section = section->next)
++ nsects_in++;
+
-+ * Backport r120684, 120801, 120853, 120874 and 120977 from main.
++ if (sobj->segment_name != NULL)
++ {
++ /* We will only write 3 sections: wrapped data, index and names. */
+
-+ 2007-01-19 Andreas Tobler <a.tobler@schweiz.org>
++ *nsects = 3;
+
-+ * os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently
-+ added defines to include/private/gc_priv.h
-+ * darwin_stop_world.c: Removed the above defines.
-+ (catch_exception_raise): Added THREAD_FLD in exc_state for POWERPC too.
-+ * include/private/gc_priv.h: Moved definitions from darwin_stop_world.c
-+ and os_dep.c to here. Fixed THREAD definition fixes for ppc64.
++ /* The index has four entries per wrapped section:
++ Section Offset, length, Name offset, length.
++ Where the offsets are based at the start of the wrapper and name
++ sections respectively.
++ The values are stored as 32 bit int for both 32 and 64 bit mach-o
++ since the size of a mach-o MH_OBJECT cannot exceed 4G owing to
++ other constraints. */
+
-+ 2007-01-17 Mike Stump <mrs@apple.com>
++ index = XNEWVEC (unsigned int, nsects_in * 4);
+
-+ * os_dep.c: Fix i686-apple-darwin9 builds.
++ /* We now need to figure out the size of the names section. This just
++ stores the names as null-terminated c strings, packed without any
++ alignment padding. */
+
-+ 2007-01-17 Andreas Tobler <a.tobler@schweiz.org>
++ for (section = sobj->sections, sect = 0; section != NULL;
++ section = section->next, sect++)
++ {
++ index[sect*4+2] = name_offset;
++ index[sect*4+3] = strlen (section->name) + 1;
++ name_offset += strlen (section->name) + 1;
++ }
++ snames = XNEWVEC (char, name_offset);
++ }
++ else
++ {
++ *nsects = nsects_in;
++ index = NULL;
++ snames = NULL;
++ }
+
-+ * include/gc_config.h.in: Regenerate.
+ sechdr_offset = hdrsize + seghdrsize;
+- cmdsize = seghdrsize + nsects * sechdrsize;
++ cmdsize = seghdrsize + *nsects * sechdrsize;
+ offset = hdrsize + cmdsize;
+- name_offset = 0;
+ secaddr = 0;
+
+- for (section = sobj->sections; section != NULL; section = section->next)
++ for (section = sobj->sections, sect = 0;
++ section != NULL; section = section->next, sect++)
+ {
+ size_t mask;
+ size_t new_offset;
+ size_t secsize;
+ struct simple_object_write_section_buffer *buffer;
+- char namebuf[MACH_O_NAME_LEN + 1];
+
+ mask = (1U << section->align) - 1;
+ new_offset = offset + mask;
+@@ -877,39 +1153,126 @@
+ secsize += buffer->size;
+ }
+
+- snprintf (namebuf, sizeof namebuf, "__%08X", name_offset);
++ if (sobj->segment_name != NULL)
++ {
++ index[sect*4+0] = (unsigned int) offset;
++ index[sect*4+1] = secsize;
++ /* Stash the section name in our table. */
++ memcpy (snames + index[sect * 4 + 2], section->name,
++ index[sect * 4 + 3]);
++ }
++ else
++ {
++ char namebuf[MACH_O_NAME_LEN + 1];
++ char segnbuf[MACH_O_NAME_LEN + 1];
++ char *comma;
+
-+ 2007-01-15 Andreas Tobler <a.tobler@schweiz.org>
++ /* Try to extract segment,section from the input name. */
+
-+ * os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Adjust mail
-+ reference.
-+ (catch_exception_raise): Fix typo in the I386 exc_state.
++ memset (namebuf, 0, sizeof namebuf);
++ memset (segnbuf, 0, sizeof segnbuf);
++ comma = strchr (section->name, ',');
++ if (comma != NULL)
++ {
++ int len = comma - section->name;
++ len = len > MACH_O_NAME_LEN ? MACH_O_NAME_LEN : len;
++ strncpy (namebuf, section->name, len);
++ strncpy (segnbuf, comma + 1, MACH_O_NAME_LEN);
++ }
++ else /* just try to copy the name, leave segment blank. */
++ strncpy (namebuf, section->name, MACH_O_NAME_LEN);
++
++ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
++ sechdr_offset,
++ namebuf, segnbuf,
++ secaddr, secsize,
++ offset,
++ section->align,
++ errmsg, err))
++ return 0;
++ sechdr_offset += sechdrsize;
++ }
+
-+ 2007-01-11 Andreas Tobler <a.tobler@schweiz.org>
++ offset += secsize;
++ secaddr += secsize;
++ }
+
-+ * configure.ac: Replaced HAS_I386_THREAD_STATE_* with
-+ HAS_X86_THREAD_STATE32_* and HAS_X86_THREAD_STATE64_* respectively.
-+ * configure: Regenerated.
-+ * include/private/gcconfig.h (DARWIN): Added X86_64 define for Darwin.
-+ Added base definitions for the X86_64 Darwin port.
-+ * include/private/gc_priv.h: Added definitions for Darwin MACH thread
-+ operations. Moved existing THREAD_STATE info from darwin_stop_world.c.
-+ * darwin_stop_world.c: Removed THREAD_STATE info. Added
-+ HAS_X86_THREAD_STATE64___RAX. And replaced HAS_I386_THREAD_STATE___EAX
-+ with HAS_X86_THREAD_STATE32___EAX.
-+ (GC_push_all_stacks): Use GC_MACH_THREAD_STATE_COUNT. Add code for
-+ X86_64 Darwin.
-+ * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
-+ (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
-+ Distinguish between getsectbynamefromheader_64 and
-+ getsectbynamefromheader.
-+ (GC_dyld_image_remove): Likewise.
-+ * os_dep.c (GC_dirty_init): Use GC_MACH_THREAD_STATE.
-+ (catch_exception_raise): Introduce exception information for I386 and
-+ X86_64 Darwin. Add X86_64 for exc_state.faultvaddr.
++ if (sobj->segment_name != NULL)
++ {
++ size_t secsize;
++ unsigned int i;
+
- 2007-05-13 Release Manager
-
- * GCC 4.2.0 released.
-Index: boehm-gc/configure
-===================================================================
---- boehm-gc/configure (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/configure (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -309,7 +309,7 @@
- # include <unistd.h>
- #endif"
-
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CFLAGS CXXFLAGS CCAS CCASFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS LN_S LIBTOOL CXXCPP CPPFLAGS THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE AM_CPPFLAGS addobjs addincludes addlibs addtests CPP EGREP MY_CFLAGS toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CFLAGS CXXFLAGS CCAS CCASFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS LN_S LIBTOOL CXXCPP CPPFLAGS THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE extra_ldflags_libgc EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE AM_CPPFLAGS addobjs addincludes addlibs addtests CPP EGREP MY_CFLAGS toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
- ac_subst_files=''
-
- # Initialize some variables set by options.
-@@ -5741,7 +5741,7 @@
- if test $ac_cv_member_ppc_thread_state_t_r0 = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_PPC_THREAD_STATE_R0
-+#define HAS_PPC_THREAD_STATE_R0 1
- _ACEOF
-
- fi
-@@ -5852,7 +5852,7 @@
- if test $ac_cv_member_ppc_thread_state_t___r0 = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_PPC_THREAD_STATE___R0
-+#define HAS_PPC_THREAD_STATE___R0 1
- _ACEOF
-
- fi
-@@ -5963,7 +5963,7 @@
- if test $ac_cv_member_ppc_thread_state64_t_r0 = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_PPC_THREAD_STATE64_R0
-+#define HAS_PPC_THREAD_STATE64_R0 1
- _ACEOF
-
- fi
-@@ -6074,16 +6074,16 @@
- if test $ac_cv_member_ppc_thread_state64_t___r0 = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_PPC_THREAD_STATE64___R0
-+#define HAS_PPC_THREAD_STATE64___R0 1
- _ACEOF
-
- fi
-
- ;;
- i?86*-*-darwin*)
-- echo "$as_me:$LINENO: checking for i386_thread_state_t.eax" >&5
--echo $ECHO_N "checking for i386_thread_state_t.eax... $ECHO_C" >&6
--if test "${ac_cv_member_i386_thread_state_t_eax+set}" = set; then
-+ echo "$as_me:$LINENO: checking for x86_thread_state32_t.eax" >&5
-+echo $ECHO_N "checking for x86_thread_state32_t.eax... $ECHO_C" >&6
-+if test "${ac_cv_member_x86_thread_state32_t_eax+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
-@@ -6093,12 +6093,12 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/cdefs.h>
--#include <mach/thread_status.h>
-+ #include <mach/thread_status.h>
-
- int
- main ()
- {
--static i386_thread_state_t ac_aggr;
-+static x86_thread_state32_t ac_aggr;
- if (ac_aggr.eax)
- return 0;
- ;
-@@ -6127,7 +6127,7 @@
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- ac_cv_member_i386_thread_state_t_eax=yes
-+ ac_cv_member_x86_thread_state32_t_eax=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-@@ -6139,12 +6139,12 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/cdefs.h>
--#include <mach/thread_status.h>
-+ #include <mach/thread_status.h>
-
- int
- main ()
- {
--static i386_thread_state_t ac_aggr;
-+static x86_thread_state32_t ac_aggr;
- if (sizeof ac_aggr.eax)
- return 0;
- ;
-@@ -6173,30 +6173,30 @@
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- ac_cv_member_i386_thread_state_t_eax=yes
-+ ac_cv_member_x86_thread_state32_t_eax=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
--ac_cv_member_i386_thread_state_t_eax=no
-+ac_cv_member_x86_thread_state32_t_eax=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:$LINENO: result: $ac_cv_member_i386_thread_state_t_eax" >&5
--echo "${ECHO_T}$ac_cv_member_i386_thread_state_t_eax" >&6
--if test $ac_cv_member_i386_thread_state_t_eax = yes; then
-+echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state32_t_eax" >&5
-+echo "${ECHO_T}$ac_cv_member_x86_thread_state32_t_eax" >&6
-+if test $ac_cv_member_x86_thread_state32_t_eax = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_I386_THREAD_STATE_EAX
-+#define HAS_X86_THREAD_STATE32_EAX 1
- _ACEOF
-
- fi
++ /* Write the section header for the wrapper. */
++ /* Account for any initial aligment - which becomes the alignment for this
++ created section. */
++
++ secsize = (offset - index[0]);
+ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
+- sechdr_offset, namebuf,
+- secaddr, secsize, offset,
+- section->align,
++ sechdr_offset,
++ GNU_WRAPPER_SECTS,
++ sobj->segment_name,
++ 0 /*secaddr*/,
++ secsize, index[0],
++ sobj->sections->align,
+ errmsg, err))
+ return 0;
-- echo "$as_me:$LINENO: checking for i386_thread_state_t.__eax" >&5
--echo $ECHO_N "checking for i386_thread_state_t.__eax... $ECHO_C" >&6
--if test "${ac_cv_member_i386_thread_state_t___eax+set}" = set; then
-+ echo "$as_me:$LINENO: checking for x86_thread_state32_t.__eax" >&5
-+echo $ECHO_N "checking for x86_thread_state32_t.__eax... $ECHO_C" >&6
-+if test "${ac_cv_member_x86_thread_state32_t___eax+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
-@@ -6206,12 +6206,12 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/cdefs.h>
--#include <mach/thread_status.h>
-+ #include <mach/thread_status.h>
++ /* Subtract the wrapper section start from the begining of each sub
++ section. */
++
++ for (i = 1; i < nsects_in; ++i)
++ index[4 * i] -= index[0];
++ index[0] = 0;
++
+ sechdr_offset += sechdrsize;
+- offset += secsize;
+- name_offset += strlen (section->name) + 1;
+- secaddr += secsize;
+- }
- int
- main ()
- {
--static i386_thread_state_t ac_aggr;
-+static x86_thread_state32_t ac_aggr;
- if (ac_aggr.__eax)
- return 0;
- ;
-@@ -6240,7 +6240,7 @@
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- ac_cv_member_i386_thread_state_t___eax=yes
-+ ac_cv_member_x86_thread_state32_t___eax=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-@@ -6252,12 +6252,12 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/cdefs.h>
--#include <mach/thread_status.h>
-+ #include <mach/thread_status.h>
+- /* Write out the section names. */
++ /* Write out the section names.
++ ... the header ...
++ name_offset contains the length of the section. It is not aligned. */
+
+- if (!simple_object_mach_o_write_section_header (sobj, descriptor,
+- sechdr_offset,
+- GNU_SECTION_NAMES, secaddr,
+- name_offset, offset, 0,
+- errmsg, err))
+- return 0;
++ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
++ sechdr_offset,
++ GNU_WRAPPER_NAMES,
++ sobj->segment_name,
++ 0 /*secaddr*/,
++ name_offset,
++ offset,
++ 0, errmsg, err))
++ return 0;
+
+- for (section = sobj->sections; section != NULL; section = section->next)
+- {
+- size_t namelen;
++ /* ... and the content.. */
++ if (!simple_object_internal_write (descriptor, offset,
++ (const unsigned char *) snames,
++ name_offset, errmsg, err))
++ return 0;
+
+- namelen = strlen (section->name) + 1;
++ sechdr_offset += sechdrsize;
++ secaddr += name_offset;
++ offset += name_offset;
++
++ /* Now do the index, we'll align this to 4 bytes although the read code
++ will handle unaligned. */
++
++ offset += 3;
++ offset &= ~0x03;
++ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
++ sechdr_offset,
++ GNU_WRAPPER_INDEX,
++ sobj->segment_name,
++ 0 /*secaddr*/,
++ nsects_in * 16,
++ offset,
++ 2, errmsg, err))
++ return 0;
++
++ /* ... and the content.. */
+ if (!simple_object_internal_write (descriptor, offset,
+- (const unsigned char *) section->name,
+- namelen, errmsg, err))
++ (const unsigned char *) index,
++ nsects_in*16, errmsg, err))
+ return 0;
+- offset += namelen;
++
++ XDELETEVEC (index);
++ XDELETEVEC (snames);
+ }
- int
- main ()
+ /* Write out the segment header. */
+@@ -923,9 +1286,8 @@
+ MACH_O_LC_SEGMENT);
+ set_32 (hdr + offsetof (struct mach_o_segment_command_32, cmdsize),
+ cmdsize);
+- strncpy (((char *) hdr
+- + offsetof (struct mach_o_segment_command_32, segname)),
+- sobj->segment_name, MACH_O_NAME_LEN);
++ /* MH_OBJECTS have a single, anonymous, segment - so the segment name
++ is left empty. */
+ /* vmaddr left as zero. */
+ /* vmsize left as zero. */
+ set_32 (hdr + offsetof (struct mach_o_segment_command_32, fileoff),
+@@ -935,7 +1297,7 @@
+ /* maxprot left as zero. */
+ /* initprot left as zero. */
+ set_32 (hdr + offsetof (struct mach_o_segment_command_32, nsects),
+- nsects);
++ *nsects);
+ /* flags left as zero. */
+ }
+ else
+@@ -951,9 +1313,8 @@
+ MACH_O_LC_SEGMENT);
+ set_32 (hdr + offsetof (struct mach_o_segment_command_64, cmdsize),
+ cmdsize);
+- strncpy (((char *) hdr
+- + offsetof (struct mach_o_segment_command_64, segname)),
+- sobj->segment_name, MACH_O_NAME_LEN);
++ /* MH_OBJECTS have a single, anonymous, segment - so the segment name
++ is left empty. */
+ /* vmaddr left as zero. */
+ /* vmsize left as zero. */
+ set_64 (hdr + offsetof (struct mach_o_segment_command_64, fileoff),
+@@ -963,7 +1324,7 @@
+ /* maxprot left as zero. */
+ /* initprot left as zero. */
+ set_32 (hdr + offsetof (struct mach_o_segment_command_64, nsects),
+- nsects);
++ *nsects);
+ /* flags left as zero. */
+ #endif
+ }
+@@ -978,23 +1339,17 @@
+ simple_object_mach_o_write_to_file (simple_object_write *sobj, int descriptor,
+ int *err)
{
--static i386_thread_state_t ac_aggr;
-+static x86_thread_state32_t ac_aggr;
- if (sizeof ac_aggr.__eax)
- return 0;
- ;
-@@ -6286,28 +6286,256 @@
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- ac_cv_member_i386_thread_state_t___eax=yes
-+ ac_cv_member_x86_thread_state32_t___eax=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
-
--ac_cv_member_i386_thread_state_t___eax=no
-+ac_cv_member_x86_thread_state32_t___eax=no
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--echo "$as_me:$LINENO: result: $ac_cv_member_i386_thread_state_t___eax" >&5
--echo "${ECHO_T}$ac_cv_member_i386_thread_state_t___eax" >&6
--if test $ac_cv_member_i386_thread_state_t___eax = yes; then
-+echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state32_t___eax" >&5
-+echo "${ECHO_T}$ac_cv_member_x86_thread_state32_t___eax" >&6
-+if test $ac_cv_member_x86_thread_state32_t___eax = yes; then
-
- cat >>confdefs.h <<\_ACEOF
--#define HAS_I386_THREAD_STATE___EAX
-+#define HAS_X86_THREAD_STATE32___EAX 1
- _ACEOF
-
- fi
+- size_t nsects;
+- simple_object_write_section *section;
++ size_t nsects = 0;
+ const char *errmsg;
+
+- /* Start at 1 for symbol_names section. */
+- nsects = 1;
+- for (section = sobj->sections; section != NULL; section = section->next)
+- ++nsects;
++ if (!simple_object_mach_o_write_segment (sobj, descriptor, &nsects,
++ &errmsg, err))
++ return errmsg;
+
+ if (!simple_object_mach_o_write_header (sobj, descriptor, nsects,
+ &errmsg, err))
+ return errmsg;
+
+- if (!simple_object_mach_o_write_segment (sobj, descriptor, nsects,
+- &errmsg, err))
+- return errmsg;
+-
+ return NULL;
+ }
- ;;
-+ x86_64-*-darwin*)
-+ echo "$as_me:$LINENO: checking for x86_thread_state64_t.rax" >&5
-+echo $ECHO_N "checking for x86_thread_state64_t.rax... $ECHO_C" >&6
-+if test "${ac_cv_member_x86_thread_state64_t_rax+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>
+Index: ChangeLog
+===================================================================
+--- ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,23 @@
++2012-01-02 Richard Guenther <rguenther@suse.de>
+
-+int
-+main ()
-+{
-+static x86_thread_state64_t ac_aggr;
-+if (ac_aggr.rax)
-+return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_member_x86_thread_state64_t_rax=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
++ PR bootstrap/51686
++ * Makefile.def (install-strip-gcc): Depend on install-strip-lto-plugin.
++ * Makefile.in: Regenerate.
+
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>
++2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
+
-+int
-+main ()
-+{
-+static x86_thread_state64_t ac_aggr;
-+if (sizeof ac_aggr.rax)
-+return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_member_x86_thread_state64_t_rax=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
++ * configure: Regenerate.
+
-+ac_cv_member_x86_thread_state64_t_rax=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state64_t_rax" >&5
-+echo "${ECHO_T}$ac_cv_member_x86_thread_state64_t_rax" >&6
-+if test $ac_cv_member_x86_thread_state64_t_rax = yes; then
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAS_X86_THREAD_STATE64_RAX 1
-+_ACEOF
++ * libtool.m4: Additional FreeBSD 10 fixes.
+
-+fi
++2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
+
-+ echo "$as_me:$LINENO: checking for x86_thread_state64_t.__rax" >&5
-+echo $ECHO_N "checking for x86_thread_state64_t.__rax... $ECHO_C" >&6
-+if test "${ac_cv_member_x86_thread_state64_t___rax+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>
++ PR target/49992
++ * configure.ac: Remove ranlib special-casing for Darwin.
++ * configure: Regenerate.
+
-+int
-+main ()
-+{
-+static x86_thread_state64_t ac_aggr;
-+if (ac_aggr.__rax)
-+return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_member_x86_thread_state64_t___rax=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: lto-plugin/configure
+===================================================================
+--- lto-plugin/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -622,6 +622,7 @@
+ GREP
+ SED
+ LIBTOOL
++ac_lto_plugin_warn_cflags
+ am__fastdepCC_FALSE
+ am__fastdepCC_TRUE
+ CCDEPMODE
+@@ -4040,6 +4041,45 @@
+ fi
+ fi
+
++ac_lto_plugin_warn_cflags=
++save_CFLAGS="$CFLAGS"
++for option in -Wall; do
++ as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
++$as_echo_n "checking whether $CC supports $option... " >&6; }
++if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
++ $as_echo_n "(cached) " >&6
++else
++ CFLAGS="$option"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-+#include <sys/cdefs.h>
-+ #include <mach/thread_status.h>
+
+int
+main ()
+{
-+static x86_thread_state64_t ac_aggr;
-+if (sizeof ac_aggr.__rax)
-+return 0;
++
+ ;
+ return 0;
+}
+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_member_x86_thread_state64_t___rax=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++ eval "$as_acx_Woption=yes"
+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_member_x86_thread_state64_t___rax=no
++ eval "$as_acx_Woption=no"
+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++eval ac_res=\$$as_acx_Woption
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++ if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
++ ac_lto_plugin_warn_cflags="$ac_lto_plugin_warn_cflags${ac_lto_plugin_warn_cflags:+ }$option"
+fi
-+echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state64_t___rax" >&5
-+echo "${ECHO_T}$ac_cv_member_x86_thread_state64_t___rax" >&6
-+if test $ac_cv_member_x86_thread_state64_t___rax = yes; then
++ done
++CFLAGS="$save_CFLAGS"
++
+ case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+@@ -8733,7 +8773,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9646,7 +9686,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9664,7 +9704,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -10498,7 +10538,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10501 "configure"
++#line 10541 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -10604,7 +10644,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10607 "configure"
++#line 10647 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+Index: lto-plugin/Makefile.in
+===================================================================
+--- lto-plugin/Makefile.in (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/Makefile.in (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -47,6 +47,7 @@
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lthostflags.m4 \
+ $(top_srcdir)/../config/override.m4 \
++ $(top_srcdir)/../config/warnings.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+@@ -167,6 +168,7 @@
+ abs_top_srcdir = @abs_top_srcdir@
+ ac_ct_CC = @ac_ct_CC@
+ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
++ac_lto_plugin_warn_cflags = @ac_lto_plugin_warn_cflags@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -227,7 +229,7 @@
+ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+ libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+ AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = @ac_lto_plugin_warn_cflags@
+ AM_LIBTOOLFLAGS = --tag=disable-static
+ libexecsub_LTLIBRARIES = liblto_plugin.la
+ gcc_build_dir = ../$(host_subdir)/gcc
+Index: lto-plugin/configure.ac
+===================================================================
+--- lto-plugin/configure.ac (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/configure.ac (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -6,6 +6,7 @@
+ AM_MAINTAINER_MODE
+ AC_PROG_CC
+ AC_SYS_LARGEFILE
++ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
+ AM_PROG_LIBTOOL
+ ACX_LT_HOST_FLAGS
+ AC_SUBST(target_noncanonical)
+Index: lto-plugin/ChangeLog
+===================================================================
+--- lto-plugin/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,20 @@
++2012-01-03 Richard Guenther <rguenther@suse.de>
++
++ Backport from mainline
++ 2011-08-10 Richard Guenther <rguenther@suse.de>
++
++ PR bootstrap/49907
++ lto-plugin/
++ * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
++ * Makefile.am (AM_CFLAGS): Adjust. Do not build with -Werror.
++ * configure: Regenerate.
++ * Makefile.in: Likewise.
++ * aclocal.m4: Likewise.
+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAS_X86_THREAD_STATE64___RAX 1
-+_ACEOF
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+fi
++ * configure: Regenerate.
+
-+ ;;
- *) ;;
- esac
-
-@@ -6392,8 +6620,16 @@
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: lto-plugin/Makefile.am
+===================================================================
+--- lto-plugin/Makefile.am (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/Makefile.am (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8,7 +8,7 @@
+ libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = @ac_lto_plugin_warn_cflags@
+ AM_LIBTOOLFLAGS = --tag=disable-static
+
+ libexecsub_LTLIBRARIES = liblto_plugin.la
+Index: lto-plugin/aclocal.m4
+===================================================================
+--- lto-plugin/aclocal.m4 (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ lto-plugin/aclocal.m4 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -973,6 +973,7 @@
+ m4_include([../config/lead-dot.m4])
+ m4_include([../config/lthostflags.m4])
+ m4_include([../config/override.m4])
++m4_include([../config/warnings.m4])
+ m4_include([../libtool.m4])
+ m4_include([../ltoptions.m4])
+ m4_include([../ltsugar.m4])
+Index: libffi/configure
+===================================================================
+--- libffi/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libffi/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -9001,7 +9001,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9914,7 +9914,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9932,7 +9932,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
;;
- esac
-
-+# extra LD Flags which are required for targets
-+case "${host}" in
-+ *-*-darwin*)
-+ extra_ldflags_libgc=-Wl,-single_module
-+ ;;
-+esac
-
-
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libffi/ChangeLog
+===================================================================
+--- libffi/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libffi/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
++ * configure: Regenerate.
+
- target_all=libgcjgc.la
-
+ 2011-10-26 Release Manager
-@@ -8246,6 +8482,7 @@
- s,@THREADLIBS@,$THREADLIBS,;t t
- s,@POWERPC_DARWIN_TRUE@,$POWERPC_DARWIN_TRUE,;t t
- s,@POWERPC_DARWIN_FALSE@,$POWERPC_DARWIN_FALSE,;t t
-+s,@extra_ldflags_libgc@,$extra_ldflags_libgc,;t t
- s,@EXTRA_TEST_LIBS@,$EXTRA_TEST_LIBS,;t t
- s,@target_all@,$target_all,;t t
- s,@CPLUSPLUS_TRUE@,$CPLUSPLUS_TRUE,;t t
-Index: boehm-gc/pthread_support.c
+ * GCC 4.6.2 released.
+Index: libssp/configure
===================================================================
---- boehm-gc/pthread_support.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/pthread_support.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1135,7 +1135,13 @@
- size_t stack_size;
-
- my_pthread = pthread_self();
-- pthread_getattr_np (my_pthread, &attr);
-+ if (pthread_getattr_np (my_pthread, &attr) != 0)
-+ {
-+# ifdef DEBUG_THREADS
-+ GC_printf1("Can not determine stack base for attached thread");
-+# endif
-+ return 0;
-+ }
- pthread_attr_getstack (&attr, (void **) &stack_addr, &stack_size);
- pthread_attr_destroy (&attr);
-
-Index: boehm-gc/os_dep.c
-===================================================================
---- boehm-gc/os_dep.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/os_dep.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -3371,7 +3371,7 @@
- 1. Apple's mach/xnu documentation
- 2. Timothy J. Wood's "Mach Exception Handlers 101" post to the
- omnigroup's macosx-dev list.
-- www.omnigroup.com/mailman/archive/macosx-dev/2000-June/002030.html
-+ www.omnigroup.com/mailman/archive/macosx-dev/2000-June/014178.html
- 3. macosx-nat.c from Apple's GDB source code.
- */
-
-@@ -3683,7 +3683,7 @@
- mask,
- GC_ports.exception,
- EXCEPTION_DEFAULT,
-- MACHINE_THREAD_STATE
-+ GC_MACH_THREAD_STATE
- );
- if(r != KERN_SUCCESS) ABORT("task_set_exception_ports failed");
-
-@@ -3802,10 +3802,16 @@
- mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE64_COUNT;
- ppc_exception_state64_t exc_state;
- # endif
--# elif defined(I386)
-- thread_state_flavor_t flavor = i386_EXCEPTION_STATE;
-- mach_msg_type_number_t exc_state_count = i386_EXCEPTION_STATE_COUNT;
-- i386_exception_state_t exc_state;
-+# elif defined(I386) || defined(X86_64)
-+# if CPP_WORDSZ == 32
-+ thread_state_flavor_t flavor = x86_EXCEPTION_STATE32;
-+ mach_msg_type_number_t exc_state_count = x86_EXCEPTION_STATE32_COUNT;
-+ x86_exception_state32_t exc_state;
-+# else
-+ thread_state_flavor_t flavor = x86_EXCEPTION_STATE64;
-+ mach_msg_type_number_t exc_state_count = x86_EXCEPTION_STATE64_COUNT;
-+ x86_exception_state64_t exc_state;
-+# endif
- # else
- # error FIXME for non-ppc darwin
- # endif
-@@ -3838,9 +3844,9 @@
-
- /* This is the address that caused the fault */
- #if defined(POWERPC)
-- addr = (char*) exc_state.dar;
--#elif defined (I386)
-- addr = (char*) exc_state.faultvaddr;
-+ addr = (char*) exc_state. THREAD_FLD(dar);
-+#elif defined (I386) || defined (X86_64)
-+ addr = (char*) exc_state. THREAD_FLD(faultvaddr);
- #else
- # error FIXME for non POWERPC/I386
- #endif
-Index: boehm-gc/Makefile.am
-===================================================================
---- boehm-gc/Makefile.am (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/Makefile.am (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -33,11 +33,13 @@
- rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
- sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
-
-+extra_ldflags_libgc = @extra_ldflags_libgc@
-+
- # Include THREADLIBS here to ensure that the correct versions of
- # linuxthread semaphore functions get linked:
- libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
- libgcjgc_la_DEPENDENCIES = @addobjs@
--libgcjgc_la_LDFLAGS = -version-info 1:2:0 -rpath $(toolexeclibdir)
-+libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
-
- libgcjgc_convenience_la_LIBADD = @addobjs@
- libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
-Index: boehm-gc/dyn_load.c
-===================================================================
---- boehm-gc/dyn_load.c (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ boehm-gc/dyn_load.c (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1152,7 +1152,7 @@
- };
-
- #ifdef DARWIN_DEBUG
--static const char *GC_dyld_name_for_hdr(struct mach_header *hdr) {
-+static const char *GC_dyld_name_for_hdr(const struct GC_MACH_HEADER *hdr) {
- unsigned long i,c;
- c = _dyld_image_count();
- for(i=0;i<c;i++) if(_dyld_get_image_header(i) == hdr)
-@@ -1162,12 +1162,17 @@
- #endif
-
- /* This should never be called by a thread holding the lock */
--static void GC_dyld_image_add(struct mach_header* hdr, unsigned long slide) {
-+static void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr, intptr_t slide)
-+{
- unsigned long start,end,i;
-- const struct section *sec;
-+ const struct GC_MACH_SECTION *sec;
- if (GC_no_dls) return;
- for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
-- sec = getsectbynamefromheader(
-+# if defined (__LP64__)
-+ sec = getsectbynamefromheader_64(
-+# else
-+ sec = getsectbynamefromheader(
-+# endif
- hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
- if(sec == NULL || sec->size == 0) continue;
- start = slide + sec->addr;
-@@ -1184,11 +1189,16 @@
- }
-
- /* This should never be called by a thread holding the lock */
--static void GC_dyld_image_remove(struct mach_header* hdr, unsigned long slide) {
-+static void GC_dyld_image_remove(const struct GC_MACH_HEADER *hdr,
-+ intptr_t slide) {
- unsigned long start,end,i;
-- const struct section *sec;
-+ const struct GC_MACH_SECTION *sec;
- for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
-- sec = getsectbynamefromheader(
-+# if defined (__LP64__)
-+ sec = getsectbynamefromheader_64(
-+# else
-+ sec = getsectbynamefromheader(
-+# endif
- hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
- if(sec == NULL || sec->size == 0) continue;
- start = slide + sec->addr;
-Index: configure.in
-===================================================================
---- configure.in (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ configure.in (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -2419,7 +2419,13 @@
- # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
- CFLAGS="$CFLAGS -fkeep-inline-functions"
- AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
-- AC_TRY_COMPILE(,,
-+ AC_TRY_COMPILE([
-+#if (__GNUC__ < 3) \
-+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
-+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
-+#error http://gcc.gnu.org/PR29382
-+#endif
-+ ],,
- [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
- [AC_MSG_RESULT([no])])
+--- libssp/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libssp/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -8864,7 +8864,7 @@
+ ;;
-Index: ChangeLog
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -9780,7 +9780,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -9798,7 +9798,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libssp/ChangeLog
===================================================================
---- ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,9 @@
-+2007-05-30 Jakub Jelinek <jakub@redhat.com>
+--- libssp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libssp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+ PR bootstrap/29382
-+ * configure.in: Don't use -fkeep-inline-functions for GCC < 3.3.1.
-+ * configure: Rebuilt.
++ * configure: Regenerate.
+
- 2007-05-13 Release Manager
+ 2011-10-26 Release Manager
- * GCC 4.2.0 released.
+ * GCC 4.6.2 released.
Index: config/ChangeLog
===================================================================
---- config/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ config/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,8 @@
-+2007-06-20 Mike Stump <mrs@apple.com>
+--- config/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ config/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,7 @@
++2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
+
-+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Fix incremental builds.
-+ (ACX_HAVE_GCC_FOR_TARGET): Likewise.
++ * acx.m4 (Test for GNAT): Update comment and add quotes in final test.
+
- 2007-05-13 Release Manager
+ 2011-10-26 Release Manager
- * GCC 4.2.0 released.
+ * GCC 4.6.2 released.
Index: config/acx.m4
===================================================================
---- config/acx.m4 (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ config/acx.m4 (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -183,6 +183,8 @@
- else
- $1="${ncn_target_tool_prefix}[$]2"
- fi], [$1="$3"])
-+else
-+ $1="$ac_cv_prog_$1"
- fi
- ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS
-
-@@ -297,7 +299,7 @@
- elif test $build != $host && test $have_gcc_for_target = yes; then
- $1=`$GCC_FOR_TARGET --print-prog-name=$2`
- test [$]$1=$2 && $1=
-- ac_cv_path_$1=[$]$1
-+ test -n "[$]$1" && ac_cv_path_$1=[$]$1
- fi
+--- config/acx.m4 (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ config/acx.m4 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -356,9 +356,9 @@
+ ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
+
+ # Test for GNAT.
+-# We require the gnatbind program, and a compiler driver that
+-# understands Ada. We use the user's CC setting, already found,
+-# and possibly add $1 to the command-line parameters.
++# We require the gnatbind & gnatmake programs, as well as a compiler driver
++# that understands Ada. We use the user's CC setting, already found, and
++# possibly add $1 to the command-line parameters.
+ #
+ # Sets the shell variable have_gnat to yes or no as appropriate, and
+ # substitutes GNATBIND and GNATMAKE.
+@@ -387,7 +387,7 @@
fi
- if test -z "$ac_cv_path_$1" ; then
-Index: libjava/java/lang/natClassLoader.cc
-===================================================================
---- libjava/java/lang/natClassLoader.cc (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libjava/java/lang/natClassLoader.cc (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -235,6 +235,15 @@
-
- new_class->engine = &_Jv_soleIndirectCompiledEngine;
-
-+ /* FIXME: Way back before the dawn of time, we overloaded the
-+ SYNTHETIC class access modifier to mean INTERPRETED. This was a
-+ Bad Thing, but it didn't matter then because classes were never
-+ marked synthetic. However, it is possible to redeem the
-+ situation: _Jv_NewClassFromInitializer is only called from
-+ compiled classes, so we clear the INTERPRETED flag. This is a
-+ kludge! */
-+ new_class->accflags &= ~java::lang::reflect::Modifier::INTERPRETED;
-+
- if (_Jv_CheckABIVersion ((unsigned long) new_class->next_or_version))
- (*_Jv_RegisterClassHook) (new_class);
-
-Index: libjava/ChangeLog
+ rm -f conftest.*])
+
+-if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
++if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
+ have_gnat=yes
+ else
+ have_gnat=no
+Index: libjava/libltdl/configure
+===================================================================
+--- libjava/libltdl/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/libltdl/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -7355,7 +7355,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -7968,7 +7968,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libjava/libltdl/ChangeLog
===================================================================
---- libjava/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ libjava/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
+--- libjava/libltdl/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/libltdl/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
@@ -1,3 +1,8 @@
-+2007-05-31 Andrew Haley <aph@redhat.com>
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+ * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Clear
-+ INTERPRETED access modifier.
++ * acinclude.m4: Additional FreeBSD 10 fixes.
++ * configure: Regenerate.
+
- 2007-05-13 Release Manager
+ 2011-10-26 Release Manager
- * GCC 4.2.0 released.
-Index: maintainer-scripts/ChangeLog
+ * GCC 4.6.2 released.
+Index: libjava/libltdl/acinclude.m4
===================================================================
---- maintainer-scripts/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ maintainer-scripts/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -1,3 +1,7 @@
-+2007-05-28 Mark Mitchell <mark@codesourcery.com>
+--- libjava/libltdl/acinclude.m4 (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/libltdl/acinclude.m4 (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1377,7 +1377,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+@@ -3035,7 +3035,7 @@
+ ;;
+ esac
+ ;;
+- freebsd[[12]]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+@@ -5669,7 +5669,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+Index: libjava/configure.ac
+===================================================================
+--- libjava/configure.ac (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/configure.ac (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1060,7 +1060,7 @@
+ *-*-cygwin*)
+ # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
+ ;;
+- *-*-freebsd[[1234]]*)
++ *-*-freebsd[[34]].*)
+ # Before FreeBSD 5, it didn't have -lpthread (or any library which
+ # merely adds pthread_* functions) but it does have a -pthread switch
+ # which is required at link-time to select -lc_r *instead* of -lc.
+Index: libjava/classpath/config.rpath
+===================================================================
+--- libjava/classpath/config.rpath (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/classpath/config.rpath (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -361,7 +361,7 @@
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+- freebsd2*)
++ freebsd2.*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+@@ -533,7 +533,7 @@
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+- freebsd[123]*)
++ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+Index: libjava/classpath/configure
+===================================================================
+--- libjava/classpath/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/classpath/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -10025,7 +10025,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -10941,7 +10941,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -10959,7 +10959,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -14225,7 +14225,7 @@
+ esac
+ ;;
+
+- freebsd[12]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+@@ -16000,7 +16000,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -16018,7 +16018,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+Index: libjava/classpath/ChangeLog.gcj
+===================================================================
+--- libjava/classpath/ChangeLog.gcj (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/classpath/ChangeLog.gcj (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,9 @@
++2011-11-29 Andreas Tobler <andreast@fgznet.ch>
++
++ * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up.
++ (libname_spec): Likewise.
++ * configure: Regenerate with autoconf -I ../../.
++
+ 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
+Index: libjava/ChangeLog
+===================================================================
+--- libjava/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,16 @@
++2011-11-24 Jakub Jelinek <jakub@redhat.com>
++
++ PR bootstrap/50888
++ * prims.cc: Don't include ctype.h.
++ (c_isspace): Define.
++ (next_property_key, next_property_value): Use it instead
++ of isspace.
++
++2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
-+ * gcc_release: Adjust placement of release candidates.
++ * configure.ac: Fix FreeBSD 10 detection.
++ * configure: Regenerate.
+
- 2007-05-13 Release Manager
+ 2011-10-26 Release Manager
- * GCC 4.2.0 released.
-Index: maintainer-scripts/gcc_release
+ * GCC 4.6.2 released.
+Index: libjava/prims.cc
===================================================================
---- maintainer-scripts/gcc_release (.../tags/gcc_4_2_0_release) (revision 126002)
-+++ maintainer-scripts/gcc_release (.../branches/gcc-4_2-branch) (revision 126002)
-@@ -699,10 +699,10 @@
- # and minor release numbers.
- SVNBRANCH="branches/gcc-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
+--- libjava/prims.cc (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/prims.cc (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -38,7 +38,6 @@
+ #endif
+
+ #ifndef DISABLE_GETENV_PROPERTIES
+-#include <ctype.h>
+ #include <java-props.h>
+ #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
+ #else
+@@ -985,6 +984,8 @@
+
+ #ifndef DISABLE_GETENV_PROPERTIES
+
++#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL)
++
+ static char *
+ next_property_key (char *s, size_t *length)
+ {
+@@ -993,7 +994,7 @@
+ JvAssert (s);
+
+ // Skip over whitespace
+- while (isspace (*s))
++ while (c_isspace (*s))
+ s++;
+
+ // If we've reached the end, return NULL. Also return NULL if for
+@@ -1005,7 +1006,7 @@
+
+ // Determine the length of the property key.
+ while (s[l] != 0
+- && ! isspace (s[l])
++ && ! c_isspace (s[l])
+ && s[l] != ':'
+ && s[l] != '=')
+ {
+@@ -1027,19 +1028,19 @@
+
+ JvAssert (s);
+
+- while (isspace (*s))
++ while (c_isspace (*s))
+ s++;
+
+ if (*s == ':'
+ || *s == '=')
+ s++;
+
+- while (isspace (*s))
++ while (c_isspace (*s))
+ s++;
+
+ // Determine the length of the property value.
+ while (s[l] != 0
+- && ! isspace (s[l])
++ && ! c_isspace (s[l])
+ && s[l] != ':'
+ && s[l] != '=')
+ {
+Index: libjava/configure
+===================================================================
+--- libjava/configure (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ libjava/configure (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -11560,7 +11560,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+@@ -12476,7 +12476,7 @@
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+@@ -12494,7 +12494,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -14384,7 +14384,7 @@
+ esac
+ ;;
-- # If this is not a final release, set various parameters acordingly.
-+ # If this is not a final release, set various parameters accordingly.
- if [ ${FINAL} -ne 1 ]; then
-- RELEASE="${RELEASE}-${DATE}"
-- FTP_PATH="${FTP_PATH}/prerelease-${RELEASE}/"
-+ RELEASE="${RELEASE}-RC-${DATE}"
-+ FTP_PATH="${SNAPSHOTS_DIR}/${RELEASE}"
+- freebsd[12]*)
++ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+@@ -16159,7 +16159,7 @@
+ objformat=`/usr/bin/objformat`
else
- FTP_PATH="${FTP_PATH}/releases/gcc-${RELEASE}/"
+ case $host_os in
+- freebsd[123]*) objformat=aout ;;
++ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
+@@ -16177,7 +16177,7 @@
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+- freebsd2*)
++ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+@@ -18520,7 +18520,7 @@
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+- freebsd2*)
++ freebsd2.*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=yes
+ hardcode_minus_L_GCJ=yes
+@@ -20715,7 +20715,7 @@
+ *-*-cygwin*)
+ # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
+ ;;
+- *-*-freebsd[1234]*)
++ *-*-freebsd[34].*)
+ # Before FreeBSD 5, it didn't have -lpthread (or any library which
+ # merely adds pthread_* functions) but it does have a -pthread switch
+ # which is required at link-time to select -lc_r *instead* of -lc.
+Index: maintainer-scripts/ChangeLog
+===================================================================
+--- maintainer-scripts/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ maintainer-scripts/ChangeLog (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -1,3 +1,8 @@
++2011-11-23 Gerald Pfeifer <gerald@pfeifer.com>
++
++ * update_web_docs_svn: Make $DOCSDIR group writable after
++ creating it.
++
+ 2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+Index: maintainer-scripts/update_web_docs_svn
+===================================================================
+--- maintainer-scripts/update_web_docs_svn (.../tags/gcc_4_6_2_release) (wersja 183790)
++++ maintainer-scripts/update_web_docs_svn (.../branches/gcc-4_6-branch) (wersja 183790)
+@@ -93,6 +93,7 @@
+
+ if [ ! -d $DOCSDIR ]; then
+ mkdir $DOCSDIR
++ chmod g+w $DOCSDIR
+ fi
+
+ if [ -z "$RELEASE" ]; then