X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=gcc-branch.diff;h=265c185214edc977d3aeacfd24d96ac999184960;hb=ad034c64fd98571e2b70381c0819c0be23d58dba;hp=622f26d331e323c18876c17510f40ecec5d3b700;hpb=7be242a0caba90b393d2cc7bfcc49c2cc217e273;p=packages%2Fgcc.git diff --git a/gcc-branch.diff b/gcc-branch.diff index 622f26d..265c185 100644 --- a/gcc-branch.diff +++ b/gcc-branch.diff @@ -1,2117 +1,2685 @@ -Index: libgomp/fortran.c -=================================================================== ---- libgomp/fortran.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libgomp/fortran.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,4 +1,4 @@ --/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. -+/* Copyright (C) 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. - Contributed by Jakub Jelinek . - - This file is part of the GNU OpenMP Library (libgomp). -@@ -27,6 +27,7 @@ - #include "libgomp.h" - #include "libgomp_f.h" - #include -+#include - - #ifdef HAVE_ATTRIBUTE_ALIAS - /* Use internal aliases if possible. */ -@@ -244,6 +245,8 @@ - omp_lock_symver (omp_test_nest_lock_) - #endif +Index: libquadmath/configure +=================================================================== +--- libquadmath/configure (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libquadmath/configure (.../branches/gcc-4_8-branch) (revision 220382) +@@ -613,7 +613,6 @@ + LIBQUAD_USE_SYMVER_TRUE + toolexeclibdir + toolexecdir +-multi_basedir + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE +@@ -682,6 +681,7 @@ + INSTALL_DATA + INSTALL_SCRIPT + INSTALL_PROGRAM ++multi_basedir + target_noncanonical + target_os + target_vendor +@@ -736,6 +736,7 @@ + ac_subst_files='' + ac_user_opts=' + enable_option_checking ++enable_multilib + enable_version_specific_runtime_libs + enable_dependency_tracking + with_bugurl +@@ -746,7 +747,6 @@ + with_gnu_ld + enable_libtool_lock + enable_maintainer_mode +-enable_multilib + enable_symvers + enable_generated_files_in_srcdir + ' +@@ -1379,6 +1379,7 @@ + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --enable-multilib build many library versions (default) + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory +@@ -1391,7 +1392,6 @@ + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer +- --enable-multilib build many library versions (default) + --disable-symvers disable symbol versioning for libquadmath + --enable-generated-files-in-srcdir + put copies of generated files in source dir intended +@@ -2370,6 +2370,44 @@ + + + ++# Default to --enable-multilib ++# Check whether --enable-multilib was given. ++if test "${enable_multilib+set}" = set; then : ++ enableval=$enable_multilib; case "$enableval" in ++ yes) multilib=yes ;; ++ no) multilib=no ;; ++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; ++ esac ++else ++ multilib=yes ++fi ++ ++ ++# We may get other options which we leave undocumented: ++# --with-target-subdir, --with-multisrctop, --with-multisubdir ++# See config-ml.in if you want the gory details. ++ ++if test "$srcdir" = "."; then ++ if test "$with_target_subdir" != "."; then ++ multi_basedir="$srcdir/$with_multisrctop../.." ++ else ++ multi_basedir="$srcdir/$with_multisrctop.." ++ fi ++else ++ multi_basedir="$srcdir/.." ++fi ++ ++ ++# Even if the default multilib is not a cross compilation, ++# it may be that some of the other multilibs are. ++if test $cross_compiling = no && test $multilib = yes \ ++ && test "x${with_multisubdir}" != x ; then ++ cross_compiling=maybe ++fi ++ ++ac_config_commands="$ac_config_commands default-1" ++ ++ + target_alias=${target_alias-$host_alias} + + +@@ -10527,7 +10565,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10530 "configure" ++#line 10568 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10633,7 +10671,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10636 "configure" ++#line 10674 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10918,44 +10956,7 @@ + MAINT=$MAINTAINER_MODE_TRUE + + +-# Default to --enable-multilib +-# Check whether --enable-multilib was given. +-if test "${enable_multilib+set}" = set; then : +- enableval=$enable_multilib; case "$enableval" in +- yes) multilib=yes ;; +- no) multilib=no ;; +- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; +- esac +-else +- multilib=yes +-fi -+#define TO_INT(x) ((x) > INT_MIN ? (x) < INT_MAX ? (x) : INT_MAX : INT_MIN) +- +-# We may get other options which we leave undocumented: +-# --with-target-subdir, --with-multisrctop, --with-multisubdir +-# See config-ml.in if you want the gory details. +- +-if test "$srcdir" = "."; then +- if test "$with_target_subdir" != "."; then +- multi_basedir="$srcdir/$with_multisrctop../.." +- else +- multi_basedir="$srcdir/$with_multisrctop.." +- fi +-else +- multi_basedir="$srcdir/.." +-fi +- +- +-# Even if the default multilib is not a cross compilation, +-# it may be that some of the other multilibs are. +-if test $cross_compiling = no && test $multilib = yes \ +- && test "x${with_multisubdir}" != x ; then +- cross_compiling=maybe +-fi +- +-ac_config_commands="$ac_config_commands default-1" +- +- + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -13644,6 +13645,20 @@ + # + # INIT-COMMANDS + # ++ ++srcdir="$srcdir" ++host="$host" ++target="$target" ++with_multisubdir="$with_multisubdir" ++with_multisrctop="$with_multisrctop" ++with_target_subdir="$with_target_subdir" ++ac_configure_args="${multilib_arg} ${ac_configure_args}" ++multi_basedir="$multi_basedir" ++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ++CC="$CC" ++CXX="$CXX" ++GFORTRAN="$GFORTRAN" ++GCJ="$GCJ" + AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +@@ -13906,20 +13921,6 @@ + + + +-srcdir="$srcdir" +-host="$host" +-target="$target" +-with_multisubdir="$with_multisubdir" +-with_multisrctop="$with_multisrctop" +-with_target_subdir="$with_target_subdir" +-ac_configure_args="${multilib_arg} ${ac_configure_args}" +-multi_basedir="$multi_basedir" +-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} +-CC="$CC" +-CXX="$CXX" +-GFORTRAN="$GFORTRAN" +-GCJ="$GCJ" +- + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +@@ -13929,9 +13930,9 @@ + do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; +- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; +@@ -14517,6 +14518,14 @@ + + + case $ac_file$ac_mode in ++ "default-1":C) ++# Only add multilib support code if we just rebuilt the top-level ++# Makefile. ++case " $CONFIG_FILES " in ++ *" Makefile "*) ++ ac_file=Makefile . ${multi_basedir}/config-ml.in ++ ;; ++esac ;; + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval +@@ -15251,14 +15260,6 @@ + chmod +x "$ofile" + + ;; +- "default-1":C) +-# Only add multilib support code if we just rebuilt the top-level +-# Makefile. +-case " $CONFIG_FILES " in +- *" Makefile "*) +- ac_file=Makefile . ${multi_basedir}/config-ml.in +- ;; +-esac ;; + + esac + done # for ac_tag +Index: libquadmath/ChangeLog +=================================================================== +--- libquadmath/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libquadmath/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,8 @@ ++2015-01-26 Matthias Klose + - void - omp_set_dynamic_ (const int32_t *set) - { -@@ -253,7 +256,7 @@ - void - omp_set_dynamic_8_ (const int64_t *set) - { -- omp_set_dynamic (*set); -+ omp_set_dynamic (!!*set); - } ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. ++ + 2014-12-19 Release Manager - void -@@ -265,7 +268,7 @@ - void - omp_set_nested_8_ (const int64_t *set) - { -- omp_set_nested (*set); -+ omp_set_nested (!!*set); - } + * GCC 4.8.4 released. +Index: libquadmath/configure.ac +=================================================================== +--- libquadmath/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libquadmath/configure.ac (.../branches/gcc-4_8-branch) (revision 220382) +@@ -23,6 +23,8 @@ + AC_CANONICAL_SYSTEM + ACX_NONCANONICAL_TARGET - void -@@ -277,7 +280,7 @@ - void - omp_set_num_threads_8_ (const int64_t *set) - { -- omp_set_num_threads (*set); -+ omp_set_num_threads (TO_INT (*set)); - } ++AM_ENABLE_MULTILIB(, ..) ++ + target_alias=${target_alias-$host_alias} + AC_SUBST(target_alias) - int32_t -@@ -343,7 +346,7 @@ - void - omp_set_schedule_8_ (const int32_t *kind, const int64_t *modifier) - { -- omp_set_schedule (*kind, *modifier); -+ omp_set_schedule (*kind, TO_INT (*modifier)); - } +@@ -60,7 +62,6 @@ + AC_SUBST(enable_static) - void -@@ -381,7 +384,7 @@ - void - omp_set_max_active_levels_8_ (const int64_t *levels) - { -- omp_set_max_active_levels (*levels); -+ omp_set_max_active_levels (TO_INT (*levels)); - } + AM_MAINTAINER_MODE +-AM_ENABLE_MULTILIB(, ..) - int32_t -@@ -405,7 +408,7 @@ - int32_t - omp_get_ancestor_thread_num_8_ (const int64_t *level) - { -- return omp_get_ancestor_thread_num (*level); -+ return omp_get_ancestor_thread_num (TO_INT (*level)); - } + AC_LANG_C + # The same as in boehm-gc and libstdc++. Have to borrow it from there. +Index: libsanitizer/configure +=================================================================== +--- libsanitizer/configure (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libsanitizer/configure (.../branches/gcc-4_8-branch) (revision 220382) +@@ -662,7 +662,6 @@ + MAINT + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE +-multi_basedir + am__untar + am__tar + AMTAR +@@ -701,6 +700,7 @@ + build_vendor + build_cpu + build ++multi_basedir + target_alias + host_alias + build_alias +@@ -742,8 +742,8 @@ + ac_subst_files='' + ac_user_opts=' + enable_option_checking ++enable_multilib + enable_version_specific_runtime_libs +-enable_multilib + enable_maintainer_mode + enable_dependency_tracking + enable_shared +@@ -1388,8 +1388,8 @@ + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --enable-multilib build many library versions (default) + --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory +- --enable-multilib build many library versions (default) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build +@@ -2417,6 +2417,44 @@ + + + ++# Default to --enable-multilib ++# Check whether --enable-multilib was given. ++if test "${enable_multilib+set}" = set; then : ++ enableval=$enable_multilib; case "$enableval" in ++ yes) multilib=yes ;; ++ no) multilib=no ;; ++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; ++ esac ++else ++ multilib=yes ++fi ++ ++ ++# We may get other options which we leave undocumented: ++# --with-target-subdir, --with-multisrctop, --with-multisubdir ++# See config-ml.in if you want the gory details. ++ ++if test "$srcdir" = "."; then ++ if test "$with_target_subdir" != "."; then ++ multi_basedir="$srcdir/$with_multisrctop../.." ++ else ++ multi_basedir="$srcdir/$with_multisrctop.." ++ fi ++else ++ multi_basedir="$srcdir/.." ++fi ++ ++ ++# Even if the default multilib is not a cross compilation, ++# it may be that some of the other multilibs are. ++if test $cross_compiling = no && test $multilib = yes \ ++ && test "x${with_multisubdir}" != x ; then ++ cross_compiling=maybe ++fi ++ ++ac_config_commands="$ac_config_commands default-1" ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-version-specific-runtime-libs" >&5 + $as_echo_n "checking for --enable-version-specific-runtime-libs... " >&6; } + # Check whether --enable-version-specific-runtime-libs was given. +@@ -3078,44 +3116,7 @@ - int32_t -@@ -417,7 +420,7 @@ - int32_t - omp_get_team_size_8_ (const int64_t *level) - { -- return omp_get_team_size (*level); -+ return omp_get_team_size (TO_INT (*level)); - } - int32_t -Index: libgomp/ChangeLog -=================================================================== ---- libgomp/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libgomp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,15 @@ -+2011-05-06 Jakub Jelinek -+ -+ PR fortran/48894 -+ * fortran.c: Include limits.h. -+ (TO_INT): Define. -+ (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of -+ *set. -+ (omp_set_num_threads_8_, omp_set_schedule_8_, -+ omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_, -+ omp_get_team_size_8_): Use TO_INT macro. -+ * testsuite/libgomp.fortran/pr48894.f90: New test. -+ - 2011-04-28 Release Manager - - * GCC 4.5.3 released. -Index: libgomp/testsuite/libgomp.fortran/pr48894.f90 -=================================================================== ---- libgomp/testsuite/libgomp.fortran/pr48894.f90 (.../tags/gcc_4_5_3_release) (wersja 0) -+++ libgomp/testsuite/libgomp.fortran/pr48894.f90 (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,23 @@ -+! PR fortran/48894 -+! { dg-do run } -+! { dg-options "-fdefault-integer-8" } -+ -+ use omp_lib -+ integer, parameter :: zero = 0 -+ integer :: err -+ logical :: l -+ err = 0 -+ !$omp parallel -+ !$omp parallel private (l) -+ l = omp_get_ancestor_thread_num (-HUGE (zero)) .ne. -1 -+ l = l .or. (omp_get_ancestor_thread_num (HUGE (zero)) .ne. -1) -+ l = l .or. (omp_get_team_size (-HUGE (zero)) .ne. -1) -+ l = l .or. (omp_get_team_size (HUGE (zero)) .ne. -1) -+ if (l) then -+ !$omp atomic -+ err = err + 1 -+ endif -+ !$omp end parallel -+ !$omp end parallel -+ if (err .ne. 0) call abort -+end -Index: gcc/fwprop.c -=================================================================== ---- gcc/fwprop.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/fwprop.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -228,8 +228,11 @@ - process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP); - process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP); -- df_simulate_initialize_forwards (bb, local_lr); +-# Default to --enable-multilib +-# Check whether --enable-multilib was given. +-if test "${enable_multilib+set}" = set; then : +- enableval=$enable_multilib; case "$enableval" in +- yes) multilib=yes ;; +- no) multilib=no ;; +- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; +- esac +-else +- multilib=yes +-fi -+ /* We don't call df_simulate_initialize_forwards, as it may overestimate -+ the live registers if there are unused artificial defs. We prefer -+ liveness to be underestimated. */ +- +-# We may get other options which we leave undocumented: +-# --with-target-subdir, --with-multisrctop, --with-multisubdir +-# See config-ml.in if you want the gory details. +- +-if test "$srcdir" = "."; then +- if test "$with_target_subdir" != "."; then +- multi_basedir="$srcdir/$with_multisrctop../.." +- else +- multi_basedir="$srcdir/$with_multisrctop.." +- fi +-else +- multi_basedir="$srcdir/.." +-fi +- +- +-# Even if the default multilib is not a cross compilation, +-# it may be that some of the other multilibs are. +-if test $cross_compiling = no && test $multilib = yes \ +- && test "x${with_multisubdir}" != x ; then +- cross_compiling=maybe +-fi +- +-ac_config_commands="$ac_config_commands default-1" +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 + $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +@@ -11117,7 +11118,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11120 "configure" ++#line 11121 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11223,7 +11224,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11226 "configure" ++#line 11227 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +Index: libsanitizer/ChangeLog +=================================================================== +--- libsanitizer/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libsanitizer/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,8 @@ ++2015-01-27 Matthias Klose + - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. ++ + 2014-12-19 Release Manager + + * GCC 4.8.4 released. +Index: libsanitizer/configure.ac +=================================================================== +--- libsanitizer/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libsanitizer/configure.ac (.../branches/gcc-4_8-branch) (revision 220382) +@@ -5,6 +5,8 @@ + AC_INIT(package-unused, version-unused, libsanitizer) + AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h]) + ++AM_ENABLE_MULTILIB(, ..) ++ + AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) + AC_ARG_ENABLE(version-specific-runtime-libs, + [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], +@@ -24,7 +26,6 @@ + GCC_LIBSTDCXX_RAW_CXX_FLAGS + + AM_INIT_AUTOMAKE(foreign no-dist) +-AM_ENABLE_MULTILIB(, ..) + AM_MAINTAINER_MODE + + # Calculate toolexeclibdir +Index: libstdc++-v3/include/std/future +=================================================================== +--- libstdc++-v3/include/std/future (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1417,7 +1417,8 @@ + operator()(_ArgTypes... __args) { -Index: gcc/DATESTAMP + __future_base::_State_base::_S_check(_M_state); +- _M_state->_M_run(std::forward<_ArgTypes>(__args)...); ++ auto __state = _M_state; ++ __state->_M_run(std::forward<_ArgTypes>(__args)...); + } + + void +Index: libstdc++-v3/ChangeLog =================================================================== ---- gcc/DATESTAMP (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/DATESTAMP (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1 +1 @@ --20110428 -+20110515 -Index: gcc/tree-tailcall.c -=================================================================== ---- gcc/tree-tailcall.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-tailcall.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1007,6 +1007,14 @@ - integer_one_node); - } - -+ if (a_acc || m_acc) -+ { -+ /* When the tail call elimination using accumulators is performed, -+ statements adding the accumulated value are inserted at all exits. -+ This turns all other tail calls to non-tail ones. */ -+ opt_tailcalls = false; -+ } +--- libstdc++-v3/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,9 @@ ++2015-01-09 Jonathan Wakely + - for (; tailcalls; tailcalls = next) - { - next = tailcalls->next; -Index: gcc/final.c ++ PR libstdc++/60966 ++ * include/std/future (packaged_task::operator()): Increment the ++ reference count on the shared state until the function returns. ++ + 2014-12-19 Release Manager + + * GCC 4.8.4 released. +Index: libatomic/fop_n.c =================================================================== ---- gcc/final.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/final.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2241,6 +2241,11 @@ - location_t loc; - expanded_location expanded; +--- libatomic/fop_n.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libatomic/fop_n.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -112,9 +112,9 @@ + + pre_barrier (smodel); + +- wptr = (UWORD *)mptr; +- shift = 0; +- mask = -1; ++ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE); ++ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK); ++ mask = SIZE(MASK) << shift; + + wopval = (UWORD)opval << shift; + woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED); +@@ -136,9 +136,9 @@ + + pre_barrier (smodel); + +- wptr = (UWORD *)mptr; +- shift = 0; +- mask = -1; ++ wptr = (UWORD *)((uintptr_t)mptr & -WORDSIZE); ++ shift = (((uintptr_t)mptr % WORDSIZE) * CHAR_BIT) ^ SIZE(INVERT_MASK); ++ mask = SIZE(MASK) << shift; + + wopval = (UWORD)opval << shift; + woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED); +Index: libatomic/ChangeLog +=================================================================== +--- libatomic/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libatomic/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,8 @@ ++2015-01-21 Andrew Waterman ++ ++ * fop_n.c (libat_fetch_op): Align address to word boundary. ++ (libat_op_fetch): Likewise. ++ + 2014-12-19 Release Manager -+ /* Make sure we flush any queued register saves in case this -+ clobbers affected registers. */ -+ if (dwarf2out_do_frame ()) -+ dwarf2out_frame_debug (insn, false); + * GCC 4.8.4 released. +Index: libbacktrace/configure +=================================================================== +--- libbacktrace/configure (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libbacktrace/configure (.../branches/gcc-4_8-branch) (revision 220382) +@@ -614,7 +614,6 @@ + WARN_FLAGS + EXTRA_FLAGS + BACKTRACE_FILE +-multi_basedir + OTOOL64 + OTOOL + LIPO +@@ -680,6 +679,7 @@ + build_vendor + build_cpu + build ++multi_basedir + target_alias + host_alias + build_alias +@@ -721,6 +721,7 @@ + ac_subst_files='' + ac_user_opts=' + enable_option_checking ++enable_multilib + enable_maintainer_mode + with_target_subdir + enable_shared +@@ -729,7 +730,6 @@ + enable_fast_install + with_gnu_ld + enable_libtool_lock +-enable_multilib + with_system_libunwind + ' + ac_precious_vars='build_alias +@@ -1361,6 +1361,7 @@ + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --enable-multilib build many library versions (default) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-shared[=PKGS] build shared libraries [default=no] +@@ -1368,7 +1369,6 @@ + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) +- --enable-multilib build many library versions (default) + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2451,6 +2451,46 @@ + ac_config_headers="$ac_config_headers config.h" + + ++if test -n "${with_target_subdir}"; then ++ # Default to --enable-multilib ++# Check whether --enable-multilib was given. ++if test "${enable_multilib+set}" = set; then : ++ enableval=$enable_multilib; case "$enableval" in ++ yes) multilib=yes ;; ++ no) multilib=no ;; ++ *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; ++ esac ++else ++ multilib=yes ++fi ++ ++ ++# We may get other options which we leave undocumented: ++# --with-target-subdir, --with-multisrctop, --with-multisubdir ++# See config-ml.in if you want the gory details. ++ ++if test "$srcdir" = "."; then ++ if test "$with_target_subdir" != "."; then ++ multi_basedir="$srcdir/$with_multisrctop../.." ++ else ++ multi_basedir="$srcdir/$with_multisrctop.." ++ fi ++else ++ multi_basedir="$srcdir/.." ++fi ++ ++ ++# Even if the default multilib is not a cross compilation, ++# it may be that some of the other multilibs are. ++if test $cross_compiling = no && test $multilib = yes \ ++ && test "x${with_multisubdir}" != x ; then ++ cross_compiling=maybe ++fi ++ ++ac_config_commands="$ac_config_commands default-1" ++ ++fi ++ + ac_aux_dir= + for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do +@@ -11087,7 +11127,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11090 "configure" ++#line 11130 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11193,7 +11233,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11196 "configure" ++#line 11236 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11437,43 +11477,6 @@ + if test -n "${with_target_subdir}"; then + # We are compiling a GCC library. We can assume that the unwind + # library exists. +- # Default to --enable-multilib +-# Check whether --enable-multilib was given. +-if test "${enable_multilib+set}" = set; then : +- enableval=$enable_multilib; case "$enableval" in +- yes) multilib=yes ;; +- no) multilib=no ;; +- *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; +- esac +-else +- multilib=yes +-fi +- +- +-# We may get other options which we leave undocumented: +-# --with-target-subdir, --with-multisrctop, --with-multisubdir +-# See config-ml.in if you want the gory details. +- +-if test "$srcdir" = "."; then +- if test "$with_target_subdir" != "."; then +- multi_basedir="$srcdir/$with_multisrctop../.." +- else +- multi_basedir="$srcdir/$with_multisrctop.." +- fi +-else +- multi_basedir="$srcdir/.." +-fi +- +- +-# Even if the default multilib is not a cross compilation, +-# it may be that some of the other multilibs are. +-if test $cross_compiling = no && test $multilib = yes \ +- && test "x${with_multisubdir}" != x ; then +- cross_compiling=maybe +-fi +- +-ac_config_commands="$ac_config_commands default-1" +- + BACKTRACE_FILE="backtrace.lo simple.lo" + else + ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default" +@@ -13128,7 +13131,21 @@ + # INIT-COMMANDS + # + ++srcdir="$srcdir" ++host="$host" ++target="$target" ++with_multisubdir="$with_multisubdir" ++with_multisrctop="$with_multisrctop" ++with_target_subdir="$with_target_subdir" ++ac_configure_args="${multilib_arg} ${ac_configure_args}" ++multi_basedir="$multi_basedir" ++CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ++CC="$CC" ++CXX="$CXX" ++GFORTRAN="$GFORTRAN" ++GCJ="$GCJ" + ++ + # The HP-UX ksh and POSIX shell print the target directory to stdout + # if CDPATH is set. + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +@@ -13388,20 +13405,6 @@ + + + +-srcdir="$srcdir" +-host="$host" +-target="$target" +-with_multisubdir="$with_multisubdir" +-with_multisrctop="$with_multisrctop" +-with_target_subdir="$with_target_subdir" +-ac_configure_args="${multilib_arg} ${ac_configure_args}" +-multi_basedir="$multi_basedir" +-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} +-CC="$CC" +-CXX="$CXX" +-GFORTRAN="$GFORTRAN" +-GCJ="$GCJ" +- + GCC="$GCC" + CC="$CC" + acx_cv_header_stdint="$acx_cv_header_stdint" +@@ -13434,8 +13437,8 @@ + do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; +- "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES backtrace-supported.h" ;; +@@ -14024,6 +14027,14 @@ + + + case $ac_file$ac_mode in ++ "default-1":C) ++# Only add multilib support code if we just rebuilt the top-level ++# Makefile. ++case " $CONFIG_FILES " in ++ *" Makefile "*) ++ ac_file=Makefile . ${multi_basedir}/config-ml.in ++ ;; ++esac ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our +@@ -14663,14 +14674,6 @@ + chmod +x "$ofile" + + ;; +- "default-1":C) +-# Only add multilib support code if we just rebuilt the top-level +-# Makefile. +-case " $CONFIG_FILES " in +- *" Makefile "*) +- ac_file=Makefile . ${multi_basedir}/config-ml.in +- ;; +-esac ;; + "gstdint.h":C) + if test "$GCC" = yes; then + echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h +Index: libbacktrace/ChangeLog +=================================================================== +--- libbacktrace/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libbacktrace/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,8 @@ ++2015-01-26 Matthias Klose + - /* There's no telling what that did to the condition codes. */ - CC_STATUS_INIT; ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. ++ + 2014-12-19 Release Manager -Index: gcc/fold-const.c + * GCC 4.8.4 released. +Index: libbacktrace/configure.ac +=================================================================== +--- libbacktrace/configure.ac (.../tags/gcc_4_8_4_release) (revision 220382) ++++ libbacktrace/configure.ac (.../branches/gcc-4_8-branch) (revision 220382) +@@ -34,6 +34,10 @@ + AC_CONFIG_SRCDIR(backtrace.h) + AC_CONFIG_HEADER(config.h) + ++if test -n "${with_target_subdir}"; then ++ AM_ENABLE_MULTILIB(, ..) ++fi ++ + AC_CANONICAL_SYSTEM + target_alias=${target_alias-$host_alias} + +@@ -83,7 +87,6 @@ + if test -n "${with_target_subdir}"; then + # We are compiling a GCC library. We can assume that the unwind + # library exists. +- AM_ENABLE_MULTILIB(, ..) + BACKTRACE_FILE="backtrace.lo simple.lo" + else + AC_CHECK_HEADER([unwind.h], +Index: gcc/tree-vrp.c =================================================================== ---- gcc/fold-const.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/fold-const.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2784,8 +2784,6 @@ +--- gcc/tree-vrp.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/tree-vrp.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -6811,7 +6811,7 @@ + tree type = TREE_TYPE (op0); + value_range_t *vr0 = get_value_range (op0); + +- if (vr0->type != VR_VARYING ++ if (vr0->type == VR_RANGE + && INTEGRAL_TYPE_P (type) + && vrp_val_is_min (vr0->min) + && vrp_val_is_max (vr0->max) +Index: gcc/c-family/ChangeLog +=================================================================== +--- gcc/c-family/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/c-family/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,12 @@ ++2015-01-20 Marek Polacek ++ ++ Backport from mainline ++ 2014-06-23 Marek Polacek ++ ++ PR c/61553 ++ * c-common.c (get_atomic_generic_size): Don't segfault if the ++ type doesn't have a size. ++ + 2014-12-19 Release Manager - case VOID_TYPE: - tem = fold_ignored_result (arg); -- if (TREE_CODE (tem) == MODIFY_EXPR) -- goto fold_convert_exit; - return fold_build1_loc (loc, NOP_EXPR, type, tem); + * GCC 4.8.4 released. +Index: gcc/c-family/c-common.c +=================================================================== +--- gcc/c-family/c-common.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/c-family/c-common.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -10143,7 +10143,8 @@ + function); + return 0; + } +- size = tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (type)), 1); ++ tree type_size = TYPE_SIZE_UNIT (TREE_TYPE (type)); ++ size = type_size ? tree_low_cst (type_size, 1) : 0; + if (size != size_0) + { + error_at (loc, "size mismatch in argument %d of %qE", x + 1, +Index: gcc/c/c-typeck.c +=================================================================== +--- gcc/c/c-typeck.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/c/c-typeck.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -5788,7 +5788,8 @@ + warning (OPT_Wtraditional, "traditional C rejects automatic " + "aggregate initialization"); + +- DECL_INITIAL (decl) = value; ++ if (value != error_mark_node || TREE_CODE (decl) != FUNCTION_DECL) ++ DECL_INITIAL (decl) = value; + + /* ANSI wants warnings about out-of-range constant initializers. */ + STRIP_TYPE_NOPS (value); +Index: gcc/c/ChangeLog +=================================================================== +--- gcc/c/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/c/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,12 @@ ++2015-02-01 Jakub Jelinek ++ ++ Backported from mainline ++ 2015-01-27 Jakub Jelinek ++ ++ PR c/64766 ++ * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL ++ of FUNCTION_DECLs with error_mark_node. ++ + 2014-12-19 Release Manager - default: + * GCC 4.8.4 released. +Index: gcc/DATESTAMP +=================================================================== +--- gcc/DATESTAMP (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/DATESTAMP (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1 +1 @@ +-20141219 ++20150203 +Index: gcc/rtlanal.c +=================================================================== +--- gcc/rtlanal.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/rtlanal.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -873,6 +873,17 @@ + int + reg_set_p (const_rtx reg, const_rtx insn) + { ++ /* After delay slot handling, call and branch insns might be in a ++ sequence. Check all the elements there. */ ++ if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) ++ { ++ for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i) ++ if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i))) ++ return true; ++ ++ return false; ++ } ++ + /* We can be passed an insn or part of one. If we are passed an insn, + check if a side-effect of the insn clobbers REG. */ + if (INSN_P (insn) +@@ -884,7 +895,7 @@ + GET_MODE (reg), REGNO (reg))) + || MEM_P (reg) + || find_reg_fusage (insn, CLOBBER, reg))))) +- return 1; ++ return true; + + return set_of (reg, insn) != NULL_RTX; + } Index: gcc/DEV-PHASE =================================================================== ---- gcc/DEV-PHASE (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/DEV-PHASE (.../branches/gcc-4_5-branch) (wersja 173771) +--- gcc/DEV-PHASE (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/DEV-PHASE (.../branches/gcc-4_8-branch) (revision 220382) @@ -0,0 +1 @@ +prerelease Index: gcc/ChangeLog =================================================================== ---- gcc/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,177 @@ -+2011-05-11 Michael Meissner -+ -+ Backport from mainline -+ 2011-05-10 Michael Meissner -+ -+ PR target/48857, 48495 -+ * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete. -+ (VSX_MODE): Ditto. -+ (VSX_MOVE_MODE): Ditto. -+ (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and -+ VSX vector types. Add V2DImode. -+ (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of -+ ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls. -+ (MODES_TIEABLE_P): Ditto. -+ -+ * config/rs6000/rs6000.c (rs6000_emit_move): Use -+ ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and -+ VSX_VECTOR_MODE. -+ (init_cumulative_args): Ditto. -+ (rs6000_function_arg_boundary): Ditto. -+ (rs6000_function_arg_advance_1): Ditto. -+ (rs6000_function_arg): Ditto. -+ (rs6000_function_ok_for_sibcall): Ditto. -+ (emit_frame_save): Ditto. -+ (rs6000_function_value): Ditto. -+ (rs6000_libcall_value): Ditto. -+ -+2011-05-10 Jakub Jelinek +--- gcc/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,137 @@ ++2015-02-01 Jakub Jelinek + + Backported from mainline -+ 2011-05-07 Zdenek Dvorak -+ -+ PR tree-optimization/48837 -+ * tree-tailcall.c (tree_optimize_tail_calls_1): Do not mark tailcalls -+ when accumulator transformation is performed. ++ 2015-01-27 Jakub Jelinek + -+2011-05-09 Eric Botcazou ++ PR rtl-optimization/61058 ++ * jump.c (cleanup_barriers): Update basic block boundaries ++ if BLOCK_FOR_INSN is non-NULL on PREV. + -+ * var-tracking.c (find_mem_expr_in_1pdv): Fix thinko. -+ (dataflow_set_preserve_mem_locs): Likewise. ++ 2013-04-16 Steven Bosscher + -+2011-05-07 Alan Modra ++ PR middle-end/43631 ++ * jump.c (cleanup_barriers): Use reorder_insns_nobb to avoid making ++ the moved barrier the tail of the basic block it follows. + -+ PR target/48900 -+ * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use -+ const0_rtx as the arg to the dummy __tls_get_addr libcall. ++ 2015-01-26 Jakub Jelinek + -+2011-05-05 Jason Merrill ++ * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add ++ OPTION_MASK_QUAD_MEMORY_ATOMIC. + -+ PR c++/40975 -+ * tree-inline.c (copy_tree_r): Handle STATEMENT_LIST. ++ 2015-01-12 Jakub Jelinek + -+2011-05-05 Julian Brown ++ PR tree-optimization/64563 ++ * tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE ++ instead of != VR_VARYING. + -+ * config/arm/neon.md (vec_set_internal): Fix misplaced -+ parenthesis in D-register case. ++ PR target/64513 ++ * config/i386/i386.c (ix86_expand_prologue): Add ++ REG_FRAME_RELATED_EXPR to %rax and %r10 pushes. + -+2011-05-05 Ira Rosen ++2015-01-29 Ilya Tocar + -+ Backport from mainline: -+ 2011-04-18 Ulrich Weigand -+ Ira Rosen -+ -+ PR target/48252 -+ * config/arm/arm.c (neon_emit_pair_result_insn): Swap arguments -+ to match neon_vzip/vuzp/vtrn_internal. -+ * config/arm/neon.md (neon_vtrn_internal): Make both -+ outputs explicitly dependent on both inputs. -+ (neon_vzip_internal, neon_vuzp_internal): Likewise. ++ * config/i386/avx2intrin.h (_mm256_bslli_epi128, ++ _mm256_bsrli_epi128): New. ++ * config/i386/emmintrin.h (_mm_bsrli_si128, _mm_bslli_si128): Ditto. + -+2011-05-04 Uros Bizjak ++2015-01-27 Mikael Pettersson + + Backport from mainline -+ 2011-04-21 Uros Bizjak + -+ PR target/48708 -+ * config/i386/i386.c (ix86_expand_vector_set) : Generate -+ vec_extract and vec_concat for non-SSE4_1 targets. ++ 2013-09-20 Bernd Edlinger + -+2011-05-04 Uros Bizjak ++ PR middle-end/57748 ++ * expr.c (expand_assignment): Remove misalignp code path. + -+ * config/i386/i386.md (*movdi_internal_rex64) : -+ Use %v prefix in insn mnemonic to handle TARGET_AVX. -+ (*movdi_internal): Use "maybe_vex" instead of "vex" in "prefix" -+ attribute calculation. -+ (*movdf_internal): Output AVX mnemonics. Add "prefix" attribute. -+ * config/i386/sse.md (*sse2_storeq_rex64): Do not emit %v prefix -+ for mov{q} mnemonic. -+ (*vec_extractv2di_1_rex64_avx): Ditto. -+ (*vec_concatv2di_rex64_sse4_1): Use %vmovd for reg<->xmm moves. -+ (*vec_concatv2di_rex64_sse): Use movd for reg<->xmm moves. -+ * config/i386/mmx.md (*mov_internal_rex64): Ditto. ++ 2014-01-08 Bernd Edlinger + -+2011-05-03 Uros Bizjak -+ Jakub Jelinek ++ PR middle-end/57748 ++ * expr.h (expand_expr_real, expand_expr_real_1): Add new parameter ++ inner_reference_p. ++ (expand_expr, expand_normal): Adjust. ++ * expr.c (expand_expr_real, expand_expr_real_1): Add new parameter ++ inner_reference_p. Use inner_reference_p to expand inner references. ++ (store_expr): Adjust. ++ * cfgexpand.c (expand_call_stmt): Adjust. + -+ PR target/48774 -+ * config/i386/i386.c (ix86_match_ccmode): For CC{A,C,O,S}mode -+ only succeed if req_mode is the same as set_mode. ++2015-01-26 Uros Bizjak ++ ++ Backport from mainline ++ 2015-01-26 Uros Bizjak + -+2011-05-03 Jakub Jelinek ++ PR target/64795 ++ * config/i386/i386.md (*movdi_internal): Also check operand 0 ++ to determine TYPE_LEA operand. ++ (*movsi_internal): Ditto. + + Backport from mainline -+ 2011-04-30 Jakub Jelinek ++ 2015-01-23 Uros Bizjak + -+ PR tree-optimization/48809 -+ * tree-switch-conversion.c (build_arrays): Compute tidx in unsigned -+ type. -+ (gen_inbound_check): Don't compute index_expr - range_min in utype -+ again, instead reuse SSA_NAME initialized in build_arrays. -+ Remove two useless gsi_for_stmt calls. ++ * config/i386/sse.md (sse2_loadld): Set attribute isa to sse2 for ++ alternative 1. + -+ 2011-04-28 Jakub Jelinek ++2015-01-15 Martin Liska + -+ PR middle-end/48597 -+ * final.c (final_scan_insn): Call dwarf2out_frame_debug even for -+ inline asm. ++ Backport from mainline ++ 2014-11-27 Richard Biener + -+ 2011-04-27 Jakub Jelinek ++ PR middle-end/63704 ++ * alias.c (mems_in_disjoint_alias_sets_p): Remove assert ++ and instead return false when !fstrict-aliasing. + -+ PR c/48742 -+ * c-typeck.c (build_binary_op): Don't wrap arguments if -+ int_operands is true. ++2015-01-14 Renlin Li + -+ 2011-04-23 Jakub Jelinek ++ Backport form mainline ++ 2014-08-12 Ramana Radhakrishnan + -+ PR c/48685 -+ * fold-const.c (fold_convert_loc): Add NOP_EXPR when casting -+ to VOID_TYPE even around MODIFY_EXPR. ++ PR target/61413 ++ * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition ++ of __ARM_SIZEOF_WCHAR_T. + -+2011-05-02 Ulrich Weigand ++2015-01-13 Pat Haugen + -+ PR middle-end/43085 -+ Backport from mainline: ++ Backport from mainline ++ 2014-12-20 Segher Boessenkool + -+ 2010-04-29 Bernd Schmidt ++ PR target/64358 ++ * config/rs6000/rs6000.c (rs6000_split_logical_inner): Swap the ++ input operands if only the second is inverted. ++ * config/rs6000/rs6000.md (*boolc3_internal1 for BOOL_128): ++ Swap BOOL_REGS_OP1 and BOOL_REGS_OP2. Correct arguments to ++ rs6000_split_logical. ++ (*boolc3_internal2 for TI2): Swap operands[1] and operands[2]. + -+ From Dominique d'Humieres -+ PR bootstrap/43858 -+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs to compute -+ test_set. ++2015-01-13 Oleg Endo + -+ 2010-04-26 Bernd Schmidt ++ Backport form mainline ++ 2015-01-13 Oleg Endo + -+ * df-problems.c (df_simulate_initialize_forwards): Set, don't clear, -+ bits for artificial defs at the top of the block. -+ * fwprop.c (single_def_use_enter_block): Don't call it. ++ PR target/64479 ++ * rtlanal.c (set_reg_p): Handle SEQUENCE constructs. + -+ 2010-04-22 Bernd Schmidt ++2014-12-27 H.J. Lu + -+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and -+ df_simulate_find_noclobber_defs as appropriate. Keep track of an -+ extra set merge_set_noclobber, and use it to relax the final test -+ slightly. -+ * df.h (df_simulate_find_noclobber_defs): Declare. -+ * df-problems.c (df_simulate_find_defs): Don't ignore partial or -+ conditional defs. -+ (df_simulate_find_noclobber_defs): New function. ++ Backport from mainline: ++ 2014-12-27 H.J. Lu + -+2011-04-29 John David Anglin ++ PR target/64409 ++ * config/i386/i386.c (ix86_function_type_abi): Issue an error ++ when ms_abi attribute is used with x32. + -+ PR target/48288 -+ * config/pa/predicates.md (ior_operand): Delete predicate. -+ (cint_ior_operand, reg_or_cint_ior_operand): New predicates. -+ * config/pa/pa.md (iordi3): Use reg_or_cint_ior_operand predicate in -+ expander. Use cint_ior_operand in unnamed insn. -+ (iorsi3): Likewise. -+ * config/pa/pa-protos.h (ior_operand): Delete declarations. ++2014-12-19 H.J. Lu + -+2011-04-28 Richard Guenther ++ Backported from mainline ++ 2014-12-14 H.J. Lu + -+ * DEV-PHASE: Set back to prerelease. -+ * BASE-VER: Bump to 4.5.4. ++ PR rtl-optimization/64037 ++ * combine.c (setup_incoming_promotions): Pass the argument ++ before any promotions happen to promote_function_mode. + - 2011-04-28 Release Manager - - * GCC 4.5.3 released. -Index: gcc/testsuite/gcc.c-torture/execute/pr48809.c -=================================================================== ---- gcc/testsuite/gcc.c-torture/execute/pr48809.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.c-torture/execute/pr48809.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,60 @@ -+/* PR tree-optimization/48809 */ ++2014-12-19 Jakub Jelinek + -+extern void abort (void); ++ * BASE-VER: Set to 4.8.5. ++ * DEV-PHASE: Set to prerelease. + -+int -+foo (signed char x) -+{ -+ int y = 0; -+ switch (x) -+ { -+ case 0: y = 1; break; -+ case 1: y = 7; break; -+ case 2: y = 2; break; -+ case 3: y = 19; break; -+ case 4: y = 5; break; -+ case 5: y = 17; break; -+ case 6: y = 31; break; -+ case 7: y = 8; break; -+ case 8: y = 28; break; -+ case 9: y = 16; break; -+ case 10: y = 31; break; -+ case 11: y = 12; break; -+ case 12: y = 15; break; -+ case 13: y = 111; break; -+ case 14: y = 17; break; -+ case 15: y = 10; break; -+ case 16: y = 31; break; -+ case 17: y = 7; break; -+ case 18: y = 2; break; -+ case 19: y = 19; break; -+ case 20: y = 5; break; -+ case 21: y = 107; break; -+ case 22: y = 31; break; -+ case 23: y = 8; break; -+ case 24: y = 28; break; -+ case 25: y = 106; break; -+ case 26: y = 31; break; -+ case 27: y = 102; break; -+ case 28: y = 105; break; -+ case 29: y = 111; break; -+ case 30: y = 17; break; -+ case 31: y = 10; break; -+ case 32: y = 31; break; -+ case 98: y = 18; break; -+ case -62: y = 19; break; -+ } -+ return y; -+} + 2014-12-19 Release Manager + + * GCC 4.8.4 released. +@@ -382,7 +516,7 @@ + * config/pa/pa.md (trap): New insn. Add "trap" to attribute type. + Don't allow trap insn in in_branch_delay, in_nullified_branch_delay + or in_call_delay. +- + -+int -+main () -+{ -+ if (foo (98) != 18 || foo (97) != 0 || foo (99) != 0) -+ abort (); -+ if (foo (-62) != 19 || foo (-63) != 0 || foo (-61) != 0) -+ abort (); -+ if (foo (28) != 105 || foo (27) != 102 || foo (29) != 111) -+ abort (); -+ return 0; -+} -Index: gcc/testsuite/gcc.c-torture/compile/pr48742.c + 2014-11-06 Kyrylo Tkachov + + * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define. +Index: gcc/testsuite/gcc.target/i386/pr64409.c =================================================================== ---- gcc/testsuite/gcc.c-torture/compile/pr48742.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.c-torture/compile/pr48742.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ -+/* PR c/48742 */ +--- gcc/testsuite/gcc.target/i386/pr64409.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gcc.target/i386/pr64409.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,6 @@ ++/* { dg-do compile { target { ! { ia32 } } } } */ ++/* { dg-require-effective-target maybe_x32 } */ ++/* { dg-options "-O0 -mx32" } */ ++ ++int a; ++int* __attribute__ ((ms_abi)) fn1 () { return &a; } /* { dg-error "X32 does not support ms_abi attribute" } */ +Index: gcc/testsuite/gcc.target/i386/sse-14.c +=================================================================== +--- gcc/testsuite/gcc.target/i386/sse-14.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/testsuite/gcc.target/i386/sse-14.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -150,6 +150,8 @@ + + /* emmintrin.h */ + test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1) ++test_1 (_mm_bsrli_si128, __m128i, __m128i, 1) ++test_1 (_mm_bslli_si128, __m128i, __m128i, 1) + test_1 (_mm_srli_si128, __m128i, __m128i, 1) + test_1 (_mm_slli_si128, __m128i, __m128i, 1) + test_1 (_mm_extract_epi16, int, __m128i, 1) +Index: gcc/testsuite/gcc.target/i386/pr57003.c +=================================================================== +--- gcc/testsuite/gcc.target/i386/pr57003.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/testsuite/gcc.target/i386/pr57003.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,5 +1,5 @@ + /* PR rtl-optimization/57003 */ +-/* { dg-do run } */ ++/* { dg-do run { target { ! x32 } } } */ + /* { dg-options "-O2 -maccumulate-outgoing-args" } */ + + #define N 2001 +Index: gcc/testsuite/gcc.target/i386/sse-22.c +=================================================================== +--- gcc/testsuite/gcc.target/i386/sse-22.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/testsuite/gcc.target/i386/sse-22.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -88,6 +88,8 @@ + #endif + #include + test_2 (_mm_shuffle_pd, __m128d, __m128d, __m128d, 1) ++test_1 (_mm_bsrli_si128, __m128i, __m128i, 1) ++test_1 (_mm_bslli_si128, __m128i, __m128i, 1) + test_1 (_mm_srli_si128, __m128i, __m128i, 1) + test_1 (_mm_slli_si128, __m128i, __m128i, 1) + test_1 (_mm_extract_epi16, int, __m128i, 1) +@@ -219,6 +221,8 @@ + test_1 ( _mm256_shuffle_epi32, __m256i, __m256i, 1) + test_1 ( _mm256_shufflehi_epi16, __m256i, __m256i, 1) + test_1 ( _mm256_shufflelo_epi16, __m256i, __m256i, 1) ++test_1 ( _mm256_bslli_epi128, __m256i, __m256i, 8) ++test_1 ( _mm256_bsrli_epi128, __m256i, __m256i, 8) + test_1 ( _mm256_slli_si256, __m256i, __m256i, 8) + test_1 ( _mm256_srli_si256, __m256i, __m256i, 8) + test_2 ( _mm_blend_epi32, __m128i, __m128i, __m128i, 1) +Index: gcc/testsuite/gcc.target/i386/pr60516.c +=================================================================== +--- gcc/testsuite/gcc.target/i386/pr60516.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/testsuite/gcc.target/i386/pr60516.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,5 +1,5 @@ + /* PR target/60516 */ +-/* { dg-do compile } */ ++/* { dg-do compile { target { ! x32 } } } */ + /* { dg-options "-O2" } */ + + struct S { char c[65536]; }; +Index: gcc/testsuite/gcc.target/i386/pr64513.c +=================================================================== +--- gcc/testsuite/gcc.target/i386/pr64513.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gcc.target/i386/pr64513.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,17 @@ ++/* PR target/64513 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mstack-arg-probe" } */ + -+void baz (int); ++struct A {}; ++struct B { struct A y; }; ++int foo (struct A); + +int -+foo (void) ++bar (int x) +{ -+ return 1 / 0 > 0; ++ struct B b; ++ int c; ++ while (x--) ++ c = foo (b.y); ++ return c; +} -+ -+void -+bar (void) -+{ -+ baz (1 <= 2 % (3 >> 1 > 5 / 6 == 3)); -+} -Index: gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c +Index: gcc/testsuite/gfortran.dg/pr64528.f90 =================================================================== ---- gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,21 @@ -+/* Test the `vset_lane_s8' ARM Neon intrinsic. */ +--- gcc/testsuite/gfortran.dg/pr64528.f90 (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gfortran.dg/pr64528.f90 (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,20 @@ ++! PR fortran/64528 ++! { dg-do compile } ++! { dg-options "-O -fno-tree-dce -fno-tree-ccp" } ++ ++program pr64528 ++ interface ++ subroutine foo(x) ++ integer, value :: x ++ end subroutine foo ++ end interface ++ integer :: x ++ x = 10 ++ call foo(x) ++ if(x .ne. 10) then ++ endif ++end program pr64528 ++subroutine foo(x) ++ integer, value :: x ++ x = 11 ++end subroutine foo +Index: gcc/testsuite/gfortran.dg/typebound_operator_20.f90 +=================================================================== +--- gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gfortran.dg/typebound_operator_20.f90 (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,53 @@ ++! { dg-do run } ++! ++! PR 63733: [4.8/4.9/5 Regression] [OOP] wrong resolution for OPERATOR generics ++! ++! Original test case from Alberto F. Martín Huertas ++! Slightly modified by Salvatore Filippone ++! Further modified by Janus Weil ++ ++module overwrite ++ type parent ++ contains ++ procedure :: sum => sum_parent ++ generic :: operator(+) => sum ++ end type ++ ++ type, extends(parent) :: child ++ contains ++ procedure :: sum => sum_child ++ end type ++ ++contains ++ ++ integer function sum_parent(op1,op2) ++ implicit none ++ class(parent), intent(in) :: op1, op2 ++ sum_parent = 0 ++ end function ++ ++ integer function sum_child(op1,op2) ++ implicit none ++ class(child) , intent(in) :: op1 ++ class(parent), intent(in) :: op2 ++ sum_child = 1 ++ end function ++ ++end module ++ ++program drive ++ use overwrite ++ implicit none ++ ++ type(parent) :: m1, m2 ++ class(parent), pointer :: mres ++ type(child) :: h1, h2 ++ class(parent), pointer :: hres ++ ++ if (m1 + m2 /= 0) call abort() ++ if (h1 + m2 /= 1) call abort() ++ if (h1%sum(h2) /= 1) call abort() + -+/* { dg-do run } */ -+/* { dg-require-effective-target arm_neon_hw } */ -+/* { dg-options "-O0" } */ -+/* { dg-add-options arm_neon } */ ++end + -+#include "arm_neon.h" -+#include -+#include ++! { dg-final { cleanup-modules "overwrite" } } +Index: gcc/testsuite/gfortran.dg/typebound_call_26.f90 +=================================================================== +--- gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gfortran.dg/typebound_call_26.f90 (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,30 @@ ++! { dg-do compile } ++! ++! PR 64244: [4.8/4.9/5 Regression] ICE at class.c:236 when using non_overridable ++! ++! Contributed by Ondřej Čertík + -+int8x8_t x = { 1, 2, 3, 4, 5, 6, 7, 8 }; -+int8x8_t y = { 1, 2, 3, 16, 5, 6, 7, 8 }; ++module m ++ implicit none + -+int main (void) -+{ -+ x = vset_lane_s8 (16, x, 3); -+ if (memcmp (&x, &y, sizeof (x)) != 0) -+ abort(); -+ return 0; -+} -Index: gcc/testsuite/gcc.target/arm/pr48252.c -=================================================================== ---- gcc/testsuite/gcc.target/arm/pr48252.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/arm/pr48252.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,31 @@ -+/* { dg-do run } */ -+/* { dg-require-effective-target arm_neon_hw } */ -+/* { dg-options "-O2" } */ -+/* { dg-add-options arm_neon } */ ++ type :: A ++ contains ++ generic :: f => g ++ procedure, non_overridable :: g ++ end type + -+#include "arm_neon.h" -+#include ++contains + -+int main(void) -+{ -+ uint8x8_t v1 = {1, 1, 1, 1, 1, 1, 1, 1}; -+ uint8x8_t v2 = {2, 2, 2, 2, 2, 2, 2, 2}; -+ uint8x8x2_t vd1, vd2; -+ union {uint8x8_t v; uint8_t buf[8];} d1, d2, d3, d4; -+ int i; ++ subroutine g(this) ++ class(A), intent(in) :: this ++ end subroutine + -+ vd1 = vzip_u8(v1, vdup_n_u8(0)); -+ vd2 = vzip_u8(v2, vdup_n_u8(0)); ++end module + -+ vst1_u8(d1.buf, vd1.val[0]); -+ vst1_u8(d2.buf, vd1.val[1]); -+ vst1_u8(d3.buf, vd2.val[0]); -+ vst1_u8(d4.buf, vd2.val[1]); + -+ for (i = 0; i < 8; i++) -+ if ((i % 2 == 0 && d4.buf[i] != 2) -+ || (i % 2 == 1 && d4.buf[i] != 0)) -+ abort (); ++program test_non_overridable ++ use m, only: A ++ implicit none ++ class(A), allocatable :: h ++ call h%f() ++end +Index: gcc/testsuite/gfortran.dg/dependency_45.f90 +=================================================================== +--- gcc/testsuite/gfortran.dg/dependency_45.f90 (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gfortran.dg/dependency_45.f90 (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,12 @@ ++! { dg-do run } ++! { dg-options "-Warray-temporaries" } ++! PR 56867 - substrings were not checked for dependency. ++program main ++ character(len=4) :: a ++ character(len=4) :: c(3) ++ c(1) = 'abcd' ++ c(2) = '1234' ++ c(3) = 'wxyz' ++ c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" } ++ if (c(3) .ne. '23yz') call abort ++end program main +Index: gcc/testsuite/gcc.dg/pr61058.c +=================================================================== +--- gcc/testsuite/gcc.dg/pr61058.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gcc.dg/pr61058.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,10 @@ ++/* PR rtl-optimization/61058 */ ++/* { dg-do compile } */ ++/* { dg-options "" } */ ++/* { dg-additional-options "-fno-asynchronous-unwind-tables -mtune=atom" { target i?86-*-* x86_64-*-* } } */ + -+ return 0; -+} -Index: gcc/testsuite/gcc.target/powerpc/pr48857.c -=================================================================== ---- gcc/testsuite/gcc.target/powerpc/pr48857.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/powerpc/pr48857.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,25 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_vsx_ok } */ -+/* { dg-options "-O2 -mcpu=power7 -mabi=altivec" } */ -+/* { dg-final { scan-assembler-times "lxvd2x" 1 } } */ -+/* { dg-final { scan-assembler-times "stxvd2x" 1 } } */ -+/* { dg-final { scan-assembler-not "ld" } } */ -+/* { dg-final { scan-assembler-not "lwz" } } */ -+/* { dg-final { scan-assembler-not "stw" } } */ -+/* { dg-final { scan-assembler-not "addi" } } */ -+ -+typedef vector long long v2di_type; -+ -+v2di_type -+return_v2di (v2di_type *ptr) ++void ++foo (void) +{ -+ return *ptr; /* should generate lxvd2x 34,0,3. */ ++ __builtin_unreachable (); +} +Index: gcc/testsuite/gcc.dg/pr64766.c +=================================================================== +--- gcc/testsuite/gcc.dg/pr64766.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gcc.dg/pr64766.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,9 @@ ++/* PR c/64766 */ ++/* { dg-do compile } */ + +void -+pass_v2di (v2di_type arg, v2di_type *ptr) ++foo () +{ -+ *ptr = arg; /* should generate stxvd2x 34,0,{3,5}. */ +} + -Index: gcc/testsuite/gcc.target/i386/pr48708.c ++void foo () = 0; /* { dg-error "is initialized like a variable|invalid initializer" } */ +Index: gcc/testsuite/gcc.dg/pr64563.c =================================================================== ---- gcc/testsuite/gcc.target/i386/pr48708.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/i386/pr48708.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ +--- gcc/testsuite/gcc.dg/pr64563.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/gcc.dg/pr64563.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,14 @@ ++/* PR tree-optimization/64563 */ +/* { dg-do compile } */ -+/* { dg-options "-O2 -msse2" } */ -+ -+#include ++/* { dg-options "-Os -Wtype-limits" } */ + -+typedef long long T __attribute__((may_alias)); -+struct S { __m128i d; }; ++int a, b, c, d, f; ++unsigned int e; + -+__m128i -+foo (long long *x, struct S *y, __m128i *z) -+{ -+ struct S s = *y; -+ ((T *) &s.d)[0] = *x; -+ return _mm_cmpeq_epi16 (s.d, *z); -+} -Index: gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,6 +1,6 @@ - /* { dg-do compile } */ - /* { dg-require-effective-target lp64 } */ --/* { dg-options "-O2 -msse4 -march=core2" } */ -+/* { dg-options "-O2 -msse4 -march=core2 -dp" } */ - - #include - -@@ -10,4 +10,4 @@ - return _mm_cvtsi64_si128 (b); - } - --/* { dg-final { scan-assembler "movq" } } */ -+/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64_sse4_1/3" 1 } } */ -Index: gcc/testsuite/gcc.dg/pr48774.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr48774.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48774.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,38 @@ -+/* PR target/48774 */ -+/* { dg-do run } */ -+/* { dg-options "-O2 -funroll-loops" } */ -+ -+extern void abort (void); -+unsigned long int s[24] -+ = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32, -+ 12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 }; -+struct { int n; unsigned long *e[12]; } g -+ = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14], -+ &s[16], &s[18], &s[20], &s[22] } }; -+int c[12]; -+ -+__attribute__((noinline, noclone)) void ++void +foo (void) +{ -+ int i, j; -+ for (i = 0; i < g.n; i++) -+ for (j = 0; j < g.n; j++) -+ { -+ if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j))) -+ abort (); -+ if (j < g.e[0][0] && (g.e[i][1] & (1UL << j))) -+ c[i]++; -+ } ++ d = b = (a != (e | 4294967288UL)); ++ if (!d) ++ c = f || b; +} -+ -+int -+main () -+{ -+ int i; -+ asm volatile ("" : "+m" (s), "+m" (g), "+m" (c)); -+ foo (); -+ for (i = 0; i < 12; i++) -+ if (c[i] != 11) -+ abort (); -+ return 0; -+} -Index: gcc/testsuite/gcc.dg/pr48837.c +Index: gcc/testsuite/ChangeLog =================================================================== ---- gcc/testsuite/gcc.dg/pr48837.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48837.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,30 @@ -+/* PR tree-optimization/48837 */ -+/* { dg-do run } */ -+/* { dg-options "-O2" } */ +--- gcc/testsuite/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,103 @@ ++2015-02-01 Jakub Jelinek + -+void abort (void); -+ -+__attribute__((noinline)) -+int baz(void) -+{ -+ return 1; -+} -+ -+inline const int *bar(const int *a, const int *b) -+{ -+ return *a ? a : b; -+} ++ Backported from mainline ++ 2015-01-27 Jakub Jelinek + -+int foo(int a, int b) -+{ -+ return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0); -+} ++ PR rtl-optimization/61058 ++ * gcc.dg/pr61058.c: New test. + -+int main(void) -+{ -+ if (foo(0, 0) != 2) -+ abort(); ++ PR c/64766 ++ * gcc.dg/pr64766.c: New test. + -+ return 0; -+} ++ 2015-01-13 Jakub Jelinek + -Index: gcc/testsuite/gcc.dg/pr48685.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr48685.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48685.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,11 @@ -+/* PR c/48685 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ ++ PR fortran/64528 ++ * gfortran.dg/pr64528.f90: New test. + -+int -+main () -+{ -+ int v = 1; -+ (void) (1 == 2 ? (void) 0 : (v = 0)); -+ return v; -+} -Index: gcc/testsuite/ChangeLog -=================================================================== ---- gcc/testsuite/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,82 @@ -+2011-05-11 Michael Meissner ++ 2015-01-12 Jakub Jelinek + -+ Backport from mainline -+ 2011-05-10 Michael Meissner ++ PR tree-optimization/64563 ++ * gcc.dg/pr64563.c: New test. + -+ PR target/48857 -+ * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments -+ are passed and returned in vector registers. ++ PR target/64513 ++ * gcc.target/i386/pr64513.c: New test. + -+2011-05-10 Jakub Jelinek ++2015-01-29 Ilya Tocar + -+ Backported from mainline -+ 2011-05-07 Zdenek Dvorak ++ * gcc.target/i386/sse-14.c: Test new intrinsic. ++ * gcc.target/i386/sse-22.c: Ditto. + -+ PR tree-optimization/48837 -+ * gcc.dg/pr48837.c: New testcase. ++2015-01-27 Mikael Pettersson + -+2011-05-09 Jason Merrill ++ Backport from mainline + -+ * g++.dg/template/nontype23.C: New. ++ 2013-09-20 Bernd Edlinger + -+2011-05-05 Jason Merrill ++ PR middle-end/57748 ++ * gcc.dg/torture/pr57748-1.c: New test. ++ * gcc.dg/torture/pr57748-2.c: New test. + -+ * g++.dg/init/new30.C: New. ++ 2014-01-08 Bernd Edlinger + -+2011-05-05 Julian Brown ++ PR middle-end/57748 ++ * gcc.dg/torture/pr57748-3.c: New test. ++ * gcc.dg/torture/pr57748-4.c: New test. + -+ * gcc.target/arm/neon-vset_lanes8.c: New test. ++2015-01-24 Thomas Koenig + -+2011-05-05 Ira Rosen ++ PR fortran/56867 ++ * gfortran.dg/dependency_45.f90: New test. + -+ Backport from mainline: -+ 2011-04-18 Ulrich Weigand -+ Ira Rosen ++2015-01-24 Thomas Koenig + -+ PR target/48252 -+ * gcc.target/arm/pr48252.c: New test. ++ Backport from trunk ++ PR fortran/57023 ++ * gfortran.dg/internal_pack_15.f90: New test. + -+2011-05-04 Uros Bizjak ++2015-01-20 Marek Polacek + + Backport from mainline -+ 2011-04-21 Uros Bizjak ++ 2014-06-23 Marek Polacek + -+ PR target/48708 -+ * gcc.target/i386/pr48708.c: New test. ++ PR c/61553 ++ * c-c++-common/pr61553.c: New test. + -+2011-05-04 Uros Bizjak ++2015-01-12 Janus Weil + + Backport from mainline -+ 2010-12-08 H.J. Lu ++ PR fortran/63733 ++ * gfortran.dg/typebound_operator_20.f90: New. + -+ * gcc.target/i386/sse2-init-v2di-2.c: Add "-dp" and update -+ expected scan. ++2014-12-28 H.J. Lu + -+2011-05-03 Jakub Jelinek ++ Backport from mainline: ++ 2014-12-28 H.J. Lu + -+ PR target/48774 -+ * gcc.dg/pr48774.c: New test. ++ * gcc.target/i386/pr57003.c: Skip on x32. ++ * gcc.target/i386/pr60516.c: Likewise. + -+ Backport from mainline -+ 2011-04-30 Jakub Jelinek ++2014-12-27 H.J. Lu + -+ PR tree-optimization/48809 -+ * gcc.c-torture/execute/pr48809.c: New test. ++ Backport from mainline: ++ 2014-12-26 H.J. Lu + -+ 2011-04-27 Jakub Jelinek ++ PR target/64409 ++ * gcc.target/i386/pr64409.c: New test. + -+ PR c/48742 -+ * gcc.c-torture/compile/pr48742.c: New test. ++2014-12-23 Janus Weil + -+ 2011-04-23 Jakub Jelinek ++ Backport from mainline ++ PR fortran/64244 ++ * gfortran.dg/typebound_call_26.f90: New. + -+ PR c/48685 -+ * gcc.dg/pr48685.c: New test. ++2014-12-19 H.J. Lu + -+2011-04-27 Jason Merrill ++ Backported from mainline ++ 2014-12-14 H.J. Lu + -+ * g++.dg/parse/ambig6.C: New. ++ PR rtl-optimization/64037 ++ * g++.dg/pr64037.C: New test. + - 2011-04-28 Release Manager + 2014-12-19 Release Manager - * GCC 4.5.3 released. -Index: gcc/testsuite/g++.dg/parse/ambig6.C + * GCC 4.8.4 released. +Index: gcc/testsuite/g++.dg/pr64037.C =================================================================== ---- gcc/testsuite/g++.dg/parse/ambig6.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/parse/ambig6.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,12 @@ -+// PR c++/48046 +--- gcc/testsuite/g++.dg/pr64037.C (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/g++.dg/pr64037.C (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,27 @@ ++// { dg-do run { target i?86-*-* x86_64-*-* } } ++// { dg-options "-std=c++11 -Os" } ++ ++enum class X : unsigned char { ++ V = 2, ++}; + -+namespace N1 { typedef int T; } // { dg-error "" } -+namespace N2 { typedef float T; } // { dg-error "" } ++static void ++__attribute__((noinline,noclone)) ++foo(unsigned &out, unsigned a, X b) ++{ ++ out = static_cast(b); ++} + +int main() +{ -+ using namespace N1; -+ using namespace N2; ++ unsigned deadbeef = 0xDEADBEEF; ++ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef)); ++ ++ unsigned out; ++ foo(out, 2, X::V); ++ ++ if (out != 2) ++ __builtin_abort (); + -+ static T t; // { dg-error "" } ++ return 0; +} -Index: gcc/testsuite/g++.dg/init/new30.C +Index: gcc/testsuite/g++.dg/cpp0x/ref-qual16.C =================================================================== ---- gcc/testsuite/g++.dg/init/new30.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/init/new30.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ -+// PR c++/40975 +--- gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/g++.dg/cpp0x/ref-qual16.C (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,12 @@ ++// PR c++/64297 ++// { dg-do compile { target c++11 } } + -+struct data_type -+{ -+ // constructor required to reproduce compiler bug -+ data_type() {} ++struct A { ++ typedef int X; ++ template X m_fn1() const; +}; ++template struct is_function {}; ++is_function i; ++struct D { ++ template > D(Y); ++} b(&A::m_fn1<0>); +Index: gcc/testsuite/g++.dg/template/offsetof3.C +=================================================================== +--- gcc/testsuite/g++.dg/template/offsetof3.C (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/g++.dg/template/offsetof3.C (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,18 @@ ++// PR c++/64487 + -+struct ptr_type -+{ -+ // array new as default argument required to reproduce compiler bug -+ ptr_type (data_type* ptr = new data_type[1]) { delete[] ptr; } ++struct foo { ++ int member; +}; + -+ptr_type obj; -Index: gcc/testsuite/g++.dg/template/nontype23.C ++template < int N> ++struct bar {}; ++ ++template ++struct qux { ++ static bar static_member; ++}; ++ ++template ++bar qux::static_member; ++ ++int main() { } +Index: gcc/testsuite/g++.dg/template/non-dependent14.C =================================================================== ---- gcc/testsuite/g++.dg/template/nontype23.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/template/nontype23.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,9 @@ -+// PR c++/48936 +--- gcc/testsuite/g++.dg/template/non-dependent14.C (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/g++.dg/template/non-dependent14.C (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,7 @@ ++// PR c++/64251 ++ ++class DictionaryValue {}; ++template void CreateValue(T) { ++ DictionaryValue(0); ++ CreateValue(0); ++} +Index: gcc/testsuite/c-c++-common/pr61553.c +=================================================================== +--- gcc/testsuite/c-c++-common/pr61553.c (.../tags/gcc_4_8_4_release) (revision 0) ++++ gcc/testsuite/c-c++-common/pr61553.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -0,0 +1,8 @@ ++/* PR c/61553 */ ++/* { dg-do compile } */ + -+template int foo (void); -+template struct S ++void ++foo (char *s) +{ -+ static const unsigned int a = sizeof (T); -+ enum { c = sizeof (foo <(a == 0)> ()) }; -+}; -+S x; ++ __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST); /* { dg-error "size mismatch" } */ ++} +Index: gcc/cp/typeck.c +=================================================================== +--- gcc/cp/typeck.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cp/typeck.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -8639,6 +8639,12 @@ + /* This should really have a different TYPE_MAIN_VARIANT, but that gets + complex. */ + tree result = build_qualified_type (type, memfn_quals); ++ if (tree canon = TYPE_CANONICAL (result)) ++ if (canon != result) ++ /* check_qualified_type doesn't check the ref-qualifier, so make sure ++ TYPE_CANONICAL is correct. */ ++ TYPE_CANONICAL (result) ++ = build_ref_qualified_type (canon, type_memfn_rqual (result)); + result = build_exception_variant (result, TYPE_RAISES_EXCEPTIONS (type)); + return build_ref_qualified_type (result, rqual); + } Index: gcc/cp/ChangeLog =================================================================== ---- gcc/cp/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) +--- gcc/cp/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cp/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) @@ -1,3 +1,15 @@ -+2011-05-09 Jason Merrill ++2015-01-13 Jason Merrill + -+ PR c++/48936 -+ * decl2.c (mark_used): Instantiate constant variables even -+ in unevaluated context. ++ PR c++/64487 ++ * semantics.c (finish_offsetof): Handle templates here. ++ * parser.c (cp_parser_builtin_offsetof): Not here. + -+2011-04-27 Jason Merrill ++ PR c++/64251 ++ * decl2.c (mark_used): Don't mark if in_template_function. + -+ PR c++/48046 -+ * parser.c (cp_parser_diagnose_invalid_type_name): Commit -+ to tentative parse sooner. ++ PR c++/64297 ++ * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL. + - 2011-04-28 Release Manager + 2014-12-19 Release Manager - * GCC 4.5.3 released. -Index: gcc/cp/decl2.c + * GCC 4.8.4 released. +Index: gcc/cp/semantics.c =================================================================== ---- gcc/cp/decl2.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/decl2.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3991,8 +3991,6 @@ - void - mark_used (tree decl) +--- gcc/cp/semantics.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cp/semantics.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -3651,6 +3651,14 @@ + tree + finish_offsetof (tree expr) { -- HOST_WIDE_INT saved_processing_template_decl = 0; -- - /* If DECL is a BASELINK for a single function, then treat it just - like the DECL for the function. Otherwise, if the BASELINK is - for an overloaded function, we don't know which function was -@@ -4029,9 +4027,6 @@ - error ("used here"); - return; - } -- /* If we don't need a value, then we don't need to synthesize DECL. */ -- if (cp_unevaluated_operand != 0) -- return; - - /* We can only check DECL_ODR_USED on variables or functions with - DECL_LANG_SPECIFIC set, and these are also the only decls that we -@@ -4059,9 +4054,10 @@ - DECL. However, if DECL is a static data member initialized with - a constant, we need the value right now because a reference to - such a data member is not value-dependent. */ -- if (TREE_CODE (decl) == VAR_DECL -- && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl) -- && DECL_CLASS_SCOPE_P (decl)) -+ if (DECL_INTEGRAL_CONSTANT_VAR_P (decl) -+ && !DECL_INITIAL (decl) -+ && DECL_LANG_SPECIFIC (decl) -+ && DECL_TEMPLATE_INSTANTIATION (decl)) ++ /* If we're processing a template, we can't finish the semantics yet. ++ Otherwise we can fold the entire expression now. */ ++ if (processing_template_decl) ++ { ++ expr = build1 (OFFSETOF_EXPR, size_type_node, expr); ++ return expr; ++ } ++ + if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR) { - /* Don't try to instantiate members of dependent types. We - cannot just use dependent_type_p here because this function -@@ -4071,12 +4067,14 @@ - if (CLASSTYPE_TEMPLATE_INFO ((DECL_CONTEXT (decl))) - && uses_template_parms (CLASSTYPE_TI_ARGS (DECL_CONTEXT (decl)))) - return; -- /* Pretend that we are not in a template, even if we are, so -- that the static data member initializer will be processed. */ -- saved_processing_template_decl = processing_template_decl; -- processing_template_decl = 0; -+ instantiate_decl (decl, /*defer_ok=*/false, -+ /*expl_inst_class_mem_p=*/false); + error ("cannot apply % to destructor %<~%T%>", +Index: gcc/cp/decl2.c +=================================================================== +--- gcc/cp/decl2.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cp/decl2.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -4606,7 +4606,7 @@ + --function_depth; } -+ /* If we don't need a value, then we don't need to synthesize DECL. */ -+ if (cp_unevaluated_operand != 0) -+ return; -+ - if (processing_template_decl) - return; - -@@ -4149,8 +4147,6 @@ - need. Therefore, we always try to defer instantiation. */ - instantiate_decl (decl, /*defer_ok=*/true, - /*expl_inst_class_mem_p=*/false); -- -- processing_template_decl = saved_processing_template_decl; - } +- if (processing_template_decl) ++ if (processing_template_decl || in_template_function ()) + return true; - #include "gt-cp-decl2.h" + /* Check this too in case we're within fold_non_dependent_expr. */ Index: gcc/cp/parser.c =================================================================== ---- gcc/cp/parser.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/parser.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2333,6 +2333,7 @@ - location_t location) - { - tree decl, old_scope; -+ cp_parser_commit_to_tentative_parse (parser); - /* Try to lookup the identifier. */ - old_scope = parser->scope; - parser->scope = scope; -@@ -2423,7 +2424,6 @@ - else - gcc_unreachable (); +--- gcc/cp/parser.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cp/parser.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -8024,12 +8024,7 @@ } -- cp_parser_commit_to_tentative_parse (parser); - } - /* Check for a common situation where a type-name should be present, -Index: gcc/ifcvt.c + success: +- /* If we're processing a template, we can't finish the semantics yet. +- Otherwise we can fold the entire expression now. */ +- if (processing_template_decl) +- expr = build1 (OFFSETOF_EXPR, size_type_node, expr); +- else +- expr = finish_offsetof (expr); ++ expr = finish_offsetof (expr); + + failure: + parser->integral_constant_expression_p = save_ice_p; +Index: gcc/jump.c =================================================================== ---- gcc/ifcvt.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/ifcvt.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3818,7 +3818,7 @@ - basic_block other_bb, basic_block new_dest, int reversep) - { - rtx head, end, jump, earliest = NULL_RTX, old_dest, new_label = NULL_RTX; -- bitmap merge_set = NULL; -+ bitmap merge_set = NULL, merge_set_noclobber = NULL; - /* Number of pending changes. */ - int n_validated_changes = 0; - -@@ -3951,11 +3951,14 @@ - - /* Collect: - MERGE_SET = set of registers set in MERGE_BB -+ MERGE_SET_NOCLOBBER = like MERGE_SET, but only includes registers -+ that are really set, not just clobbered. - TEST_LIVE = set of registers live at EARLIEST -- TEST_SET = set of registers set between EARLIEST and the -- end of the block. */ -+ TEST_SET = set of registers set between EARLIEST and the -+ end of the block. */ - - merge_set = BITMAP_ALLOC (®_obstack); -+ merge_set_noclobber = BITMAP_ALLOC (®_obstack); - - /* If we allocated new pseudos (e.g. in the conditional move - expander called from noce_emit_cmove), we must resize the -@@ -3967,13 +3970,8 @@ - { - if (NONDEBUG_INSN_P (insn)) - { -- unsigned int uid = INSN_UID (insn); -- df_ref *def_rec; -- for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) -- { -- df_ref def = *def_rec; -- bitmap_set_bit (merge_set, DF_REF_REGNO (def)); -- } -+ df_simulate_find_defs (insn, merge_set); -+ df_simulate_find_noclobber_defs (insn, merge_set_noclobber); - } +--- gcc/jump.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/jump.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -133,7 +133,30 @@ + if (BARRIER_P (prev)) + delete_insn (insn); + else if (prev != PREV_INSN (insn)) +- reorder_insns (insn, insn, prev); ++ { ++ basic_block bb = BLOCK_FOR_INSN (prev); ++ rtx end = PREV_INSN (insn); ++ reorder_insns_nobb (insn, insn, prev); ++ if (bb) ++ { ++ /* If the backend called in machine reorg compute_bb_for_insn ++ and didn't free_bb_for_insn again, preserve basic block ++ boundaries. Move the end of basic block to PREV since ++ it is followed by a barrier now, and clear BLOCK_FOR_INSN ++ on the following notes. ++ ??? Maybe the proper solution for the targets that have ++ cfg around after machine reorg is not to run cleanup_barriers ++ pass at all. */ ++ BB_END (bb) = prev; ++ do ++ { ++ prev = NEXT_INSN (prev); ++ if (prev != insn && BLOCK_FOR_INSN (prev) == bb) ++ BLOCK_FOR_INSN (prev) = NULL; ++ } ++ while (prev != end); ++ } ++ } } + } + return 0; +Index: gcc/expr.c +=================================================================== +--- gcc/expr.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/expr.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -4708,8 +4708,6 @@ + int unsignedp; + int volatilep = 0; + tree tem; +- bool misalignp; +- rtx mem = NULL_RTX; + + push_temp_slots (); + tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1, +@@ -4728,41 +4726,8 @@ + && DECL_BIT_FIELD_TYPE (TREE_OPERAND (to, 1))) + get_bit_range (&bitregion_start, &bitregion_end, to, &bitpos, &offset); + +- /* If we are going to use store_bit_field and extract_bit_field, +- make sure to_rtx will be safe for multiple use. */ +- mode = TYPE_MODE (TREE_TYPE (tem)); +- if (TREE_CODE (tem) == MEM_REF +- && mode != BLKmode +- && ((align = get_object_alignment (tem)) +- < GET_MODE_ALIGNMENT (mode)) +- && ((icode = optab_handler (movmisalign_optab, mode)) +- != CODE_FOR_nothing)) +- { +- struct expand_operand ops[2]; ++ to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); -@@ -3984,7 +3982,7 @@ - unsigned i; - bitmap_iterator bi; - -- EXECUTE_IF_SET_IN_BITMAP (merge_set, 0, i, bi) -+ EXECUTE_IF_SET_IN_BITMAP (merge_set_noclobber, 0, i, bi) - { - if (i < FIRST_PSEUDO_REGISTER - && ! fixed_regs[i] -@@ -4015,12 +4013,14 @@ +- misalignp = true; +- to_rtx = gen_reg_rtx (mode); +- mem = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); +- +- /* If the misaligned store doesn't overwrite all bits, perform +- rmw cycle on MEM. */ +- if (bitsize != GET_MODE_BITSIZE (mode)) +- { +- create_input_operand (&ops[0], to_rtx, mode); +- create_fixed_operand (&ops[1], mem); +- /* The movmisalign pattern cannot fail, else the assignment +- would silently be omitted. */ +- expand_insn (icode, 2, ops); +- +- mem = copy_rtx (mem); +- } +- } +- else +- { +- misalignp = false; +- to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); +- } +- + /* If the bitfield is volatile, we want to access it in the + field's mode, not the computed mode. + If a MEM has VOIDmode (external with incomplete type), +@@ -4900,17 +4865,6 @@ + get_alias_set (to), nontemporal); } - /* We can perform the transformation if -- MERGE_SET & (TEST_SET | TEST_LIVE) -+ MERGE_SET_NOCLOBBER & TEST_SET - and -+ MERGE_SET & TEST_LIVE -+ and - TEST_SET & DF_LIVE_IN (merge_bb) - are empty. */ - -- if (bitmap_intersect_p (merge_set, test_set) -+ if (bitmap_intersect_p (merge_set_noclobber, test_set) - || bitmap_intersect_p (merge_set, test_live) - || bitmap_intersect_p (test_set, df_get_live_in (merge_bb))) - intersect = true; -@@ -4104,10 +4104,11 @@ - unsigned i; - bitmap_iterator bi; - -- EXECUTE_IF_SET_IN_BITMAP (merge_set, 0, i, bi) -+ EXECUTE_IF_SET_IN_BITMAP (merge_set_noclobber, 0, i, bi) - remove_reg_equal_equiv_notes_for_regno (i); - - BITMAP_FREE (merge_set); -+ BITMAP_FREE (merge_set_noclobber); - } +- if (misalignp) +- { +- struct expand_operand ops[2]; +- +- create_fixed_operand (&ops[0], mem); +- create_input_operand (&ops[1], to_rtx, mode); +- /* The movmisalign pattern cannot fail, else the assignment +- would silently be omitted. */ +- expand_insn (icode, 2, ops); +- } +- + if (result) + preserve_temp_slots (result); + pop_temp_slots (); +@@ -5262,7 +5216,7 @@ + temp = expand_expr_real (exp, tmp_target, GET_MODE (target), + (call_param_p + ? EXPAND_STACK_PARM : EXPAND_NORMAL), +- &alt_rtl); ++ &alt_rtl, false); + } - reorder_insns (head, end, PREV_INSN (earliest)); -@@ -4128,7 +4129,10 @@ - cancel_changes (0); - fail: - if (merge_set) -- BITMAP_FREE (merge_set); -+ { -+ BITMAP_FREE (merge_set); -+ BITMAP_FREE (merge_set_noclobber); -+ } - return FALSE; - } - -Index: gcc/BASE-VER -=================================================================== ---- gcc/BASE-VER (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/BASE-VER (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1 +1 @@ --4.5.3 -+4.5.4 -Index: gcc/df.h -=================================================================== ---- gcc/df.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/df.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -978,6 +978,7 @@ - extern void df_md_add_problem (void); - extern void df_md_simulate_artificial_defs_at_top (basic_block, bitmap); - extern void df_md_simulate_one_insn (basic_block, rtx, bitmap); -+extern void df_simulate_find_noclobber_defs (rtx, bitmap); - extern void df_simulate_find_defs (rtx, bitmap); - extern void df_simulate_defs (rtx, bitmap); - extern void df_simulate_uses (rtx, bitmap); -Index: gcc/c-typeck.c -=================================================================== ---- gcc/c-typeck.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/c-typeck.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -9800,7 +9800,7 @@ - warn_for_sign_compare (location, orig_op0_folded, - orig_op1_folded, op0, op1, - result_type, resultcode); -- if (!in_late_binary_op) -+ if (!in_late_binary_op && !int_operands) - { - if (!op0_maybe_const || TREE_CODE (op0) != INTEGER_CST) - op0 = c_wrap_maybe_const (op0, !op0_maybe_const); -Index: gcc/tree-inline.c -=================================================================== ---- gcc/tree-inline.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-inline.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -4179,14 +4179,16 @@ - CONSTRUCTOR_ELTS (*tp)); - *tp = new_tree; + /* If TEMP is a VOIDmode constant and the mode of the type of EXP is not +@@ -7881,11 +7835,21 @@ + address, and ALT_RTL is non-NULL, then *ALT_RTL is set to the + DECL_RTL of the VAR_DECL. *ALT_RTL is also set if EXP is a + COMPOUND_EXPR whose second argument is such a VAR_DECL, and so on +- recursively. */ ++ recursively. + ++ If INNER_REFERENCE_P is true, we are expanding an inner reference. ++ In this case, we don't adjust a returned MEM rtx that wouldn't be ++ sufficiently aligned for its mode; instead, it's up to the caller ++ to deal with it afterwards. This is used to make sure that unaligned ++ base objects for which out-of-bounds accesses are supported, for ++ example record types with trailing arrays, aren't realigned behind ++ the back of the caller. ++ The normal operating mode is to pass FALSE for this parameter. */ ++ + rtx + expand_expr_real (tree exp, rtx target, enum machine_mode tmode, +- enum expand_modifier modifier, rtx *alt_rtl) ++ enum expand_modifier modifier, rtx *alt_rtl, ++ bool inner_reference_p) + { + rtx ret; + +@@ -7897,7 +7861,8 @@ + return ret ? ret : const0_rtx; } -+ else if (code == STATEMENT_LIST) -+ /* We used to just abort on STATEMENT_LIST, but we can run into them -+ with statement-expressions (c++/40975). */ -+ copy_statement_list (tp); - else if (TREE_CODE_CLASS (code) == tcc_type) - *walk_subtrees = 0; - else if (TREE_CODE_CLASS (code) == tcc_declaration) - *walk_subtrees = 0; - else if (TREE_CODE_CLASS (code) == tcc_constant) - *walk_subtrees = 0; -- else -- gcc_assert (code != STATEMENT_LIST); - return NULL_TREE; + +- ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl); ++ ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl, ++ inner_reference_p); + return ret; } -Index: gcc/var-tracking.c -=================================================================== ---- gcc/var-tracking.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/var-tracking.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -4134,8 +4134,9 @@ - VALUE_RECURSED_INTO (val) = true; +@@ -9190,7 +9155,8 @@ - for (node = var->var_part[0].loc_chain; node; node = node->next) -- if (MEM_P (node->loc) && MEM_EXPR (node->loc) == expr -- && MEM_OFFSET (node->loc) == 0) -+ if (MEM_P (node->loc) -+ && MEM_EXPR (node->loc) == expr -+ && INT_MEM_OFFSET (node->loc) == 0) + rtx + expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, +- enum expand_modifier modifier, rtx *alt_rtl) ++ enum expand_modifier modifier, rtx *alt_rtl, ++ bool inner_reference_p) + { + rtx op0, op1, temp, decl_rtl; + tree type; +@@ -9336,7 +9302,7 @@ + + set_curr_insn_location (gimple_location (g)); + r = expand_expr_real (gimple_assign_rhs_to_tree (g), target, +- tmode, modifier, NULL); ++ tmode, modifier, NULL, inner_reference_p); + set_curr_insn_location (saved_loc); + if (REG_P (r) && !REG_EXPR (r)) + set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (exp), r); +@@ -9557,7 +9523,8 @@ + case SAVE_EXPR: { - where = node; - break; -@@ -4198,11 +4199,10 @@ - { - for (loc = var->var_part[0].loc_chain; loc; loc = loc->next) - { -- /* We want to remove dying MEMs that doesn't refer to -- DECL. */ -+ /* We want to remove dying MEMs that doesn't refer to DECL. */ - if (GET_CODE (loc->loc) == MEM - && (MEM_EXPR (loc->loc) != decl -- || MEM_OFFSET (loc->loc)) -+ || INT_MEM_OFFSET (loc->loc) != 0) - && !mem_dies_at_call (loc->loc)) - break; - /* We want to move here MEMs that do refer to DECL. */ -@@ -4246,7 +4246,7 @@ - - if (GET_CODE (loc->loc) != MEM - || (MEM_EXPR (loc->loc) == decl -- && MEM_OFFSET (loc->loc) == 0) -+ && INT_MEM_OFFSET (loc->loc) == 0) - || !mem_dies_at_call (loc->loc)) + tree val = treeop0; +- rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl); ++ rtx ret = expand_expr_real_1 (val, target, tmode, modifier, alt_rtl, ++ inner_reference_p); + + if (!SAVE_EXPR_RESOLVED_P (exp)) + { +@@ -9706,6 +9673,7 @@ + MEM_VOLATILE_P (temp) = 1; + if (modifier != EXPAND_WRITE + && modifier != EXPAND_MEMORY ++ && !inner_reference_p + && mode != BLKmode + && align < GET_MODE_ALIGNMENT (mode)) + { +@@ -9940,18 +9908,19 @@ + computation, since it will need a temporary and TARGET is known + to have to do. This occurs in unchecked conversion in Ada. */ + orig_op0 = op0 +- = expand_expr (tem, +- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE +- && COMPLETE_TYPE_P (TREE_TYPE (tem)) +- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) +- != INTEGER_CST) +- && modifier != EXPAND_STACK_PARM +- ? target : NULL_RTX), +- VOIDmode, +- (modifier == EXPAND_INITIALIZER +- || modifier == EXPAND_CONST_ADDRESS +- || modifier == EXPAND_STACK_PARM) +- ? modifier : EXPAND_NORMAL); ++ = expand_expr_real (tem, ++ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE ++ && COMPLETE_TYPE_P (TREE_TYPE (tem)) ++ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) ++ != INTEGER_CST) ++ && modifier != EXPAND_STACK_PARM ++ ? target : NULL_RTX), ++ VOIDmode, ++ (modifier == EXPAND_INITIALIZER ++ || modifier == EXPAND_CONST_ADDRESS ++ || modifier == EXPAND_STACK_PARM) ++ ? modifier : EXPAND_NORMAL, ++ NULL, true); + + + /* If the bitfield is volatile, we want to access it in the +@@ -10302,17 +10271,18 @@ + { + /* See the normal_inner_ref case for the rationale. */ + orig_op0 +- = expand_expr (tem, +- (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE +- && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) +- != INTEGER_CST) +- && modifier != EXPAND_STACK_PARM +- ? target : NULL_RTX), +- VOIDmode, +- (modifier == EXPAND_INITIALIZER +- || modifier == EXPAND_CONST_ADDRESS +- || modifier == EXPAND_STACK_PARM) +- ? modifier : EXPAND_NORMAL); ++ = expand_expr_real (tem, ++ (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE ++ && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) ++ != INTEGER_CST) ++ && modifier != EXPAND_STACK_PARM ++ ? target : NULL_RTX), ++ VOIDmode, ++ (modifier == EXPAND_INITIALIZER ++ || modifier == EXPAND_CONST_ADDRESS ++ || modifier == EXPAND_STACK_PARM) ++ ? modifier : EXPAND_NORMAL, ++ NULL, true); + + if (MEM_P (orig_op0)) + { +@@ -10339,8 +10309,8 @@ + } + + if (!op0) +- op0 = expand_expr (treeop0, +- NULL_RTX, VOIDmode, modifier); ++ op0 = expand_expr_real (treeop0, NULL_RTX, VOIDmode, modifier, ++ NULL, inner_reference_p); + + /* If the input and output modes are both the same, we are done. */ + if (mode == GET_MODE (op0)) +@@ -10407,50 +10377,53 @@ + op0 = copy_rtx (op0); + 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)) +- { +- 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 ++ else if (modifier != EXPAND_WRITE ++ && modifier != EXPAND_MEMORY ++ && !inner_reference_p + && mode != BLKmode + && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode)) { - if (old_loc != loc->loc && emit_notes) -Index: gcc/df-problems.c +- tree inner_type = TREE_TYPE (treeop0); +- HOST_WIDE_INT temp_size +- = MAX (int_size_in_bytes (inner_type), +- (HOST_WIDE_INT) GET_MODE_SIZE (mode)); +- rtx new_rtx +- = assign_stack_temp_for_type (mode, temp_size, type); +- rtx new_with_op0_mode +- = adjust_address (new_rtx, GET_MODE (op0), 0); ++ /* If the target does have special handling for unaligned ++ loads of mode then use them. */ ++ if ((icode = optab_handler (movmisalign_optab, mode)) ++ != CODE_FOR_nothing) ++ { ++ rtx reg, insn; + +- gcc_assert (!TREE_ADDRESSABLE (exp)); ++ 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); + +- if (GET_MODE (op0) == BLKmode) +- emit_block_move (new_with_op0_mode, op0, +- GEN_INT (GET_MODE_SIZE (mode)), +- (modifier == EXPAND_STACK_PARM +- ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL)); +- else +- emit_move_insn (new_with_op0_mode, op0); ++ /* Nor can the insn generator. */ ++ insn = GEN_FCN (icode) (reg, op0); ++ emit_insn (insn); ++ return reg; ++ } ++ else if (STRICT_ALIGNMENT) ++ { ++ tree inner_type = TREE_TYPE (treeop0); ++ HOST_WIDE_INT temp_size ++ = MAX (int_size_in_bytes (inner_type), ++ (HOST_WIDE_INT) GET_MODE_SIZE (mode)); ++ rtx new_rtx ++ = assign_stack_temp_for_type (mode, temp_size, type); ++ rtx new_with_op0_mode ++ = adjust_address (new_rtx, GET_MODE (op0), 0); + +- op0 = new_rtx; ++ gcc_assert (!TREE_ADDRESSABLE (exp)); ++ ++ if (GET_MODE (op0) == BLKmode) ++ emit_block_move (new_with_op0_mode, op0, ++ GEN_INT (GET_MODE_SIZE (mode)), ++ (modifier == EXPAND_STACK_PARM ++ ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL)); ++ else ++ emit_move_insn (new_with_op0_mode, op0); ++ ++ op0 = new_rtx; ++ } + } + + op0 = adjust_address (op0, mode, 0); +@@ -10550,7 +10523,7 @@ + /* WITH_SIZE_EXPR expands to its first argument. The caller should + have pulled out the size to use in whatever context it needed. */ + return expand_expr_real (treeop0, original_target, tmode, +- modifier, alt_rtl); ++ modifier, alt_rtl, inner_reference_p); + + default: + return expand_expr_real_2 (&ops, target, tmode, modifier); +Index: gcc/expr.h +=================================================================== +--- gcc/expr.h (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/expr.h (.../branches/gcc-4_8-branch) (revision 220382) +@@ -41,7 +41,8 @@ + is a constant that is not a legitimate address. + EXPAND_WRITE means we are only going to write to the resulting rtx. + EXPAND_MEMORY means we are interested in a memory result, even if +- the memory is constant and we could have propagated a constant value. */ ++ the memory is constant and we could have propagated a constant value, ++ or the memory is unaligned on a STRICT_ALIGNMENT target. */ + enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM, EXPAND_SUM, + EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE, + EXPAND_MEMORY}; +@@ -428,9 +429,9 @@ + + /* Work horses for expand_expr. */ + extern rtx expand_expr_real (tree, rtx, enum machine_mode, +- enum expand_modifier, rtx *); ++ enum expand_modifier, rtx *, bool); + extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode, +- enum expand_modifier, rtx *); ++ enum expand_modifier, rtx *, bool); + extern rtx expand_expr_real_2 (sepops, rtx, enum machine_mode, + enum expand_modifier); + +@@ -441,13 +442,13 @@ + expand_expr (tree exp, rtx target, enum machine_mode mode, + enum expand_modifier modifier) + { +- return expand_expr_real (exp, target, mode, modifier, NULL); ++ return expand_expr_real (exp, target, mode, modifier, NULL, false); + } + + static inline rtx + expand_normal (tree exp) + { +- return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL); ++ return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false); + } + + /* At the start of a function, record that we have no previously-pushed +Index: gcc/fortran/interface.c =================================================================== ---- gcc/df-problems.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/df-problems.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3748,9 +3748,22 @@ - for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) +--- gcc/fortran/interface.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/interface.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -3557,6 +3557,8 @@ + gfc_user_op *uop; + gfc_intrinsic_op i; + const char *gname; ++ gfc_typebound_proc* tbo; ++ gfc_expr* tb_base; + + sym = NULL; + +@@ -3573,8 +3575,50 @@ + + i = fold_unary_intrinsic (e->value.op.op); + ++ /* See if we find a matching type-bound operator. */ + if (i == INTRINSIC_USER) ++ tbo = matching_typebound_op (&tb_base, actual, ++ i, e->value.op.uop->name, &gname); ++ else ++ switch (i) ++ { ++#define CHECK_OS_COMPARISON(comp) \ ++ case INTRINSIC_##comp: \ ++ case INTRINSIC_##comp##_OS: \ ++ tbo = matching_typebound_op (&tb_base, actual, \ ++ INTRINSIC_##comp, NULL, &gname); \ ++ if (!tbo) \ ++ tbo = matching_typebound_op (&tb_base, actual, \ ++ INTRINSIC_##comp##_OS, NULL, &gname); \ ++ break; ++ CHECK_OS_COMPARISON(EQ) ++ CHECK_OS_COMPARISON(NE) ++ CHECK_OS_COMPARISON(GT) ++ CHECK_OS_COMPARISON(GE) ++ CHECK_OS_COMPARISON(LT) ++ CHECK_OS_COMPARISON(LE) ++#undef CHECK_OS_COMPARISON ++ ++ default: ++ tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname); ++ break; ++ } ++ ++ /* If there is a matching typebound-operator, replace the expression with ++ a call to it and succeed. */ ++ if (tbo) { - df_ref def = *def_rec; -- /* If the def is to only part of the reg, it does -- not kill the other defs that reach here. */ -- if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))) -+ bitmap_set_bit (defs, DF_REF_REGNO (def)); ++ gcc_assert (tb_base); ++ build_compcall_for_operator (e, actual, tb_base, tbo, gname); ++ ++ if (gfc_resolve_expr (e) == FAILURE) ++ return MATCH_ERROR; ++ else ++ return MATCH_YES; + } -+} ++ ++ if (i == INTRINSIC_USER) ++ { + for (ns = gfc_current_ns; ns; ns = ns->parent) + { + uop = gfc_find_uop (e->value.op.uop->name, ns); +@@ -3623,54 +3667,6 @@ + + if (sym == NULL) + { +- gfc_typebound_proc* tbo; +- gfc_expr* tb_base; +- +- /* See if we find a matching type-bound operator. */ +- if (i == INTRINSIC_USER) +- tbo = matching_typebound_op (&tb_base, actual, +- i, e->value.op.uop->name, &gname); +- else +- switch (i) +- { +-#define CHECK_OS_COMPARISON(comp) \ +- case INTRINSIC_##comp: \ +- case INTRINSIC_##comp##_OS: \ +- tbo = matching_typebound_op (&tb_base, actual, \ +- INTRINSIC_##comp, NULL, &gname); \ +- if (!tbo) \ +- tbo = matching_typebound_op (&tb_base, actual, \ +- INTRINSIC_##comp##_OS, NULL, &gname); \ +- break; +- CHECK_OS_COMPARISON(EQ) +- CHECK_OS_COMPARISON(NE) +- CHECK_OS_COMPARISON(GT) +- CHECK_OS_COMPARISON(GE) +- CHECK_OS_COMPARISON(LT) +- CHECK_OS_COMPARISON(LE) +-#undef CHECK_OS_COMPARISON +- +- default: +- tbo = matching_typebound_op (&tb_base, actual, i, NULL, &gname); +- break; +- } +- +- /* If there is a matching typebound-operator, replace the expression with +- a call to it and succeed. */ +- if (tbo) +- { +- gfc_try result; +- +- gcc_assert (tb_base); +- build_compcall_for_operator (e, actual, tb_base, tbo, gname); +- +- result = gfc_resolve_expr (e); +- if (result == FAILURE) +- return MATCH_ERROR; +- +- return MATCH_YES; +- } +- + /* Don't use gfc_free_actual_arglist(). */ + free (actual->next); + free (actual); +Index: gcc/fortran/trans-array.c +=================================================================== +--- gcc/fortran/trans-array.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/trans-array.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -4299,11 +4299,20 @@ + + for (ss = rss; ss != gfc_ss_terminator; ss = ss->next) + { +- if (ss->info->type != GFC_SS_SECTION) +- continue; + + ss_expr = ss->info->expr; + ++ if (ss->info->type != GFC_SS_SECTION) ++ { ++ /* Check for cases like c(:)(1:2) = c(2)(2:3) */ ++ if (!nDepend && dest_expr->rank > 0 ++ && dest_expr->ts.type == BT_CHARACTER ++ && ss_expr->expr_type == EXPR_VARIABLE) ++ ++ nDepend = gfc_check_dependency (dest_expr, ss_expr, false); ++ continue; ++ } ++ + if (dest_expr->symtree->n.sym != ss_expr->symtree->n.sym) + { + if (gfc_could_be_alias (dest, ss) +Index: gcc/fortran/ChangeLog +=================================================================== +--- gcc/fortran/ChangeLog (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,42 @@ ++2015-02-01 Jakub Jelinek + -+/* Find the set of real DEFs, which are not clobbers, for INSN. */ ++ Backported from mainline ++ 2015-01-13 Jakub Jelinek + -+void -+df_simulate_find_noclobber_defs (rtx insn, bitmap defs) -+{ -+ df_ref *def_rec; -+ unsigned int uid = INSN_UID (insn); ++ PR fortran/64528 ++ * trans-decl.c (create_function_arglist): Don't set TREE_READONLY ++ on dummy args with VALUE attribute. + -+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) -+ { -+ df_ref def = *def_rec; -+ if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER))) - bitmap_set_bit (defs, DF_REF_REGNO (def)); ++2015-01-24 Thomas Koenig ++ ++ PR fortran/56867 ++ * trans-array.c (gfc_conv_resolve_dependencies): Also check ++ dependencies when there may be substrings of character arrays. ++ ++2015-01-24 Thomas Koenig ++ ++ Backport from trunk ++ PR fortran/57023 ++ * dependency.c (callback_dummy_intent_not_int): New function. ++ (dummy_intent_not_in): New function. ++ (gfc_full_array_ref_p): Use dummy_intent_not_in. ++ ++2015-01-12 Janus Weil ++ ++ Backport from mainline ++ PR fortran/63733 ++ * interface.c (gfc_extend_expr): Look for type-bound operators before ++ non-typebound ones. ++ ++2014-12-23 Janus Weil ++ ++ Backport from mainline ++ PR fortran/64244 ++ * resolve.c (resolve_typebound_call): New argument to pass out the ++ non-overridable attribute of the specific procedure. ++ (resolve_typebound_subroutine): Get overridable flag from ++ resolve_typebound_call. ++ + 2014-12-19 Release Manager + + * GCC 4.8.4 released. +Index: gcc/fortran/resolve.c +=================================================================== +--- gcc/fortran/resolve.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/resolve.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -6048,7 +6048,7 @@ + /* Resolve a call to a type-bound subroutine. */ + + static gfc_try +-resolve_typebound_call (gfc_code* c, const char **name) ++resolve_typebound_call (gfc_code* c, const char **name, bool *overridable) + { + gfc_actual_arglist* newactual; + gfc_symtree* target; +@@ -6072,6 +6072,10 @@ + if (resolve_typebound_generic_call (c->expr1, name) == FAILURE) + return FAILURE; + ++ /* Pass along the NON_OVERRIDABLE attribute of the specific TBP. */ ++ if (overridable) ++ *overridable = !c->expr1->value.compcall.tbp->non_overridable; ++ + /* Transform into an ordinary EXEC_CALL for now. */ + + if (resolve_typebound_static (c->expr1, &target, &newactual) == FAILURE) +@@ -6324,7 +6328,7 @@ + if (c->ts.u.derived == NULL) + c->ts.u.derived = gfc_find_derived_vtab (declared); + +- if (resolve_typebound_call (code, &name) == FAILURE) ++ if (resolve_typebound_call (code, &name, NULL) == FAILURE) + return FAILURE; + + /* Use the generic name if it is there. */ +@@ -6356,7 +6360,7 @@ } - } -@@ -3903,13 +3916,9 @@ - the block, starting with the first one. - ----------------------------------------------------------------------------*/ - --/* Apply the artificial uses and defs at the top of BB in a forwards -- direction. ??? This is wrong; defs mark the point where a pseudo -- becomes live when scanning forwards (unless a def is unused). Since -- there are no REG_UNUSED notes for artificial defs, passes that -- require artificial defs probably should not call this function -- unless (as is the case for fwprop) they are correct when liveness -- bitmaps are *under*estimated. */ -+/* Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or -+ DF_LR_IN for basic block BB, for forward scanning by marking artificial -+ defs live. */ - - void - df_simulate_initialize_forwards (basic_block bb, bitmap live) -@@ -3921,7 +3930,7 @@ + + if (st == NULL) +- return resolve_typebound_call (code, NULL); ++ return resolve_typebound_call (code, NULL, NULL); + + if (resolve_ref (code->expr1) == FAILURE) + return FAILURE; +@@ -6369,10 +6373,10 @@ + || (!class_ref && st->n.sym->ts.type != BT_CLASS)) { - df_ref def = *def_rec; - if (DF_REF_FLAGS (def) & DF_REF_AT_TOP) -- bitmap_clear_bit (live, DF_REF_REGNO (def)); -+ bitmap_set_bit (live, DF_REF_REGNO (def)); + gfc_free_ref_list (new_ref); +- return resolve_typebound_call (code, NULL); ++ return resolve_typebound_call (code, NULL, NULL); } + +- if (resolve_typebound_call (code, &name) == FAILURE) ++ if (resolve_typebound_call (code, &name, &overridable) == FAILURE) + { + gfc_free_ref_list (new_ref); + return FAILURE; +Index: gcc/fortran/trans-decl.c +=================================================================== +--- gcc/fortran/trans-decl.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -2186,8 +2186,9 @@ + /* Fill in arg stuff. */ + DECL_CONTEXT (parm) = fndecl; + DECL_ARG_TYPE (parm) = TREE_VALUE (typelist); +- /* All implementation args are read-only. */ +- TREE_READONLY (parm) = 1; ++ /* All implementation args except for VALUE are read-only. */ ++ if (!f->sym->attr.value) ++ TREE_READONLY (parm) = 1; + if (POINTER_TYPE_P (type) + && (!f->sym->attr.proc_pointer + && f->sym->attr.flavor != FL_PROCEDURE)) +Index: gcc/fortran/dependency.c +=================================================================== +--- gcc/fortran/dependency.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/fortran/dependency.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1604,11 +1604,40 @@ + return GFC_DEP_EQUAL; } -@@ -3942,7 +3951,7 @@ - while here the scan is performed forwards! So, first assume that the - def is live, and if this is not true REG_UNUSED notes will rectify the - situation. */ -- df_simulate_find_defs (insn, live); -+ df_simulate_find_noclobber_defs (insn, live); - - /* Clear all of the registers that go dead. */ - for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) -Index: gcc/tree-switch-conversion.c -=================================================================== ---- gcc/tree-switch-conversion.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-switch-conversion.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -549,7 +549,7 @@ - build_arrays (gimple swtch) - { - tree arr_index_type; -- tree tidx, sub, tmp; -+ tree tidx, sub, tmp, utype; - gimple stmt; - gimple_stmt_iterator gsi; - int i; -@@ -557,14 +557,20 @@ - - gsi = gsi_for_stmt (swtch); - -+ /* Make sure we do not generate arithmetics in a subrange. */ -+ utype = TREE_TYPE (info.index_expr); -+ if (TREE_TYPE (utype)) -+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (TREE_TYPE (utype)), 1); ++/* Callback function for checking if an expression depends on a ++ dummy variable which is any other than INTENT(IN). */ + ++static int ++callback_dummy_intent_not_in (gfc_expr **ep, ++ int *walk_subtrees ATTRIBUTE_UNUSED, ++ void *data ATTRIBUTE_UNUSED) ++{ ++ gfc_expr *e = *ep; ++ ++ if (e->expr_type == EXPR_VARIABLE && e->symtree ++ && e->symtree->n.sym->attr.dummy) ++ return e->symtree->n.sym->attr.intent != INTENT_IN; + else -+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (utype), 1); -+ - arr_index_type = build_index_type (info.range_size); -- tmp = create_tmp_var (TREE_TYPE (info.index_expr), "csti"); -+ tmp = create_tmp_var (utype, "csui"); - add_referenced_var (tmp); - tidx = make_ssa_name (tmp, NULL); -- sub = fold_build2_loc (loc, MINUS_EXPR, -- TREE_TYPE (info.index_expr), info.index_expr, -- fold_convert_loc (loc, TREE_TYPE (info.index_expr), -- info.range_min)); -+ sub = fold_build2_loc (loc, MINUS_EXPR, utype, -+ fold_convert_loc (loc, utype, info.index_expr), -+ fold_convert_loc (loc, utype, info.range_min)); - sub = force_gimple_operand_gsi (&gsi, sub, - false, NULL, true, GSI_SAME_STMT); - stmt = gimple_build_assign (tidx, sub); -@@ -673,12 +679,7 @@ - tree label_decl2 = create_artificial_label (UNKNOWN_LOCATION); - tree label_decl3 = create_artificial_label (UNKNOWN_LOCATION); - gimple label1, label2, label3; -- -- tree utype; -- tree tmp_u_1, tmp_u_2, tmp_u_var; -- tree cast; -- gimple cast_assign, minus_assign; -- tree ulb, minus; -+ tree utype, tidx; - tree bound; - - gimple cond_stmt; -@@ -692,49 +693,24 @@ - gcc_assert (info.default_values); - bb0 = gimple_bb (swtch); - -- /* Make sure we do not generate arithmetics in a subrange. */ -- if (TREE_TYPE (TREE_TYPE (info.index_expr))) -- utype = lang_hooks.types.type_for_mode -- (TYPE_MODE (TREE_TYPE (TREE_TYPE (info.index_expr))), 1); -- else -- utype = lang_hooks.types.type_for_mode -- (TYPE_MODE (TREE_TYPE (info.index_expr)), 1); -+ tidx = gimple_assign_lhs (info.arr_ref_first); -+ utype = TREE_TYPE (tidx); - - /* (end of) block 0 */ - gsi = gsi_for_stmt (info.arr_ref_first); -- tmp_u_var = create_tmp_var (utype, "csui"); -- add_referenced_var (tmp_u_var); -- tmp_u_1 = make_ssa_name (tmp_u_var, NULL); -+ gsi_next (&gsi); - -- cast = fold_convert_loc (loc, utype, info.index_expr); -- cast_assign = gimple_build_assign (tmp_u_1, cast); -- SSA_NAME_DEF_STMT (tmp_u_1) = cast_assign; -- gsi_insert_before (&gsi, cast_assign, GSI_SAME_STMT); -- update_stmt (cast_assign); -- -- ulb = fold_convert_loc (loc, utype, info.range_min); -- minus = fold_build2_loc (loc, MINUS_EXPR, utype, tmp_u_1, ulb); -- minus = force_gimple_operand_gsi (&gsi, minus, false, NULL, true, -- GSI_SAME_STMT); -- tmp_u_2 = make_ssa_name (tmp_u_var, NULL); -- minus_assign = gimple_build_assign (tmp_u_2, minus); -- SSA_NAME_DEF_STMT (tmp_u_2) = minus_assign; -- gsi_insert_before (&gsi, minus_assign, GSI_SAME_STMT); -- update_stmt (minus_assign); ++ return 0; ++} ++ ++/* Auxiliary function to check if subexpressions have dummy variables which ++ are not intent(in). ++*/ ++ ++static bool ++dummy_intent_not_in (gfc_expr **ep) ++{ ++ return gfc_expr_walker (ep, callback_dummy_intent_not_in, NULL); ++} ++ + /* Determine if an array ref, usually an array section specifies the + entire array. In addition, if the second, pointer argument is + provided, the function will return true if the reference is +- contiguous; eg. (:, 1) gives true but (1,:) gives false. */ ++ contiguous; eg. (:, 1) gives true but (1,:) gives false. ++ If one of the bounds depends on a dummy variable which is ++ not INTENT(IN), also return false, because the user may ++ have changed the variable. */ + + bool + gfc_full_array_ref_p (gfc_ref *ref, bool *contiguous) +@@ -1672,7 +1701,8 @@ + && (!ref->u.ar.as + || !ref->u.ar.as->lower[i] + || gfc_dep_compare_expr (ref->u.ar.start[i], +- ref->u.ar.as->lower[i]))) ++ ref->u.ar.as->lower[i]) ++ || dummy_intent_not_in (&ref->u.ar.start[i]))) + lbound_OK = false; + /* Check the upper bound. */ + if (ref->u.ar.end[i] +@@ -1679,7 +1709,8 @@ + && (!ref->u.ar.as + || !ref->u.ar.as->upper[i] + || gfc_dep_compare_expr (ref->u.ar.end[i], +- ref->u.ar.as->upper[i]))) ++ ref->u.ar.as->upper[i]) ++ || dummy_intent_not_in (&ref->u.ar.end[i]))) + ubound_OK = false; + /* Check the stride. */ + if (ref->u.ar.stride[i] +Index: gcc/alias.c +=================================================================== +--- gcc/alias.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/alias.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -380,17 +380,9 @@ + static inline int + mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2) + { +-/* Perform a basic sanity check. Namely, that there are no alias sets +- if we're not using strict aliasing. This helps to catch bugs +- whereby someone uses PUT_CODE, but doesn't clear MEM_ALIAS_SET, or +- where a MEM is allocated in some way other than by the use of +- gen_rtx_MEM, and the MEM_ALIAS_SET is not cleared. If we begin to +- use alias sets to indicate that spilled registers cannot alias each +- other, we might need to remove this check. */ +- gcc_assert (flag_strict_aliasing +- || (!MEM_ALIAS_SET (mem1) && !MEM_ALIAS_SET (mem2))); - - bound = fold_convert_loc (loc, utype, info.range_size); -- cond_stmt = gimple_build_cond (LE_EXPR, tmp_u_2, bound, NULL_TREE, NULL_TREE); -+ cond_stmt = gimple_build_cond (LE_EXPR, tidx, bound, NULL_TREE, NULL_TREE); - gsi_insert_before (&gsi, cond_stmt, GSI_SAME_STMT); - update_stmt (cond_stmt); - - /* block 2 */ -- gsi = gsi_for_stmt (info.arr_ref_first); - label2 = gimple_build_label (label_decl2); - gsi_insert_before (&gsi, label2, GSI_SAME_STMT); - last_assign = gen_def_assigns (&gsi); - - /* block 1 */ -- gsi = gsi_for_stmt (info.arr_ref_first); - label1 = gimple_build_label (label_decl1); - gsi_insert_before (&gsi, label1, GSI_SAME_STMT); +- return ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), MEM_ALIAS_SET (mem2)); ++ return (flag_strict_aliasing ++ && ! alias_sets_conflict_p (MEM_ALIAS_SET (mem1), ++ MEM_ALIAS_SET (mem2))); + } + /* Insert the NODE into the splay tree given by DATA. Used by +Index: gcc/cfgexpand.c +=================================================================== +--- gcc/cfgexpand.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/cfgexpand.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -2111,7 +2111,7 @@ + if (lhs) + expand_assignment (lhs, exp, false); + else +- expand_expr_real_1 (exp, const0_rtx, VOIDmode, EXPAND_NORMAL, NULL); ++ expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL); + + mark_transaction_restart_calls (stmt); + } +Index: gcc/combine.c +=================================================================== +--- gcc/combine.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/combine.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1527,8 +1527,8 @@ + uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg)); + + /* The mode and signedness of the argument as it is actually passed, +- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */ +- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3, ++ see assign_parm_setup_reg in function.c. */ ++ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3, + TREE_TYPE (cfun->decl), 0); + + /* The mode of the register in which the argument is being passed. */ Index: gcc/config/i386/i386.md =================================================================== ---- gcc/config/i386/i386.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/i386.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2430,7 +2430,7 @@ - [(set_attr "type" "*,*,mmx,mmxmov,mmxmov,sselog1,ssemov,ssemov,ssemov,sselog1,ssemov,ssemov,ssemov") - (set (attr "prefix") - (if_then_else (eq_attr "alternative" "5,6,7,8") -- (const_string "vex") -+ (const_string "maybe_vex") - (const_string "orig"))) - (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI,TI,DI,V4SF,V2SF,V4SF,V2SF")]) - -@@ -2468,21 +2468,15 @@ - return "movdq2q\t{%1, %0|%0, %1}"; - - case TYPE_SSEMOV: -- if (TARGET_AVX) -- { -- if (get_attr_mode (insn) == MODE_TI) -- return "vmovdqa\t{%1, %0|%0, %1}"; -- else -- return "vmovq\t{%1, %0|%0, %1}"; -- } -- - if (get_attr_mode (insn) == MODE_TI) -- return "movdqa\t{%1, %0|%0, %1}"; -- /* FALLTHRU */ -+ return "%vmovdqa\t{%1, %0|%0, %1}"; -+ /* Handle broken assemblers that require movd instead of movq. */ -+ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) -+ return "%vmovd\t{%1, %0|%0, %1}"; -+ return "%vmovq\t{%1, %0|%0, %1}"; - - case TYPE_MMXMOV: -- /* Moves from and into integer register is done using movd -- opcode with REX prefix. */ -+ /* Handle broken assemblers that require movd instead of movq. */ - if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) - return "movd\t{%1, %0|%0, %1}"; - return "movq\t{%1, %0|%0, %1}"; -@@ -2915,12 +2909,13 @@ - - case 9: case 10: case 14: case 15: - return "movd\t{%1, %0|%0, %1}"; -- case 12: case 13: -- return "%vmovd\t{%1, %0|%0, %1}"; - - case 11: - return "movq\t{%1, %0|%0, %1}"; - -+ case 12: case 13: -+ return "%vmovd\t{%1, %0|%0, %1}"; +--- gcc/config/i386/i386.md (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/i386/i386.md (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1945,7 +1945,8 @@ + (const_string "ssemov") + (eq_attr "alternative" "15,16") + (const_string "ssecvt") +- (match_operand 1 "pic_32bit_operand") ++ (and (match_operand 0 "register_operand") ++ (match_operand 1 "pic_32bit_operand")) + (const_string "lea") + ] + (const_string "imov"))) +@@ -2171,7 +2172,8 @@ + (const_string "sselog1") + (eq_attr "alternative" "7,8,9,10,11") + (const_string "ssemov") +- (match_operand 1 "pic_32bit_operand") ++ (and (match_operand 0 "register_operand") ++ (match_operand 1 "pic_32bit_operand")) + (const_string "lea") + ] + (const_string "imov"))) +Index: gcc/config/i386/avx2intrin.h +=================================================================== +--- gcc/config/i386/avx2intrin.h (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/i386/avx2intrin.h (.../branches/gcc-4_8-branch) (revision 220382) +@@ -639,11 +639,20 @@ + #ifdef __OPTIMIZE__ + extern __inline __m256i + __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) ++_mm256_bslli_epi128 (__m256i __A, const int __N) ++{ ++ return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8); ++} + - default: - gcc_unreachable (); - } -@@ -3067,6 +3062,7 @@ - case 3: - case 4: - return "#"; ++extern __inline __m256i ++__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) + _mm256_slli_si256 (__m256i __A, const int __N) + { + return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8); + } + #else ++#define _mm256_bslli_epi128(A, N) \ ++ ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8)) + #define _mm256_slli_si256(A, N) \ + ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8)) + #endif +@@ -721,11 +730,20 @@ + #ifdef __OPTIMIZE__ + extern __inline __m256i + __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) ++_mm256_bsrli_epi128 (__m256i __A, const int __N) ++{ ++ return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8); ++} + - case 5: - switch (get_attr_mode (insn)) - { -@@ -3262,7 +3258,8 @@ - - case 9: - case 10: -- return "%vmovd\t{%1, %0|%0, %1}"; -+ /* Handle broken assemblers that require movd instead of movq. */ -+ return "%vmovd\t{%1, %0|%0, %1}"; - - default: - gcc_unreachable(); -@@ -3361,11 +3358,11 @@ - switch (get_attr_mode (insn)) - { - case MODE_V4SF: -- return "xorps\t%0, %0"; -+ return "%vxorps\t%0, %d0"; - case MODE_V2DF: -- return "xorpd\t%0, %0"; -+ return "%vxorpd\t%0, %d0"; - case MODE_TI: -- return "pxor\t%0, %0"; -+ return "%vpxor\t%0, %d0"; - default: - gcc_unreachable (); - } -@@ -3375,28 +3372,56 @@ - switch (get_attr_mode (insn)) - { - case MODE_V4SF: -- return "movaps\t{%1, %0|%0, %1}"; -+ return "%vmovaps\t{%1, %0|%0, %1}"; - case MODE_V2DF: -- return "movapd\t{%1, %0|%0, %1}"; -+ return "%vmovapd\t{%1, %0|%0, %1}"; - case MODE_TI: -- return "movdqa\t{%1, %0|%0, %1}"; -+ return "%vmovdqa\t{%1, %0|%0, %1}"; - case MODE_DI: -- return "movq\t{%1, %0|%0, %1}"; -+ return "%vmovq\t{%1, %0|%0, %1}"; - case MODE_DF: -- return "movsd\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0]) && REG_P (operands[1])) -+ return "vmovsd\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovsd\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movsd\t{%1, %0|%0, %1}"; - case MODE_V1DF: -- return "movlpd\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0])) -+ return "vmovlpd\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovlpd\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movlpd\t{%1, %0|%0, %1}"; - case MODE_V2SF: -- return "movlps\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0])) -+ return "vmovlps\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovlps\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movlps\t{%1, %0|%0, %1}"; - default: - gcc_unreachable (); - } - - default: -- gcc_unreachable(); -+ gcc_unreachable (); - } ++extern __inline __m256i ++__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) + _mm256_srli_si256 (__m256i __A, const int __N) + { + return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8); } - [(set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov") -+ (set (attr "prefix") -+ (if_then_else (eq_attr "alternative" "0,1,2,3,4") -+ (const_string "orig") -+ (const_string "maybe_vex"))) - (set (attr "prefix_data16") - (if_then_else (eq_attr "mode" "V1DF") - (const_string "1") -Index: gcc/config/i386/mmx.md -=================================================================== ---- gcc/config/i386/mmx.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/mmx.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -63,6 +63,7 @@ - DONE; - }) - -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*mov_internal_rex64" - [(set (match_operand:MMXMODEI8 0 "nonimmediate_operand" - "=rm,r,!?y,!?y ,m ,!y,*Y2,x,x ,m,r,Yi") -@@ -81,8 +82,8 @@ - %vpxor\t%0, %d0 - %vmovq\t{%1, %0|%0, %1} - %vmovq\t{%1, %0|%0, %1} -- %vmovq\t{%1, %0|%0, %1} -- %vmovq\t{%1, %0|%0, %1}" -+ %vmovd\t{%1, %0|%0, %1} -+ %vmovd\t{%1, %0|%0, %1}" - [(set_attr "type" "imov,imov,mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,ssemov") - (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*") - (set_attr "prefix_rep" "*,*,*,*,*,1,1,*,1,*,*,*") -@@ -192,6 +193,7 @@ - (const_string "orig"))) - (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) - -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*movv2sf_internal_rex64" - [(set (match_operand:V2SF 0 "nonimmediate_operand" - "=rm,r ,!?y,!?y ,m ,!y,*Y2,x,x,x,m,r,Yi") + #else ++#define _mm256_bsrli_epi128(A, N) \ ++ ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8)) + #define _mm256_srli_si256(A, N) \ + ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8)) + #endif Index: gcc/config/i386/sse.md =================================================================== ---- gcc/config/i386/sse.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/sse.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -7473,9 +7473,8 @@ - "@ - # - # -- %vmov{q}\t{%1, %0|%0, %1}" -+ mov{q}\t{%1, %0|%0, %1}" - [(set_attr "type" "*,*,imov") -- (set_attr "prefix" "*,*,maybe_vex") - (set_attr "mode" "*,*,DI")]) - - (define_insn "*sse2_storeq" -@@ -7513,11 +7512,11 @@ - vmovhps\t{%1, %0|%0, %1} - vpsrldq\t{$8, %1, %0|%0, %1, 8} - vmovq\t{%H1, %0|%0, %H1} -- vmov{q}\t{%H1, %0|%0, %H1}" -+ mov{q}\t{%H1, %0|%0, %H1}" - [(set_attr "type" "ssemov,sseishft1,ssemov,imov") - (set_attr "length_immediate" "*,1,*,*") - (set_attr "memory" "*,none,*,*") -- (set_attr "prefix" "vex") -+ (set_attr "prefix" "vex,vex,vex,orig") - (set_attr "mode" "V2SF,TI,TI,DI")]) - - (define_insn "*vec_extractv2di_1_rex64" -@@ -7795,6 +7794,7 @@ - (const_string "vex"))) - (set_attr "mode" "TI,TI,TI,TI,TI,V2SF")]) - -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*vec_concatv2di_rex64_sse4_1" - [(set (match_operand:V2DI 0 "register_operand" "=x ,x ,Yi,!x,x,x,x") - (vec_concat:V2DI -@@ -7804,7 +7804,7 @@ - "@ - pinsrq\t{$0x1, %2, %0|%0, %2, 0x1} - movq\t{%1, %0|%0, %1} -- movq\t{%1, %0|%0, %1} -+ movd\t{%1, %0|%0, %1} - movq2dq\t{%1, %0|%0, %1} - punpcklqdq\t{%2, %0|%0, %2} - movlhps\t{%2, %0|%0, %2} -@@ -7815,6 +7815,7 @@ - (set_attr "length_immediate" "1,*,*,*,*,*,*") - (set_attr "mode" "TI,TI,TI,TI,TI,V4SF,V2SF")]) - -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*vec_concatv2di_rex64_sse" - [(set (match_operand:V2DI 0 "register_operand" "=Y2 ,Yi,!Y2,Y2,x,x") - (vec_concat:V2DI -@@ -7823,7 +7824,7 @@ - "TARGET_64BIT && TARGET_SSE" - "@ - movq\t{%1, %0|%0, %1} -- movq\t{%1, %0|%0, %1} -+ movd\t{%1, %0|%0, %1} - movq2dq\t{%1, %0|%0, %1} - punpcklqdq\t{%2, %0|%0, %2} - movlhps\t{%2, %0|%0, %2} -Index: gcc/config/i386/i386.c +--- gcc/config/i386/sse.md (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/i386/sse.md (.../branches/gcc-4_8-branch) (revision 220382) +@@ -7369,7 +7369,7 @@ + movss\t{%2, %0|%0, %2} + movss\t{%2, %0|%0, %2} + vmovss\t{%2, %1, %0|%0, %1, %2}" +- [(set_attr "isa" "sse2,*,noavx,noavx,avx") ++ [(set_attr "isa" "sse2,sse2,noavx,noavx,avx") + (set_attr "type" "ssemov") + (set_attr "prefix" "maybe_vex,maybe_vex,orig,orig,vex") + (set_attr "mode" "TI,TI,V4SF,SF,SF")]) +Index: gcc/config/i386/emmintrin.h =================================================================== ---- gcc/config/i386/i386.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/i386.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -14610,11 +14610,15 @@ - if (req_mode == CCZmode) - return 0; - /* FALLTHRU */ -+ case CCZmode: -+ break; -+ - case CCAmode: - case CCCmode: - case CCOmode: - case CCSmode: -- case CCZmode: -+ if (set_mode != req_mode) -+ return 0; - break; +--- gcc/config/i386/emmintrin.h (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/i386/emmintrin.h (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1143,6 +1143,18 @@ - default: -@@ -27711,10 +27715,19 @@ - break; - - case V2DImode: -- use_vec_merge = TARGET_SSE4_1; -+ use_vec_merge = TARGET_SSE4_1 && TARGET_64BIT; - if (use_vec_merge) - break; - -+ tmp = gen_reg_rtx (GET_MODE_INNER (mode)); -+ ix86_expand_vector_extract (false, tmp, target, 1 - elt); -+ if (elt == 0) -+ tmp = gen_rtx_VEC_CONCAT (mode, tmp, val); -+ else -+ tmp = gen_rtx_VEC_CONCAT (mode, val, tmp); -+ emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); -+ return; + #ifdef __OPTIMIZE__ + extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) ++_mm_bsrli_si128 (__m128i __A, const int __N) ++{ ++ return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); ++} + - case V2DFmode: - { - rtx op0, op1; -Index: gcc/config/rs6000/rs6000.c ++extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) ++_mm_bslli_si128 (__m128i __A, const int __N) ++{ ++ return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); ++} ++ ++extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) + _mm_srli_si128 (__m128i __A, const int __N) + { + return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); +@@ -1154,6 +1166,10 @@ + return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); + } + #else ++#define _mm_bsrli_si128(A, N) \ ++ ((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8)) ++#define _mm_bslli_si128(A, N) \ ++ ((__m128i)__builtin_ia32_pslldqi128 ((__m128i)(A), (int)(N) * 8)) + #define _mm_srli_si128(A, N) \ + ((__m128i)__builtin_ia32_psrldqi128 ((__m128i)(A), (int)(N) * 8)) + #define _mm_slli_si128(A, N) \ +Index: gcc/config/i386/i386.c =================================================================== ---- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -5426,10 +5426,11 @@ - - if (model == TLS_MODEL_GLOBAL_DYNAMIC) +--- gcc/config/i386/i386.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/i386/i386.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -5539,7 +5539,18 @@ + if (abi == SYSV_ABI) { -- r3 = gen_rtx_REG (Pmode, 3); - tga = rs6000_tls_get_addr (); -- emit_library_call_value (tga, dest, LCT_CONST, Pmode, 1, r3, Pmode); -+ emit_library_call_value (tga, dest, LCT_CONST, Pmode, -+ 1, const0_rtx, Pmode); - -+ r3 = gen_rtx_REG (Pmode, 3); - if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) - insn = gen_tls_gd_aix64 (r3, got, addr, tga, const0_rtx); - else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) -@@ -5446,11 +5447,12 @@ + if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype))) +- abi = MS_ABI; ++ { ++ if (TARGET_X32) ++ { ++ static bool warned = false; ++ if (!warned) ++ { ++ error ("X32 does not support ms_abi attribute"); ++ warned = true; ++ } ++ } ++ abi = MS_ABI; ++ } + } + else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype))) + abi = SYSV_ABI; +@@ -10483,6 +10494,10 @@ + if (sp_is_cfa_reg) + m->fs.cfa_offset += UNITS_PER_WORD; + RTX_FRAME_RELATED_P (insn) = 1; ++ add_reg_note (insn, REG_FRAME_RELATED_EXPR, ++ gen_rtx_SET (VOIDmode, stack_pointer_rtx, ++ plus_constant (Pmode, stack_pointer_rtx, ++ -UNITS_PER_WORD))); + } } - else if (model == TLS_MODEL_LOCAL_DYNAMIC) - { -- r3 = gen_rtx_REG (Pmode, 3); - tga = rs6000_tls_get_addr (); - tmp1 = gen_reg_rtx (Pmode); -- emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, 1, r3, Pmode); -+ emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, -+ 1, const0_rtx, Pmode); - -+ r3 = gen_rtx_REG (Pmode, 3); - if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) - insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx); - else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) -@@ -6694,7 +6696,7 @@ - - /* Nonzero if we can use an AltiVec register to pass this arg. */ - #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \ -- ((ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE)) \ -+ (ALTIVEC_OR_VSX_VECTOR_MODE (MODE) \ - && (CUM)->vregno <= ALTIVEC_ARG_MAX_REG \ - && TARGET_ALTIVEC_ABI \ - && (NAMED)) -@@ -6920,7 +6922,7 @@ - existing library interfaces. - - Doubleword align SPE vectors. -- Quadword align Altivec vectors. -+ Quadword align Altivec/VSX vectors. - Quadword align large synthetic vector types. */ - - int -@@ -6937,7 +6939,7 @@ - && int_size_in_bytes (type) >= 8 - && int_size_in_bytes (type) < 16)) - return 64; -- else if ((ALTIVEC_VECTOR_MODE (mode) || VSX_VECTOR_MODE (mode)) -+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) >= 16)) - return 128; -@@ -7082,8 +7084,7 @@ - cum->nargs_prototype--; - - if (TARGET_ALTIVEC_ABI -- && (ALTIVEC_VECTOR_MODE (mode) -- || VSX_VECTOR_MODE (mode) -+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) == 16))) - { -@@ -7677,8 +7678,7 @@ - else - return gen_rtx_REG (mode, cum->vregno); - else if (TARGET_ALTIVEC_ABI -- && (ALTIVEC_VECTOR_MODE (mode) -- || VSX_VECTOR_MODE (mode) -+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) == 16))) - { -@@ -18280,7 +18280,7 @@ - - /* Some cases that need register indexed addressing. */ - if ((TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode)) -- || (TARGET_VSX && VSX_VECTOR_MODE (mode)) -+ || (TARGET_VSX && ALTIVEC_OR_VSX_VECTOR_MODE (mode)) - || (TARGET_E500_DOUBLE && mode == DFmode) - || (TARGET_SPE_ABI - && SPE_VECTOR_MODE (mode) -@@ -25565,14 +25565,13 @@ - else if (TREE_CODE (valtype) == COMPLEX_TYPE - && targetm.calls.split_complex_arg) - return rs6000_complex_function_value (mode); -+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same -+ return register is used in both cases, and we won't see V2DImode/V2DFmode -+ for pure altivec, combine the two cases. */ - else if (TREE_CODE (valtype) == VECTOR_TYPE - && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI -- && ALTIVEC_VECTOR_MODE (mode)) -+ && ALTIVEC_OR_VSX_VECTOR_MODE (mode)) - regno = ALTIVEC_ARG_RETURN; -- else if (TREE_CODE (valtype) == VECTOR_TYPE -- && TARGET_VSX && TARGET_ALTIVEC_ABI -- && VSX_VECTOR_MODE (mode)) -- regno = ALTIVEC_ARG_RETURN; - else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT - && (mode == DFmode || mode == DCmode - || mode == TFmode || mode == TCmode)) -@@ -25611,12 +25610,12 @@ - && TARGET_HARD_FLOAT && TARGET_FPRS - && ((TARGET_SINGLE_FLOAT && mode == SFmode) || TARGET_DOUBLE_FLOAT)) - regno = FP_ARG_RETURN; -- else if (ALTIVEC_VECTOR_MODE (mode) -+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same -+ return register is used in both cases, and we won't see V2DImode/V2DFmode -+ for pure altivec, combine the two cases. */ -+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI) - regno = ALTIVEC_ARG_RETURN; -- else if (VSX_VECTOR_MODE (mode) -- && TARGET_VSX && TARGET_ALTIVEC_ABI) -- regno = ALTIVEC_ARG_RETURN; - else if (COMPLEX_MODE_P (mode) && targetm.calls.split_complex_arg) - return rs6000_complex_function_value (mode); - else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT - -Zmiany atrybutów dla: gcc/config/rs6000/rs6000.c -___________________________________________________________________ -Dodane: svn:mergeinfo - Połączono zmiany /trunk/gcc/config/rs6000/rs6000.c:r162404,173624 - -Index: gcc/config/rs6000/rs6000.h -=================================================================== ---- gcc/config/rs6000/rs6000.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/rs6000/rs6000.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1038,10 +1038,9 @@ - - /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate - enough space to account for vectors in FP regs. */ --#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ -- (TARGET_VSX \ -- && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE) \ -- || ALTIVEC_VECTOR_MODE (MODE)) \ -+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ -+ (TARGET_VSX \ -+ && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ - && FP_REGNO_P (REGNO) \ - ? V2DFmode \ - : choose_hard_reg_mode ((REGNO), (NREGS), false)) -@@ -1057,25 +1056,16 @@ - ((MODE) == V4SFmode \ - || (MODE) == V2DFmode) \ - --#define VSX_SCALAR_MODE(MODE) \ -- ((MODE) == DFmode) -- --#define VSX_MODE(MODE) \ -- (VSX_VECTOR_MODE (MODE) \ -- || VSX_SCALAR_MODE (MODE)) -- --#define VSX_MOVE_MODE(MODE) \ -- (VSX_VECTOR_MODE (MODE) \ -- || VSX_SCALAR_MODE (MODE) \ -- || ALTIVEC_VECTOR_MODE (MODE) \ -- || (MODE) == TImode) -- - #define ALTIVEC_VECTOR_MODE(MODE) \ - ((MODE) == V16QImode \ - || (MODE) == V8HImode \ - || (MODE) == V4SFmode \ - || (MODE) == V4SImode) - -+#define ALTIVEC_OR_VSX_VECTOR_MODE(MODE) \ -+ (ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE) \ -+ || (MODE) == V2DImode) -+ - #define SPE_VECTOR_MODE(MODE) \ - ((MODE) == V4HImode \ - || (MODE) == V2SFmode \ -@@ -1118,10 +1108,10 @@ - ? ALTIVEC_VECTOR_MODE (MODE2) \ - : ALTIVEC_VECTOR_MODE (MODE2) \ - ? ALTIVEC_VECTOR_MODE (MODE1) \ -- : VSX_VECTOR_MODE (MODE1) \ -- ? VSX_VECTOR_MODE (MODE2) \ -- : VSX_VECTOR_MODE (MODE2) \ -- ? VSX_VECTOR_MODE (MODE1) \ -+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \ -+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \ -+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \ -+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \ - : 1) - - /* Post-reload, we can't use any new AltiVec registers, as we already - -Zmiany atrybutów dla: gcc/config/rs6000/rs6000.h -___________________________________________________________________ -Dodane: svn:mergeinfo - Połączono zmiany /trunk/gcc/config/rs6000/rs6000.h:r162404,173624 - -Index: gcc/config/arm/arm.c -=================================================================== ---- gcc/config/arm/arm.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/arm/arm.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -18237,7 +18237,7 @@ - rtx tmp1 = gen_reg_rtx (mode); - rtx tmp2 = gen_reg_rtx (mode); - -- emit_insn (intfn (tmp1, op1, tmp2, op2)); -+ emit_insn (intfn (tmp1, op1, op2, tmp2)); - - emit_move_insn (mem, tmp1); - mem = adjust_address (mem, mode, GET_MODE_SIZE (mode)); -Index: gcc/config/arm/neon.md -=================================================================== ---- gcc/config/arm/neon.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/arm/neon.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -680,7 +680,7 @@ - (match_operand:SI 2 "immediate_operand" "i")))] - "TARGET_NEON" - { -- int elt = ffs ((int) INTVAL (operands[2]) - 1); -+ int elt = ffs ((int) INTVAL (operands[2])) - 1; - if (BYTES_BIG_ENDIAN) - elt = GET_MODE_NUNITS (mode) - 1 - elt; - operands[2] = GEN_INT (elt); -@@ -3895,13 +3895,14 @@ - - (define_insn "neon_vtrn_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -- UNSPEC_VTRN1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VTRN2))] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] -+ UNSPEC_VTRN1)) -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VTRN2))] - "TARGET_NEON" -- "vtrn.\t%0, %2" -+ "vtrn.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -@@ -3921,13 +3922,14 @@ - - (define_insn "neon_vzip_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -- UNSPEC_VZIP1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VZIP2))] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] -+ UNSPEC_VZIP1)) -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VZIP2))] - "TARGET_NEON" -- "vzip.\t%0, %2" -+ "vzip.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -@@ -3947,13 +3949,14 @@ - - (define_insn "neon_vuzp_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] - UNSPEC_VUZP1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VUZP2))] -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VUZP2))] - "TARGET_NEON" -- "vuzp.\t%0, %2" -+ "vuzp.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -Index: gcc/config/pa/predicates.md -=================================================================== ---- gcc/config/pa/predicates.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/predicates.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -411,12 +411,16 @@ - - ;; True iff depi can be used to compute (reg | OP). - --(define_predicate "ior_operand" -- (match_code "const_int") --{ -- return (GET_CODE (op) == CONST_INT && ior_mask_p (INTVAL (op))); --}) -+(define_predicate "cint_ior_operand" -+ (and (match_code "const_int") -+ (match_test "ior_mask_p (INTVAL (op))"))) - -+;; True iff OP can be used to compute (reg | OP). -+ -+(define_predicate "reg_or_cint_ior_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "cint_ior_operand"))) -+ - ;; True iff OP is a CONST_INT of the forms 0...0xxxx or - ;; 0...01...1xxxx. Such values can be the left hand side x in (x << - ;; r), using the zvdepi instruction. -Index: gcc/config/pa/pa.md -=================================================================== ---- gcc/config/pa/pa.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/pa.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -5686,7 +5686,7 @@ - (define_expand "iordi3" - [(set (match_operand:DI 0 "register_operand" "") - (ior:DI (match_operand:DI 1 "register_operand" "") -- (match_operand:DI 2 "ior_operand" "")))] -+ (match_operand:DI 2 "reg_or_cint_ior_operand" "")))] - "" - " - { -@@ -5707,7 +5707,7 @@ - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI (match_operand:DI 1 "register_operand" "0,0") -- (match_operand:DI 2 "ior_operand" "M,i")))] -+ (match_operand:DI 2 "cint_ior_operand" "M,i")))] - "TARGET_64BIT" - "* return output_64bit_ior (operands); " - [(set_attr "type" "binary,shift") -@@ -5726,19 +5726,14 @@ - (define_expand "iorsi3" - [(set (match_operand:SI 0 "register_operand" "") - (ior:SI (match_operand:SI 1 "register_operand" "") -- (match_operand:SI 2 "arith32_operand" "")))] -+ (match_operand:SI 2 "reg_or_cint_ior_operand" "")))] - "" -- " --{ -- if (! (ior_operand (operands[2], SImode) -- || register_operand (operands[2], SImode))) -- operands[2] = force_reg (SImode, operands[2]); --}") -+ "") - - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (match_operand:SI 1 "register_operand" "0,0") -- (match_operand:SI 2 "ior_operand" "M,i")))] -+ (match_operand:SI 2 "cint_ior_operand" "M,i")))] - "" - "* return output_ior (operands); " - [(set_attr "type" "binary,shift") -Index: gcc/config/pa/pa-protos.h -=================================================================== ---- gcc/config/pa/pa-protos.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/pa-protos.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -79,7 +79,6 @@ - extern int prefetch_cc_operand (rtx, enum machine_mode); - extern int prefetch_nocc_operand (rtx, enum machine_mode); - extern int and_operand (rtx, enum machine_mode); --extern int ior_operand (rtx, enum machine_mode); - extern int arith32_operand (rtx, enum machine_mode); - extern int uint32_operand (rtx, enum machine_mode); - extern int reg_before_reload_operand (rtx, enum machine_mode); -@@ -94,7 +93,6 @@ - extern int fmpyaddoperands (rtx *); - extern int fmpysuboperands (rtx *); - extern int call_operand_address (rtx, enum machine_mode); --extern int ior_operand (rtx, enum machine_mode); - extern void emit_bcond_fp (rtx[]); - extern int emit_move_sequence (rtx *, enum machine_mode, rtx); - extern int emit_hpdiv_const (rtx *, int); -Index: libffi/src/alpha/osf.S -=================================================================== ---- libffi/src/alpha/osf.S (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libffi/src/alpha/osf.S (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,5 +1,5 @@ - /* ----------------------------------------------------------------------- -- osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat -+ osf.S - Copyright (c) 1998, 2001, 2007, 2008, 2011 Red Hat - - Alpha/OSF Foreign Function Interface -@@ -299,33 +299,51 @@ - #endif +@@ -10496,6 +10511,10 @@ + if (sp_is_cfa_reg) + m->fs.cfa_offset += UNITS_PER_WORD; + RTX_FRAME_RELATED_P (insn) = 1; ++ add_reg_note (insn, REG_FRAME_RELATED_EXPR, ++ gen_rtx_SET (VOIDmode, stack_pointer_rtx, ++ plus_constant (Pmode, stack_pointer_rtx, ++ -UNITS_PER_WORD))); + } + } - #ifdef __ELF__ -+# define UA_SI .4byte -+# define FDE_ENCODING 0x1b /* pcrel sdata4 */ -+# define FDE_ENCODE(X) .4byte X-. -+# define FDE_ARANGE(X) .4byte X -+#elif defined __osf__ -+# define UA_SI .align 0; .long -+# define FDE_ENCODING 0x50 /* aligned absolute */ -+# define FDE_ENCODE(X) .align 3; .quad X -+# define FDE_ARANGE(X) .align 0; .quad X -+#endif -+ -+#ifdef __ELF__ - .section .eh_frame,EH_FRAME_FLAGS,@progbits -+#elif defined __osf__ -+ .data -+ .align 3 -+ .globl _GLOBAL__F_ffi_call_osf -+_GLOBAL__F_ffi_call_osf: -+#endif - __FRAME_BEGIN__: -- .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry -+ UA_SI $LECIE1-$LSCIE1 # Length of Common Information Entry - $LSCIE1: -- .4byte 0x0 # CIE Identifier Tag -+ UA_SI 0x0 # CIE Identifier Tag - .byte 0x1 # CIE Version - .ascii "zR\0" # CIE Augmentation - .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor - .byte 0x78 # sleb128 -8; CIE Data Alignment Factor - .byte 26 # CIE RA Column - .byte 0x1 # uleb128 0x1; Augmentation size -- .byte 0x1b # FDE Encoding (pcrel sdata4) -+ .byte FDE_ENCODING # FDE Encoding - .byte 0xc # DW_CFA_def_cfa - .byte 30 # uleb128 column 30 - .byte 0 # uleb128 offset 0 - .align 3 - $LECIE1: - $LSFDE1: -- .4byte $LEFDE1-$LASFDE1 # FDE Length -+ UA_SI $LEFDE1-$LASFDE1 # FDE Length - $LASFDE1: -- .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset -- .4byte $LFB1-. # FDE initial location -- .4byte $LFE1-$LFB1 # FDE address range -+ UA_SI $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset -+ FDE_ENCODE($LFB1) # FDE initial location -+ FDE_ARANGE($LFE1-$LFB1) # FDE address range - .byte 0x0 # uleb128 0x0; Augmentation size - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI1-$LFB1 -+ UA_SI $LCFI1-$LFB1 - .byte 0x9a # DW_CFA_offset, column 26 - .byte 4 # uleb128 4*-8 - .byte 0x8f # DW_CFA_offset, column 15 -@@ -335,32 +353,35 @@ - .byte 32 # uleb128 offset 32 - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI2-$LCFI1 -+ UA_SI $LCFI2-$LCFI1 - .byte 0xda # DW_CFA_restore, column 26 - .align 3 - $LEFDE1: - - $LSFDE3: -- .4byte $LEFDE3-$LASFDE3 # FDE Length -+ UA_SI $LEFDE3-$LASFDE3 # FDE Length - $LASFDE3: -- .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset -- .4byte $LFB2-. # FDE initial location -- .4byte $LFE2-$LFB2 # FDE address range -+ UA_SI $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset -+ FDE_ENCODE($LFB2) # FDE initial location -+ FDE_ARANGE($LFE2-$LFB2) # FDE address range - .byte 0x0 # uleb128 0x0; Augmentation size - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI5-$LFB2 -+ UA_SI $LCFI5-$LFB2 - .byte 0xe # DW_CFA_def_cfa_offset - .byte 0x80,0x1 # uleb128 128 - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI6-$LCFI5 -+ UA_SI $LCFI6-$LCFI5 - .byte 0x9a # DW_CFA_offset, column 26 - .byte 16 # uleb128 offset 16*-8 - .align 3 - $LEFDE3: -+#if defined __osf__ -+ .align 0 -+ .long 0 # End of Table -+#endif - --#ifdef __linux__ -+#if defined __ELF__ && defined __linux__ - .section .note.GNU-stack,"",@progbits - #endif --#endif -Index: libffi/ChangeLog +Index: gcc/config/rs6000/rs6000-cpus.def =================================================================== ---- libffi/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libffi/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,13 @@ -+2011-05-02 Rainer Orth -+ -+ Backport from mainline: -+ 2011-04-29 Rainer Orth -+ -+ * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE): -+ Define. -+ Use them to handle ELF vs. ECOFF differences. -+ [__osf__] (_GLOBAL__F_ffi_call_osf): Define. +--- gcc/config/rs6000/rs6000-cpus.def (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/rs6000/rs6000-cpus.def (.../branches/gcc-4_8-branch) (revision 220382) +@@ -91,6 +91,7 @@ + | OPTION_MASK_PPC_GFXOPT \ + | OPTION_MASK_PPC_GPOPT \ + | OPTION_MASK_QUAD_MEMORY \ ++ | OPTION_MASK_QUAD_MEMORY_ATOMIC \ + | OPTION_MASK_RECIP_PRECISION \ + | OPTION_MASK_SOFT_FLOAT \ + | OPTION_MASK_STRICT_ALIGN_OPTIONAL \ +Index: gcc/config/rs6000/rs6000.c +=================================================================== +--- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch) (revision 220382) +@@ -32628,6 +32628,14 @@ + if (complement_op2_p) + op2 = gen_rtx_NOT (mode, op2); + ++ /* For canonical RTL, if only one arm is inverted it is the first. */ ++ if (!complement_op1_p && complement_op2_p) ++ { ++ rtx temp = op1; ++ op1 = op2; ++ op2 = temp; ++ } + - 2011-04-28 Release Manager - - * GCC 4.5.3 released. + bool_rtx = ((code == NOT) + ? gen_rtx_NOT (mode, op1) + : gen_rtx_fmt_ee (code, mode, op1, op2)); +Index: gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch) (revision 220382) +@@ -8622,8 +8622,8 @@ + [(set (match_operand:BOOL_128 0 "vlogical_operand" "=") + (match_operator:BOOL_128 3 "boolean_operator" + [(not:BOOL_128 +- (match_operand:BOOL_128 2 "vlogical_operand" "")) +- (match_operand:BOOL_128 1 "vlogical_operand" "")]))] ++ (match_operand:BOOL_128 2 "vlogical_operand" "")) ++ (match_operand:BOOL_128 1 "vlogical_operand" "")]))] + "TARGET_P8_VECTOR || (GET_CODE (operands[3]) == AND)" + { + if (TARGET_VSX && vsx_register_operand (operands[0], mode)) +@@ -8638,7 +8638,7 @@ + && reload_completed && int_reg_operand (operands[0], mode)" + [(const_int 0)] + { +- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false, ++ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true, + NULL_RTX); + DONE; + } +@@ -8660,14 +8660,14 @@ + [(set (match_operand:TI2 0 "int_reg_operand" "=&r,r,r") + (match_operator:TI2 3 "boolean_operator" + [(not:TI2 +- (match_operand:TI2 1 "int_reg_operand" "r,0,r")) +- (match_operand:TI2 2 "int_reg_operand" "r,r,0")]))] ++ (match_operand:TI2 2 "int_reg_operand" "r,0,r")) ++ (match_operand:TI2 1 "int_reg_operand" "r,r,0")]))] + "!TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)" + "#" + "reload_completed && !TARGET_P8_VECTOR && (GET_CODE (operands[3]) != AND)" + [(const_int 0)] + { +- rs6000_split_logical (operands, GET_CODE (operands[3]), false, true, false, ++ rs6000_split_logical (operands, GET_CODE (operands[3]), false, false, true, + NULL_RTX); + DONE; + } +Index: gcc/config/arm/arm.h +=================================================================== +--- gcc/config/arm/arm.h (.../tags/gcc_4_8_4_release) (revision 220382) ++++ gcc/config/arm/arm.h (.../branches/gcc-4_8-branch) (revision 220382) +@@ -63,8 +63,8 @@ + builtin_define_with_int_value ( \ + "__ARM_SIZEOF_MINIMAL_ENUM", \ + flag_short_enums ? 1 : 4); \ +- builtin_define_with_int_value ( \ +- "__ARM_SIZEOF_WCHAR_T", WCHAR_TYPE_SIZE); \ ++ builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T", \ ++ wchar_type_node); \ + if (TARGET_ARM_ARCH_PROFILE) \ + builtin_define_with_int_value ( \ + "__ARM_ARCH_PROFILE", TARGET_ARM_ARCH_PROFILE); \