X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=gcc-branch.diff;h=265c185214edc977d3aeacfd24d96ac999184960;hb=3d2a3a3edd0ecef834559766acd3df89236ba61f;hp=6dc898c8f92f676c8b98a802fcb560db20b24a4f;hpb=e64e20ed3d69b53dffda5dfc97eaaa3f9de78dde;p=packages%2Fgcc.git diff --git a/gcc-branch.diff b/gcc-branch.diff index 6dc898c..265c185 100644 --- a/gcc-branch.diff +++ b/gcc-branch.diff @@ -1,2149 +1,2685 @@ -Index: libstdc++-v3/ChangeLog +Index: libquadmath/configure =================================================================== ---- libstdc++-v3/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,20 @@ -+2013-04-15 Jack Howarth -+ -+ Backport from mainline -+ -+ 2012-10-10 Jack Howarth -+ Jonathan Wakely -+ -+ PR libstdc++/54847 -+ * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP -+ and _GLIBCXX_USE_SCHED_YIELD. -+ * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment. -+ -+2013-04-15 Rainer Orth +--- 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 + +- +-# 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 + -+ * testsuite/30_threads/condition_variable/members/53841.cc: Add -+ -std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*. ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. + - 2013-04-11 Release Manager + 2014-12-19 Release Manager - * GCC 4.7.3 released. -Index: libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc + * GCC 4.8.4 released. +Index: libquadmath/configure.ac =================================================================== ---- libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,5 +1,5 @@ - // { dg-do compile } --// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } } -+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } } - // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } - // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } - // { dg-require-cstdint "" } -Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h -=================================================================== ---- libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -42,4 +42,9 @@ - // Static initializer macro is buggy in darwin, see libstdc++/51906 - #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC - -+// Configure checks for nanosleep fail on Darwin, but nanosleep and -+// sched_yield are always available, so use them. -+#define _GLIBCXX_USE_NANOSLEEP 1 -+#define _GLIBCXX_USE_SCHED_YIELD 1 +--- 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 + ++AM_ENABLE_MULTILIB(, ..) + - #endif -Index: libstdc++-v3/acinclude.m4 -=================================================================== ---- libstdc++-v3/acinclude.m4 (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/acinclude.m4 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1132,6 +1132,11 @@ - dnl --disable-libstdcxx-time - dnl disables the checks completely - dnl -+dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX -+dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test -+dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in -+dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD. -+dnl - AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ - - AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) -Index: libgcc/ChangeLog -=================================================================== ---- libgcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,10 @@ -+2013-04-11 Julian Brown -+ -+ * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS) -+ (SUBWORD_TEST_AND_SET): Use signed char/short types instead of -+ unsigned char/unsigned short. -+ (__sync_val_compare_and_swap_{1,2}): Handle signed argument. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: libgcc/config/arm/linux-atomic.c -=================================================================== ---- libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -97,19 +97,19 @@ - return (RETURN & mask) >> shift; \ - } - --SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval) -+SUBWORD_SYNC_OP (add, , +, short, 2, oldval) -+SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) -+SUBWORD_SYNC_OP (or, , |, short, 2, oldval) -+SUBWORD_SYNC_OP (and, , &, short, 2, oldval) -+SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) -+SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) - --SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval) -+SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval) -+SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval) -+SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval) -+SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval) -+SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval) -+SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval) - - #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ - int HIDDEN \ -@@ -132,19 +132,19 @@ - OP_AND_FETCH_WORD (xor, , ^) - OP_AND_FETCH_WORD (nand, ~, &) - --SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval) --SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval) --SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval) --SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval) --SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval) -+SUBWORD_SYNC_OP (add, , +, short, 2, newval) -+SUBWORD_SYNC_OP (sub, , -, short, 2, newval) -+SUBWORD_SYNC_OP (or, , |, short, 2, newval) -+SUBWORD_SYNC_OP (and, , &, short, 2, newval) -+SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) -+SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) - --SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval) --SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval) --SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval) --SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval) --SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval) -+SUBWORD_SYNC_OP (add, , +, signed char, 1, newval) -+SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval) -+SUBWORD_SYNC_OP (or, , |, signed char, 1, newval) -+SUBWORD_SYNC_OP (and, , &, signed char, 1, newval) -+SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval) -+SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval) - - int HIDDEN - __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) -@@ -181,7 +181,7 @@ - actual_oldval = *wordptr; \ - \ - if (__builtin_expect (((actual_oldval & mask) >> shift) != \ -- (unsigned int) oldval, 0)) \ -+ ((unsigned int) oldval & MASK_##WIDTH), 0)) \ - return (actual_oldval & mask) >> shift; \ - \ - actual_newval = (actual_oldval & ~mask) \ -@@ -195,8 +195,8 @@ - } \ - } - --SUBWORD_VAL_CAS (unsigned short, 2) --SUBWORD_VAL_CAS (unsigned char, 1) -+SUBWORD_VAL_CAS (short, 2) -+SUBWORD_VAL_CAS (signed char, 1) - - typedef unsigned char bool; - -@@ -217,8 +217,8 @@ - return (oldval == actual_oldval); \ - } - --SUBWORD_BOOL_CAS (unsigned short, 2) --SUBWORD_BOOL_CAS (unsigned char, 1) -+SUBWORD_BOOL_CAS (short, 2) -+SUBWORD_BOOL_CAS (signed char, 1) - - void HIDDEN - __sync_synchronize (void) -@@ -260,8 +260,8 @@ - return (oldval & mask) >> shift; \ - } - --SUBWORD_TEST_AND_SET (unsigned short, 2) --SUBWORD_TEST_AND_SET (unsigned char, 1) -+SUBWORD_TEST_AND_SET (short, 2) -+SUBWORD_TEST_AND_SET (signed char, 1) - - #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ - void HIDDEN \ -Index: gcc/doc/tm.texi -=================================================================== ---- gcc/doc/tm.texi (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/doc/tm.texi (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9495,6 +9495,10 @@ - True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. - @end deftypevr - -+@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR -+True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information. -+@end deftypevr -+ - @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2 - True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg. - @end deftypevr -Index: gcc/doc/tm.texi.in -=================================================================== ---- gcc/doc/tm.texi.in (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/doc/tm.texi.in (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9388,6 +9388,8 @@ - - @hook TARGET_WANT_DEBUG_PUB_SECTIONS - -+@hook TARGET_FORCE_AT_COMP_DIR -+ - @hook TARGET_DELAY_SCHED2 - - @hook TARGET_DELAY_VARTRACK -Index: gcc/target.def -=================================================================== ---- gcc/target.def (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/target.def (.../branches/gcc-4_7-branch) (revision 198690) -@@ -2758,6 +2758,13 @@ - bool, false) - - DEFHOOKPOD -+(force_at_comp_dir, -+ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \ -+ compilation unit. This attribute is required for the darwin linker \ -+ to emit debug information.", -+ bool, false) -+ -+DEFHOOKPOD - (delay_sched2, "True if sched2 is not to be run at its normal place. \ - This usually means it will be run as part of machine-specific reorg.", - bool, false) -Index: gcc/DATESTAMP -=================================================================== ---- gcc/DATESTAMP (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1 +1 @@ --20130411 -+20130507 -Index: gcc/builtins.c -=================================================================== ---- gcc/builtins.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/builtins.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9692,7 +9692,16 @@ - case rvc_inf: - /* If arg is Inf or NaN and we're logb, return it. */ - if (TREE_CODE (rettype) == REAL_TYPE) -- return fold_convert_loc (loc, rettype, arg); -+ { -+ /* For logb(-Inf) we have to return +Inf. */ -+ if (real_isinf (value) && real_isneg (value)) -+ { -+ REAL_VALUE_TYPE tem; -+ real_inf (&tem); -+ return build_real (rettype, tem); -+ } -+ return fold_convert_loc (loc, rettype, arg); -+ } - /* Fall through... */ - case rvc_zero: - /* Zero may set errno and/or raise an exception for logb, also -Index: gcc/ChangeLog + target_alias=${target_alias-$host_alias} + AC_SUBST(target_alias) + +@@ -60,7 +62,6 @@ + AC_SUBST(enable_static) + + AM_MAINTAINER_MODE +-AM_ENABLE_MULTILIB(, ..) + + AC_LANG_C + # The same as in boehm-gc and libstdc++. Have to borrow it from there. +Index: libsanitizer/configure =================================================================== ---- gcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,115 @@ -+2013-05-03 Marek Polacek -+ -+ Backport from mainline -+ 2013-04-25 Marek Polacek +--- 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 + -+ PR tree-optimization/57066 -+ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. + -+2013-04-30 Uros Bizjak ++# 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 + -+ Backport from mainline -+ 2013-04-29 Uros Bizjak ++ac_config_commands="$ac_config_commands default-1" + -+ PR target/44578 -+ * config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y -+ alternative. -+ (*zero_extendsidi2): Ditto. + -+ Backport from mainline -+ 2013-04-29 Uros Bizjak -+ -+ PR target/57098 -+ * config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory. + { $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 @@ + + + +-# 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 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 + -+2013-04-29 Christian Bruel ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. + -+ PR target/57108 -+ * sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0. + 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) + { + __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 +=================================================================== +--- 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 + -+2013-04-27 Jakub Jelinek ++ PR libstdc++/60966 ++ * include/std/future (packaged_task::operator()): Increment the ++ reference count on the shared state until the function returns. + -+ PR target/56866 -+ * config/i386/sse.md (xop_rotr3): Fix up computation of -+ the immediate rotate count. + 2014-12-19 Release Manager + + * GCC 4.8.4 released. +Index: libatomic/fop_n.c +=================================================================== +--- 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 + -+2013-04-21 Eric Botcazou ++ * fop_n.c (libat_fetch_op): Align address to word boundary. ++ (libat_op_fetch): Likewise. + -+ * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism. + 2014-12-19 Release Manager + + * 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 + -+2013-04-19 Matthias Klose ++ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. ++ * configure: Regenerate. + -+ PR middle-end/56848 -+ Re-apply -+ 2013-04-01 Andrey Belevantsev + 2014-12-19 Release Manager + + * 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/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 -+ 2013-02-25 Andrey Belevantsev -+ Alexander Monakov ++ 2014-06-23 Marek Polacek + -+ PR middle-end/56077 -+ * sched-deps.c (sched_analyze_insn): When reg_pending_barrier, -+ flush pending lists also on non-jumps. Adjust comment. ++ PR c/61553 ++ * c-common.c (get_atomic_generic_size): Don't segfault if the ++ type doesn't have a size. + -+ Backport from 4.8: -+ 2012-08-27 Maxim Kuvyrkov + 2014-12-19 Release Manager + + * 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 + -+ * sched-deps.c (add_dependence_list_and_free): Simplify. -+ (flush_pending_list_and_free): Fix a hack that was fixing a hack. Free -+ lists when add_dependence_list_and_free doesn't free them. ++ Backported from mainline ++ 2015-01-27 Jakub Jelinek + -+2013-04-19 Marek Polacek ++ PR c/64766 ++ * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL ++ of FUNCTION_DECLs with error_mark_node. + -+ Backport from mainline -+ 2013-01-08 Steven Bosscher -+ Jakub Jelinek -+ -+ PR tree-optimization/48189 -+ * predict.c (predict_loops): If max is 0, don't call compare_tree_int. -+ If nitercst is 0, don't predict the exit edge. + 2014-12-19 Release Manager + + * 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; + -+2013-04-16 Jack Howarth ++ return false; ++ } + -+ Backport from mainline -+ 2012-05-29 Jack Howarth -+ * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o -+ on Darwin >= 12. -+ (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12. + /* 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_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_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 ++ 2015-01-27 Jakub Jelinek + -+ 2012-05-29 Jack Howarth -+ PR debug/53453 -+ * doc/tm.texi: Update. -+ * doc/tm.texi.in (SDB and DWARF) : Add @hook. -+ * target.def (force_at_comp_dir): New hook. -+ * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define. -+ * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir. ++ PR rtl-optimization/61058 ++ * jump.c (cleanup_barriers): Update basic block boundaries ++ if BLOCK_FOR_INSN is non-NULL on PREV. + -+2013-04-15 Eric Botcazou ++ 2013-04-16 Steven Bosscher + -+ PR target/56890 -+ * config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value. -+ (S_MODES): Set H_MODE bit. -+ (SF_MODES): Set only S_MODE and SF_MODE bits. -+ (DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits. -+ (sparc_init_modes) : Set H_MODE bit for sub-word modes. -+ : Do not set SF_MODE for sub-word modes. -+ : Likewise. ++ 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. + -+2013-04-13 John David Anglin ++ 2015-01-26 Jakub Jelinek + -+ Backport from mainline: -+ 2013-04-06 John David Anglin ++ * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add ++ OPTION_MASK_QUAD_MEMORY_ATOMIC. + -+ PR target/55487 -+ * config/pa/pa.c (legitimize_pic_address): Before incrementing label -+ nuses, make sure we have a label. ++ 2015-01-12 Jakub Jelinek + -+2013-04-11 Richard Biener ++ PR tree-optimization/64563 ++ * tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE ++ instead of != VR_VARYING. + -+ * BASE-VER: Set to 4.7.4. -+ * DEV-PHASE: Set to prerelease. ++ PR target/64513 ++ * config/i386/i386.c (ix86_expand_prologue): Add ++ REG_FRAME_RELATED_EXPR to %rax and %r10 pushes. + - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/testsuite/gcc.target/i386/pr44578.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr44578.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr44578.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,31 @@ -+/* { dg-do run } */ -+/* { dg-options "-O2 -mtune=athlon64" } */ ++2015-01-29 Ilya Tocar + -+extern void abort (void); ++ * config/i386/avx2intrin.h (_mm256_bslli_epi128, ++ _mm256_bsrli_epi128): New. ++ * config/i386/emmintrin.h (_mm_bsrli_si128, _mm_bslli_si128): Ditto. + -+long double -+__attribute__((noinline, noclone)) -+test (float num) -+{ -+ unsigned int i; ++2015-01-27 Mikael Pettersson + -+ if (num < 0.0) -+ num = 0.0; ++ Backport from mainline + -+ __builtin_memcpy (&i, &num, sizeof(unsigned int)); ++ 2013-09-20 Bernd Edlinger + -+ return (long double)(unsigned long long) i; -+} ++ PR middle-end/57748 ++ * expr.c (expand_assignment): Remove misalignp code path. + -+int -+main () -+{ -+ long double x; ++ 2014-01-08 Bernd Edlinger + -+ x = test (0.0); ++ 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. + -+ if (x != 0.0) -+ abort (); ++2015-01-26 Uros Bizjak + -+ return 0; -+} -Index: gcc/testsuite/gcc.target/i386/pr56866.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,16 @@ -+/* PR target/56866 */ -+/* { dg-do run } */ -+/* { dg-require-effective-target xop } */ -+/* { dg-options "-O3 -mxop" } */ ++ Backport from mainline ++ 2015-01-26 Uros Bizjak + -+#define main xop_test_main -+#include "../../gcc.c-torture/execute/pr56866.c" -+#undef main ++ PR target/64795 ++ * config/i386/i386.md (*movdi_internal): Also check operand 0 ++ to determine TYPE_LEA operand. ++ (*movsi_internal): Ditto. + -+#include "xop-check.h" ++ Backport from mainline ++ 2015-01-23 Uros Bizjak + -+static void -+xop_test (void) -+{ -+ xop_test_main (); -+} -Index: gcc/testsuite/gcc.target/i386/pr57098.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr57098.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr57098.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,10 @@ -+/* { dg-do compile } */ -+/* { dg-require-effective-target lp64 } */ -+/* { dg-options "-msse4 -mcmodel=large" } */ ++ * config/i386/sse.md (sse2_loadld): Set attribute isa to sse2 for ++ alternative 1. + -+typedef int V __attribute__((vector_size(16))); ++2015-01-15 Martin Liska + -+void foo (V *p, V *mask) -+{ -+ *p = __builtin_shuffle (*p, *mask); -+} -Index: gcc/testsuite/gcc.target/sh/pr57108.c -=================================================================== ---- gcc/testsuite/gcc.target/sh/pr57108.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/sh/pr57108.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,19 @@ -+/* { dg-do compile { target "sh*-*-*" } } */ -+/* { dg-options "-O1" } */ ++ Backport from mainline ++ 2014-11-27 Richard Biener + -+void __assert_func (void) __attribute__ ((__noreturn__)) ; ++ PR middle-end/63704 ++ * alias.c (mems_in_disjoint_alias_sets_p): Remove assert ++ and instead return false when !fstrict-aliasing. + -+void ATATransfer (int num, int buffer) -+{ -+ int wordCount; ++2015-01-14 Renlin Li + -+ while (num > 0) -+ { -+ wordCount = num * 512 / sizeof (int); ++ Backport form mainline ++ 2014-08-12 Ramana Radhakrishnan + -+ ((0 == (buffer & 63)) ? (void)0 : __assert_func () ); -+ ((0 == (wordCount & 31)) ? (void)0 : __assert_func ()); -+ } ++ PR target/61413 ++ * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix definition ++ of __ARM_SIZEOF_WCHAR_T. + ++2015-01-13 Pat Haugen + -+ } -Index: gcc/testsuite/gfortran.dg/size_kind_3.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,11 @@ -+! { dg-do compile } -+! -+! PR fortran/57142 -+! -+integer :: B(huge(1)+3_8,2_8) -+integer(8) :: var1(2), var2, var3 ++ Backport from mainline ++ 2014-12-20 Segher Boessenkool + -+var1 = shape(B) ! { dg-error "SHAPE overflows its kind" } -+var2 = size(B) ! { dg-error "SIZE overflows its kind" } -+var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" } -+end -Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,44 @@ -+! { dg-do compile } -+! { dg-options "-Wall" } -+ -+! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays -+! Contributed by William Clodius -+ -+subroutine transfers (test) -+ -+ use, intrinsic :: iso_fortran_env -+ -+ integer, intent(in) :: test -+ -+ integer(int8) :: test8(8) = 0 -+ integer(int16) :: test16(4) = 0 -+ integer(int32) :: test32(2) = 0 -+ integer(int64) :: test64 = 0 -+ -+ select case(test) -+ case(0) -+ test64 = transfer(test8, test64) -+ case(1) -+ test64 = transfer(test16, test64) -+ case(2) -+ test64 = transfer(test32, test64) -+ case(3) -+ test8 = transfer(test64, test8, 8) -+ case(4) -+ test16 = transfer(test64, test16, 4) -+ case(5) -+ test32 = transfer(test64, test32, 2) -+ end select -+ -+end subroutine -+ -+ -+! PR 53685: surprising warns about transfer with explicit character range -+! Contributed by Jos de Kloe -+ -+subroutine mytest(byte_array,val) -+ integer, parameter :: r8_ = Selected_Real_Kind(15,307) ! = real*8 -+ character(len=1), dimension(16), intent(in) :: byte_array -+ real(r8_),intent(out) :: val -+ val = transfer(byte_array(1:8),val) -+end subroutine -Index: gcc/testsuite/gfortran.dg/namelist_77.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_77.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_77.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,49 @@ -+! { dg-do run } -+! -+! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name -+! Test case derived from PR. ++ 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]. + -+module local_mod ++2015-01-13 Oleg Endo + -+ type mytype1 -+ integer :: int1 -+ end type ++ Backport form mainline ++ 2015-01-13 Oleg Endo + -+ type mytype2 -+ integer :: n_x -+ integer :: n_px -+ end type ++ PR target/64479 ++ * rtlanal.c (set_reg_p): Handle SEQUENCE constructs. + -+ type beam_init_struct -+ character(16) :: chars(1) = '' -+ type (mytype1) dummy -+ type (mytype2) grid(1) -+ end type ++2014-12-27 H.J. Lu + -+end module ++ Backport from mainline: ++ 2014-12-27 H.J. Lu + -+program error_namelist ++ PR target/64409 ++ * config/i386/i386.c (ix86_function_type_abi): Issue an error ++ when ms_abi attribute is used with x32. + -+ use local_mod ++2014-12-19 H.J. Lu + -+ implicit none ++ Backported from mainline ++ 2014-12-14 H.J. Lu + -+ type (beam_init_struct) beam_init ++ PR rtl-optimization/64037 ++ * combine.c (setup_incoming_promotions): Pass the argument ++ before any promotions happen to promote_function_mode. + -+ namelist / error_params / beam_init ++2014-12-19 Jakub Jelinek + -+ open (10, status='scratch') -+ write (10, '(a)') "&error_params" -+ write (10, '(a)') " beam_init%chars(1)='JUNK'" -+ write (10, '(a)') " beam_init%grid(1)%n_x=3" -+ write (10, '(a)') " beam_init%grid(1)%n_px=2" -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=error_params) -+ close (10) ++ * BASE-VER: Set to 4.8.5. ++ * DEV-PHASE: Set to prerelease. + -+ if (beam_init%chars(1) /= 'JUNK') call abort -+ if (beam_init%grid(1)%n_x /= 3) call abort -+ if (beam_init%grid(1)%n_px /= 2) call abort + 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. +- + -+end program -Index: gcc/testsuite/gfortran.dg/namelist_79.f90 + 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/gfortran.dg/namelist_79.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_79.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,43 @@ -+! { dg-do run } -+! PR libfortran/52512 - Cannot match namelist object name -+! Test case derived from PR. -+ -+program testje -+ -+ implicit none -+ -+ integer :: getal, jn -+ type ptracer -+ character(len = 8) :: sname !: short name -+ logical :: lini !: read in a file or not -+ end type ptracer -+ type(ptracer) , dimension(3) :: tracer -+ namelist/namtoptrc/ getal,tracer -+ -+ ! standard values -+ getal = 9999 -+ do jn = 1, 3 -+ tracer(jn)%sname = 'default_name' -+ tracer(jn)%lini = .false. -+ end do -+ -+ open (10, status='scratch') -+ write (10, '(a)') "&namtoptrc" -+ write (10, '(a)') " getal = 7" -+ write (10, '(a)') " tracer(1) = 'DIC ', .true." -+ write (10, '(a)') " tracer(2) = 'Alkalini', .true." -+ write (10, '(a)') " tracer(3) = 'O2 ', .true." -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=namtoptrc) -+ close (10) -+ -+ if (getal /= 7) call abort -+ if (tracer(1)%sname /= 'DIC ') call abort -+ if (tracer(2)%sname /= 'Alkalini') call abort -+ if (tracer(3)%sname /= 'O2 ') call abort -+ if (.not. tracer(1)%lini) call abort -+ if (.not. tracer(2)%lini) call abort -+ if (.not. tracer(3)%lini) call abort -+ -+end program testje -Index: gcc/testsuite/gfortran.dg/size_kind_2.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../branches/gcc-4_7-branch) (revision 198690) +--- 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 @@ -+! { dg-do compile } -+! { dg-options "-fdump-tree-original" } -+! -+! PR fortran/57142 -+! -+integer :: B(huge(1)+3_8,2_8) -+integer(8) :: var1(2), var2, var3 ++/* PR target/64513 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mstack-arg-probe" } */ + -+var1 = shape(B,kind=8) -+var2 = size(B,kind=8) -+var3 = size(B,dim=1,kind=8) -+end ++struct A {}; ++struct B { struct A y; }; ++int foo (struct A); + -+! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } } -+! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } } -+! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } } -+! { dg-final { cleanup-tree-dump "original" } } -Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90 ++int ++bar (int x) ++{ ++ struct B b; ++ int c; ++ while (x--) ++ c = foo (b.y); ++ return c; ++} +Index: gcc/testsuite/gfortran.dg/pr64528.f90 =================================================================== ---- gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,37 @@ +--- 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 } -+! -+! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer -+! -+! Contributed by Samuel Debionne -+ -+module test -+ -+ interface generic_name_get_proc_ptr -+ module procedure specific_name_get_proc_ptr -+ end interface ++! { dg-options "-O -fno-tree-dce -fno-tree-ccp" } + -+ abstract interface -+ double precision function foo(arg1) -+ real, intent(in) :: arg1 -+ end function ++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 + -+ function specific_name_get_proc_ptr() result(res) -+ procedure(foo), pointer :: res ++ integer function sum_parent(op1,op2) ++ implicit none ++ class(parent), intent(in) :: op1, op2 ++ sum_parent = 0 + end function + -+end module test ++ integer function sum_child(op1,op2) ++ implicit none ++ class(child) , intent(in) :: op1 ++ class(parent), intent(in) :: op2 ++ sum_child = 1 ++ end function + -+program crash_test -+ use :: test ++end module + -+ procedure(foo), pointer :: ptr ++program drive ++ use overwrite ++ implicit none + -+ ptr => specific_name_get_proc_ptr() -+ ptr => generic_name_get_proc_ptr() ++ type(parent) :: m1, m2 ++ class(parent), pointer :: mres ++ type(child) :: h1, h2 ++ class(parent), pointer :: hres + -+end program ++ if (m1 + m2 /= 0) call abort() ++ if (h1 + m2 /= 1) call abort() ++ if (h1%sum(h2) /= 1) call abort() + -+! { dg-final { cleanup-modules "test" } } -Index: gcc/testsuite/gfortran.dg/namelist_81.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_81.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_81.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,43 @@ -+! { dg-do run } -+! PR56786 Error on embedded spaces -+integer :: i(3) -+namelist /nml/ i -+ -+i = -42 -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) = 5 /' -+rewind(99) -+read(99,nml=nml) -+close(99) -+if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort() -+ -+! Shorten the file so the read hits EOF -+ -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) = 5 ' -+rewind(99) -+read(99,nml=nml, end=30) -+call abort() -+! Shorten some more -+ 30 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) =' -+rewind(99) -+read(99,nml=nml, end=40) -+call abort() -+! Shorten some more -+ 40 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 )' -+rewind(99) -+read(99,nml=nml, end=50) -+call abort() -+! Shorten some more -+ 50 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ' -+rewind(99) -+read(99,nml=nml, end=60) -+call abort() -+ 60 close(99) +end -Index: gcc/testsuite/gfortran.dg/namelist_78.f90 ++ ++! { dg-final { cleanup-modules "overwrite" } } +Index: gcc/testsuite/gfortran.dg/typebound_call_26.f90 =================================================================== ---- gcc/testsuite/gfortran.dg/namelist_78.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_78.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,34 @@ -+! { dg-do run } +--- 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 libfortran/51825 -+! Test case regarding namelist problems with derived types ++! PR 64244: [4.8/4.9/5 Regression] ICE at class.c:236 when using non_overridable ++! ++! Contributed by Ondřej Čertík + -+program namelist ++module m ++ implicit none + -+ type d1 -+ integer :: j = 0 -+ end type d1 ++ type :: A ++ contains ++ generic :: f => g ++ procedure, non_overridable :: g ++ end type + -+ type d2 -+ type(d1) k -+ end type d2 ++contains + -+ type d3 -+ type(d2) d(2) -+ end type d3 ++ subroutine g(this) ++ class(A), intent(in) :: this ++ end subroutine + -+ type(d3) der -+ namelist /nmlst/ der ++end module + -+ open (10, status='scratch') -+ write (10, '(a)') "&NMLST" -+ write (10, '(a)') " DER%D(1)%K%J = 1," -+ write (10, '(a)') " DER%D(2)%K%J = 2," -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=nmlst) -+ close (10) + -+ if (der%d(1)%k%j /= 1) call abort -+ if (der%d(2)%k%j /= 2) call abort -+end program namelist -Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c ++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/gcc.c-torture/execute/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,45 @@ -+/* PR target/56866 */ -+ -+int -+main () -+{ -+#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2 -+ unsigned long long wq[256], rq[256]; -+ unsigned int wi[256], ri[256]; -+ unsigned short ws[256], rs[256]; -+ unsigned char wc[256], rc[256]; -+ int t; -+ -+ __builtin_memset (wq, 0, sizeof wq); -+ __builtin_memset (wi, 0, sizeof wi); -+ __builtin_memset (ws, 0, sizeof ws); -+ __builtin_memset (wc, 0, sizeof wc); -+ wq[0] = 0x0123456789abcdefULL; -+ wi[0] = 0x01234567; -+ ws[0] = 0x4567; -+ wc[0] = 0x73; -+ -+ asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory"); -+ -+ for (t = 0; t < 256; ++t) -+ rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8)); -+ for (t = 0; t < 256; ++t) -+ ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8)); -+ for (t = 0; t < 256; ++t) -+ rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9)); -+ for (t = 0; t < 256; ++t) -+ rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5)); -+ -+ asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory"); -+ -+ if (rq[0] != 0xef0123456789abcdULL || rq[1]) -+ __builtin_abort (); -+ if (ri[0] != 0x67012345 || ri[1]) -+ __builtin_abort (); -+ if (rs[0] != 0xb3a2 || rs[1]) -+ __builtin_abort (); -+ if (rc[0] != 0x9b || rc[1]) -+ __builtin_abort (); -+#endif -+ return 0; -+} -Index: gcc/testsuite/gcc.dg/pr56890-2.c +--- 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/pr56890-2.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr56890-2.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,19 @@ -+/* PR target/56890 */ -+/* Reported by Rainer Jung */ -+ -+/* { dg-do assemble } */ -+/* { dg-options "-O" } */ +--- 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-*-* } } */ + -+unsigned int buggy(unsigned int min, unsigned int max) ++void ++foo (void) +{ -+ unsigned int number; -+ if (max < 16384) { -+ unsigned short num16; -+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); -+ return num16; -+ } -+ else { -+ (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0))); -+ } -+ return number; ++ __builtin_unreachable (); +} -Index: gcc/testsuite/gcc.dg/pr48189.c +Index: gcc/testsuite/gcc.dg/pr64766.c =================================================================== ---- gcc/testsuite/gcc.dg/pr48189.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr48189.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,13 @@ -+/* PR tree-optimization/48189 */ +--- 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 } */ -+/* { dg-options "-O --param max-predicted-iterations=0" } */ + -+struct S { int s[8]; }; -+ +void -+foo (int *x, struct S *y) ++foo () +{ -+ int i; -+ for (i = 0; y[i].s[i]; i++) -+ *x++ = y[i].s[i]; +} -Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c -=================================================================== ---- gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -48,25 +48,25 @@ - /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the - sign as well. */ - #ifndef __SPU__ --#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ -+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ - if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \ -- || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \ -+ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ -- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ -+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ -- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ -+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ - link_error(__LINE__); \ - } while (0) - #else --#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ -+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ - /* SPU single-precision floating point format does not support Inf or Nan. */ \ - if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ -- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ -+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ -- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ -+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ - link_error(__LINE__); \ - } while (0) - #endif -@@ -173,15 +173,15 @@ - - /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of - the radix. */ -- TESTIT3 (logb, ,inf, , isinf); -- TESTIT3 (logb, - ,inf, , isinf); -- TESTIT3 (logb, ,nan, "", isnan); -- TESTIT3 (logb, - ,nan, "", isnan); -+ TESTIT3 (logb, ,inf, , isinf, ); -+ TESTIT3 (logb, - ,inf, , isinf, ); -+ TESTIT3 (logb, ,nan, "", isnan, ); -+ TESTIT3 (logb, - ,nan, "", isnan, -); - -- TESTIT3 (significand, ,inf, , isinf); -- TESTIT3 (significand, - ,inf, , isinf); -- TESTIT3 (significand, ,nan, "", isnan); -- TESTIT3 (significand, - ,nan, "", isnan); -+ TESTIT3 (significand, ,inf, , isinf, ); -+ TESTIT3 (significand, - ,inf, , isinf, -); -+ TESTIT3 (significand, ,nan, "", isnan, ); -+ TESTIT3 (significand, - ,nan, "", isnan, -); - } - - int main() -Index: gcc/testsuite/gcc.dg/torture/pr53922.c -=================================================================== ---- gcc/testsuite/gcc.dg/torture/pr53922.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/gcc.dg/torture/pr53922.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,6 +1,7 @@ - /* { dg-do run } */ - /* { dg-require-weak "" } */ --/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */ -+/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */ -+/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */ - - int x(int a) - { -Index: gcc/testsuite/gcc.dg/pr56890-1.c ++ ++void foo () = 0; /* { dg-error "is initialized like a variable|invalid initializer" } */ +Index: gcc/testsuite/gcc.dg/pr64563.c =================================================================== ---- gcc/testsuite/gcc.dg/pr56890-1.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr56890-1.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,15 @@ -+/* PR target/56890 */ -+/* Reported by Rainer Jung */ +--- 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 "-Os -Wtype-limits" } */ + -+/* { dg-do assemble } */ -+/* { dg-options "-O2" } */ ++int a, b, c, d, f; ++unsigned int e; + -+unsigned int buggy(unsigned int min, unsigned int max) ++void ++foo (void) +{ -+ if (max < 16384) { -+ unsigned short num16 = 0; -+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); -+ return num16; -+ } -+ return 0; ++ d = b = (a != (e | 4294967288UL)); ++ if (!d) ++ c = f || b; +} Index: gcc/testsuite/ChangeLog =================================================================== ---- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,97 @@ -+2013-05-07 Tobias Burnus +--- 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 + -+ Backport from mainline -+ 2013-05-02 Tobias Burnus ++ Backported from mainline ++ 2015-01-27 Jakub Jelinek + -+ PR fortran/57142 -+ * gfortran.dg/size_kind_2.f90: New. -+ * gfortran.dg/size_kind_3.f90: New. ++ PR rtl-optimization/61058 ++ * gcc.dg/pr61058.c: New test. + -+2013-05-03 Marek Polacek ++ PR c/64766 ++ * gcc.dg/pr64766.c: New test. + -+ Backport from mainline -+ 2013-04-25 Marek Polacek ++ 2015-01-13 Jakub Jelinek + -+ PR tree-optimization/57066 -+ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. ++ PR fortran/64528 ++ * gfortran.dg/pr64528.f90: New test. + -+2013-04-30 Uros Bizjak ++ 2015-01-12 Jakub Jelinek + -+ Backport from mainline -+ 2013-04-29 Uros Bizjak ++ PR tree-optimization/64563 ++ * gcc.dg/pr64563.c: New test. + -+ PR target/44578 -+ * gcc.target/i386/pr44578.c: New test. ++ PR target/64513 ++ * gcc.target/i386/pr64513.c: New test. + -+ Backport from mainline -+ 2013-04-29 Uros Bizjak ++2015-01-29 Ilya Tocar + -+ PR target/57098 -+ * gcc.target/i386/pr57098.c: New test. ++ * gcc.target/i386/sse-14.c: Test new intrinsic. ++ * gcc.target/i386/sse-22.c: Ditto. + -+2013-04-29 Christian Bruel ++2015-01-27 Mikael Pettersson + -+ PR target/57108 -+ * gcc.target/sh/pr57108.c: New test. ++ Backport from mainline + -+2013-04-28 Jerry DeLisle ++ 2013-09-20 Bernd Edlinger + -+ Backport from trunk: ++ PR middle-end/57748 ++ * gcc.dg/torture/pr57748-1.c: New test. ++ * gcc.dg/torture/pr57748-2.c: New test. + -+ PR fortran/51825 -+ * gfortran.dg/namelist_77.f90: New test. -+ * gfortran.dg/namelist_78.f90: New test. ++ 2014-01-08 Bernd Edlinger + -+2013-04-28 Jerry DeLisle ++ PR middle-end/57748 ++ * gcc.dg/torture/pr57748-3.c: New test. ++ * gcc.dg/torture/pr57748-4.c: New test. + -+ Backport from trunk: ++2015-01-24 Thomas Koenig + -+ PR fortran/56786 -+ * gfortran.dg/namelist_81.f90: New test. ++ PR fortran/56867 ++ * gfortran.dg/dependency_45.f90: New test. + -+2013-04-28 Jerry DeLisle ++2015-01-24 Thomas Koenig + -+ Backport from trunk: ++ Backport from trunk ++ PR fortran/57023 ++ * gfortran.dg/internal_pack_15.f90: New test. + -+ PR fortran/52512 -+ * gfortran.dg/namelist_79.f90: New test. ++2015-01-20 Marek Polacek + -+2013-04-27 Jakub Jelinek ++ Backport from mainline ++ 2014-06-23 Marek Polacek + -+ PR target/56866 -+ * gcc.c-torture/execute/pr56866.c: New test. -+ * gcc.target/i386/pr56866.c: New test. ++ PR c/61553 ++ * c-c++-common/pr61553.c: New test. + -+2013-04-26 Janus Weil ++2015-01-12 Janus Weil + -+ Backports from trunk: ++ Backport from mainline ++ PR fortran/63733 ++ * gfortran.dg/typebound_operator_20.f90: New. + -+ PR fortran/56968 -+ * gfortran.dg/proc_ptr_41.f90: New. ++2014-12-28 H.J. Lu + -+ PR fortran/53685 -+ PR fortran/57022 -+ * gfortran.dg/transfer_check_4.f90: New. ++ Backport from mainline: ++ 2014-12-28 H.J. Lu + -+2013-04-19 Marek Polacek ++ * gcc.target/i386/pr57003.c: Skip on x32. ++ * gcc.target/i386/pr60516.c: Likewise. + -+ Backport from mainline -+ 2013-01-08 Steven Bosscher -+ Jakub Jelinek ++2014-12-27 H.J. Lu ++ ++ Backport from mainline: ++ 2014-12-26 H.J. Lu + -+ PR tree-optimization/48189 -+ * gcc.dg/pr48189.c: New test. ++ PR target/64409 ++ * gcc.target/i386/pr64409.c: New test. + -+2013-04-15 Rainer Orth ++2014-12-23 Janus Weil + -+ * gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*. -+ Remove dg-skip-if default args. ++ Backport from mainline ++ PR fortran/64244 ++ * gfortran.dg/typebound_call_26.f90: New. ++ ++2014-12-19 H.J. Lu + -+2013-04-15 Eric Botcazou ++ Backported from mainline ++ 2014-12-14 H.J. Lu + -+ * gcc.dg/pr56890-1.c: New test. -+ * gcc.dg/pr56890-2.c: Likewise. ++ PR rtl-optimization/64037 ++ * g++.dg/pr64037.C: New test. + - 2013-04-11 Release Manager + 2014-12-19 Release Manager - * GCC 4.7.3 released. -Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C + * GCC 4.8.4 released. +Index: gcc/testsuite/g++.dg/pr64037.C =================================================================== ---- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,14 @@ -+// PR c++/56388 -+// { dg-require-effective-target c++11 } +--- 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" } + -+int main() ++enum class X : unsigned char { ++ V = 2, ++}; ++ ++static void ++__attribute__((noinline,noclone)) ++foo(unsigned &out, unsigned a, X b) +{ -+ bool /*const*/ condition = false; -+ -+ [&]{ -+ try{} -+ catch(...){ -+ if(condition){} -+ } -+ }(); ++ out = static_cast(b); +} -Index: gcc/cp/ChangeLog -=================================================================== ---- gcc/cp/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,13 @@ -+2013-04-21 Eric Botcazou + -+ * parser.c (cp_parser_late_return_type_opt): Fix C++ism. ++int main() ++{ ++ unsigned deadbeef = 0xDEADBEEF; ++ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef)); + -+2013-04-15 Jason Merrill ++ unsigned out; ++ foo(out, 2, X::V); + -+ PR c++/56388 -+ * semantics.c (insert_capture_proxy): Just use index 1 in the -+ stmt_list_stack. ++ if (out != 2) ++ __builtin_abort (); + - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/cp/semantics.c -=================================================================== ---- gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/semantics.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -8959,13 +8959,12 @@ - insert_capture_proxy (tree var) - { - cp_binding_level *b; -- int skip; - tree stmt_list; - - /* Put the capture proxy in the extra body block so that it won't clash - with a later local variable. */ - b = current_binding_level; -- for (skip = 0; ; ++skip) -+ for (;;) - { - cp_binding_level *n = b->level_chain; - if (n->kind == sk_function_parms) -@@ -8976,8 +8975,7 @@ - - /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ - var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); -- stmt_list = VEC_index (tree, stmt_list_stack, -- VEC_length (tree, stmt_list_stack) - 1 - skip); -+ stmt_list = VEC_index (tree, stmt_list_stack, 1); - gcc_assert (stmt_list); - append_to_statement_list_force (var, &stmt_list); - } -Index: gcc/cp/parser.c ++ return 0; ++} +Index: gcc/testsuite/g++.dg/cpp0x/ref-qual16.C =================================================================== ---- gcc/cp/parser.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -16691,7 +16691,7 @@ - cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) - { - cp_token *token; -- tree type; -+ tree type, save_ccp, save_ccr; - - /* Peek at the next token. */ - token = cp_lexer_peek_token (parser->lexer); -@@ -16702,8 +16702,8 @@ - /* Consume the ->. */ - cp_lexer_consume_token (parser->lexer); - -- tree save_ccp = current_class_ptr; -- tree save_ccr = current_class_ref; -+ save_ccp = current_class_ptr; -+ save_ccr = current_class_ref; - if (quals >= 0) - { - /* DR 1207: 'this' is in scope in the trailing return type. */ -Index: gcc/dwarf2out.c -=================================================================== ---- gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/dwarf2out.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -22538,7 +22538,7 @@ - /* Add the name for the main input file now. We delayed this from - dwarf2out_init to avoid complications with PCH. */ - add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); -- if (!IS_ABSOLUTE_PATH (filename)) -+ if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) - add_comp_dir_attribute (comp_unit_die ()); - else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) - { -Index: gcc/predict.c +--- 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 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/predict.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/predict.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -983,7 +983,8 @@ - if (TREE_CODE (niter) == INTEGER_CST) - { - if (host_integerp (niter, 1) -- && compare_tree_int (niter, max-1) == -1) -+ && max -+ && compare_tree_int (niter, max - 1) == -1) - nitercst = tree_low_cst (niter, 1) + 1; - else - nitercst = max; -@@ -1005,6 +1006,11 @@ - else - continue; - -+ /* If the prediction for number of iterations is zero, do not -+ predict the exit edges. */ -+ if (nitercst == 0) -+ continue; -+ - probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst); - predict_edge (ex, predictor, probability); - } -Index: gcc/fortran/ChangeLog -=================================================================== ---- gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,39 @@ -+2013-05-07 Tobias Burnus +--- 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 + -+ Backport from mainline -+ 2013-05-02 Tobias Burnus ++struct foo { ++ int member; ++}; + -+ PR fortran/57142 -+ * simplify.c (gfc_simplify_size): Renamed from -+ simplify_size; fix kind=8 handling. -+ (gfc_simplify_size): New function. -+ (gfc_simplify_shape): Add range check. -+ * resolve.c (resolve_function): Fix handling -+ for ISYM_SIZE. ++template < int N> ++struct bar {}; + -+2013-04-26 Janus Weil ++template ++struct qux { ++ static bar static_member; ++}; + -+ Backports from trunk: ++template ++bar qux::static_member; + -+ PR fortran/56968 -+ * expr.c (gfc_check_pointer_assign): Handle generic functions returning -+ procedure pointers. ++int main() { } +Index: gcc/testsuite/g++.dg/template/non-dependent14.C +=================================================================== +--- 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 } */ ++ ++void ++foo (char *s) ++{ ++ __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_8_4_release) (revision 220382) ++++ gcc/cp/ChangeLog (.../branches/gcc-4_8-branch) (revision 220382) +@@ -1,3 +1,15 @@ ++2015-01-13 Jason Merrill + -+ PR fortran/53685 -+ PR fortran/57022 -+ * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE -+ expressions. -+ * target-memory.h (gfc_element_size): New prototype. -+ * target-memory.c (size_array): Remove. -+ (gfc_element_size): New function. -+ (gfc_target_expr_size): Modified to always return the full size of the -+ expression. ++ PR c++/64487 ++ * semantics.c (finish_offsetof): Handle templates here. ++ * parser.c (cp_parser_builtin_offsetof): Not here. + -+2013-04-18 Tobias Burnus ++ PR c++/64251 ++ * decl2.c (mark_used): Don't mark if in_template_function. + -+ PR fortran/56994 -+ * invoke.texi (NEAREST): S argument is not optional. ++ PR c++/64297 ++ * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL. + - 2013-04-11 Release Manager + 2014-12-19 Release Manager - * GCC 4.7.3 released. -Index: gcc/fortran/expr.c -=================================================================== ---- gcc/fortran/expr.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/expr.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3493,8 +3493,12 @@ - } - else if (rvalue->expr_type == EXPR_FUNCTION) - { -- s2 = rvalue->symtree->n.sym->result; -- name = rvalue->symtree->n.sym->result->name; -+ if (rvalue->value.function.esym) -+ s2 = rvalue->value.function.esym->result; -+ else -+ s2 = rvalue->symtree->n.sym->result; -+ -+ name = s2->name; - } - else - { -Index: gcc/fortran/resolve.c + * GCC 4.8.4 released. +Index: gcc/cp/semantics.c =================================================================== ---- gcc/fortran/resolve.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3155,6 +3155,7 @@ - for (arg = expr->value.function.actual; arg; arg = arg->next) - { - if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE) -+ && arg == expr->value.function.actual - && arg->next != NULL && arg->next->expr) - { - if (arg->next->expr->expr_type != EXPR_CONSTANT) -Index: gcc/fortran/target-memory.c -=================================================================== ---- gcc/fortran/target-memory.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/target-memory.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -35,17 +35,7 @@ - /* --------------------------------------------------------------- */ - /* Calculate the size of an expression. */ - --static size_t --size_array (gfc_expr *e) --{ -- mpz_t array_size; -- gfc_constructor *c = gfc_constructor_first (e->value.constructor); -- size_t elt_size = gfc_target_expr_size (c->expr); - -- gfc_array_size (e, &array_size); -- return (size_t)mpz_get_ui (array_size) * elt_size; --} -- - static size_t - size_integer (int kind) +--- 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) { -@@ -82,16 +72,14 @@ - } ++ /* 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) + { + 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 (processing_template_decl) ++ if (processing_template_decl || in_template_function ()) + return true; -+/* Return the size of a single element of the given expression. -+ Identical to gfc_target_expr_size for scalars. */ -+ - size_t --gfc_target_expr_size (gfc_expr *e) -+gfc_element_size (gfc_expr *e) - { - tree type; + /* Check this too in case we're within fold_non_dependent_expr. */ +Index: gcc/cp/parser.c +=================================================================== +--- 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 @@ + } -- gcc_assert (e != NULL); + 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/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); + +- misalignp = true; +- to_rtx = gen_reg_rtx (mode); +- mem = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); - -- if (e->expr_type == EXPR_ARRAY) -- return size_array (e); +- /* 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); - - switch (e->ts.type) - { - case BT_INTEGER: -@@ -130,12 +118,36 @@ - return int_size_in_bytes (type); - } - default: -- gfc_internal_error ("Invalid expression in gfc_target_expr_size."); -+ gfc_internal_error ("Invalid expression in gfc_element_size."); - return 0; +- 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); + } + +- 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); } - } + /* 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; -+/* Return the size of an expression in its target representation. */ -+ -+size_t -+gfc_target_expr_size (gfc_expr *e) -+{ -+ mpz_t tmp; -+ size_t asz; -+ -+ gcc_assert (e != NULL); -+ -+ if (e->rank) -+ { -+ if (gfc_array_size (e, &tmp)) -+ asz = mpz_get_ui (tmp); -+ else -+ asz = 0; -+ } -+ else -+ asz = 1; -+ -+ return asz * gfc_element_size (e); -+} -+ -+ - /* The encode_* functions export a value into a buffer, and - return the number of bytes of the buffer that have been - used. */ -Index: gcc/fortran/target-memory.h -=================================================================== ---- gcc/fortran/target-memory.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/target-memory.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -25,7 +25,7 @@ - /* Convert a BOZ to REAL or COMPLEX. */ - bool gfc_convert_boz (gfc_expr *, gfc_typespec *); +@@ -7897,7 +7861,8 @@ + return ret ? ret : const0_rtx; + } --/* Return the size of an expression in its target representation. */ -+size_t gfc_element_size (gfc_expr *); - size_t gfc_target_expr_size (gfc_expr *); +- 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; + } - /* Write a constant expression in binary form to a target buffer. */ -Index: gcc/fortran/check.c -=================================================================== ---- gcc/fortran/check.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/check.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3988,8 +3988,6 @@ - size_t *result_length_p) +@@ -9190,7 +9155,8 @@ + + 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) { - size_t result_elt_size; -- mpz_t tmp; -- gfc_expr *mold_element; + 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: + { + 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 (source->expr_type == EXPR_FUNCTION) - return FAILURE; -@@ -3998,20 +3996,12 @@ - return FAILURE; + 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 @@ + } - /* Calculate the size of the source. */ -- if (source->expr_type == EXPR_ARRAY -- && gfc_array_size (source, &tmp) == FAILURE) -- return FAILURE; + 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; - - *source_size = gfc_target_expr_size (source); - if (*source_size == 0) - return FAILURE; - -- mold_element = mold->expr_type == EXPR_ARRAY -- ? gfc_constructor_first (mold->value.constructor)->expr -- : mold; +- 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); - - /* Determine the size of the element. */ -- result_elt_size = gfc_target_expr_size (mold_element); -+ result_elt_size = gfc_element_size (mold); - if (result_elt_size == 0) - return FAILURE; +- /* 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)) + { +- 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; ++ } + } -Index: gcc/fortran/intrinsic.texi + 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/fortran/intrinsic.texi (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/intrinsic.texi (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9209,7 +9209,7 @@ - @item @emph{Arguments}: - @multitable @columnfractions .15 .70 - @item @var{X} @tab Shall be of type @code{REAL}. --@item @var{S} @tab (Optional) shall be of type @code{REAL} and -+@item @var{S} @tab Shall be of type @code{REAL} and - not equal to zero. - @end multitable +--- 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); + } -Index: gcc/fortran/simplify.c + 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/fortran/simplify.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/simplify.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -32,7 +32,9 @@ +--- 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; - gfc_expr gfc_bad_expr; + sym = NULL; -+static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int); +@@ -3573,8 +3575,50 @@ -+ - /* Note that 'simplification' is not just transforming expressions. - For functions that are not simplified at compile time, range - checking is done if possible. -@@ -3240,7 +3242,7 @@ - gfc_expr* dim = result; - mpz_set_si (dim->value.integer, d); + i = fold_unary_intrinsic (e->value.op.op); -- result = gfc_simplify_size (array, dim, kind); -+ result = simplify_size (array, dim, k); - gfc_free_expr (dim); - if (!result) - goto returnNull; -@@ -5493,15 +5495,12 @@ - e = gfc_get_constant_expr (BT_INTEGER, k, &source->where); ++ /* 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) + { ++ 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 (t == SUCCESS) + 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) - { -- mpz_set (e->value.integer, shape[n]); -- mpz_clear (shape[n]); +- 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; - } -+ mpz_set (e->value.integer, shape[n]); - else - { - mpz_set_ui (e->value.integer, n + 1); +- + /* 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 @@ -- f = gfc_simplify_size (source, e, NULL); -+ f = simplify_size (source, e, k); - gfc_free_expr (e); - if (f == NULL) - { -@@ -5512,24 +5511,31 @@ - e = f; - } + for (ss = rss; ss != gfc_ss_terminator; ss = ss->next) + { +- if (ss->info->type != GFC_SS_SECTION) +- continue; + + ss_expr = ss->info->expr; -+ if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr) ++ if (ss->info->type != GFC_SS_SECTION) + { -+ gfc_free_expr (result); -+ if (t) -+ gfc_clear_shape (shape, source->rank); -+ return &gfc_bad_expr; ++ /* 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; + } + - gfc_constructor_append_expr (&result->value.constructor, e, NULL); - } - -+ if (t) -+ gfc_clear_shape (shape, source->rank); + 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 + - return result; - } - ++ Backported from mainline ++ 2015-01-13 Jakub Jelinek ++ ++ PR fortran/64528 ++ * trans-decl.c (create_function_arglist): Don't set TREE_READONLY ++ on dummy args with VALUE attribute. ++ ++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 --gfc_expr * --gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) -+static gfc_expr * -+simplify_size (gfc_expr *array, gfc_expr *dim, int k) + * 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) { - mpz_t size; - gfc_expr *return_value; - int d; -- int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); + gfc_actual_arglist* newactual; + gfc_symtree* target; +@@ -6072,6 +6072,10 @@ + if (resolve_typebound_generic_call (c->expr1, name) == FAILURE) + return FAILURE; -- if (k == -1) -- return &gfc_bad_expr; -- - /* For unary operations, the size of the result is given by the size - of the operand. For binary ones, it's the size of the first operand - unless it is scalar, then it is the size of the second. */ -@@ -5558,7 +5564,7 @@ - replacement = array->value.op.op1; - else - { -- simplified = gfc_simplify_size (array->value.op.op1, dim, kind); -+ simplified = simplify_size (array->value.op.op1, dim, k); - if (simplified) - return simplified; ++ /* 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. */ -@@ -5568,18 +5574,20 @@ - } + 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); - /* Try to reduce it directly if possible. */ -- simplified = gfc_simplify_size (replacement, dim, kind); -+ simplified = simplify_size (replacement, dim, k); - - /* Otherwise, we build a new SIZE call. This is hopefully at least - simpler than the original one. */ - if (!simplified) -- simplified = gfc_build_intrinsic_call (gfc_current_ns, -- GFC_ISYM_SIZE, "size", -- array->where, 3, -- gfc_copy_expr (replacement), -- gfc_copy_expr (dim), -- gfc_copy_expr (kind)); -- -+ { -+ gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k); -+ simplified = gfc_build_intrinsic_call (gfc_current_ns, -+ GFC_ISYM_SIZE, "size", -+ array->where, 3, -+ gfc_copy_expr (replacement), -+ gfc_copy_expr (dim), -+ kind); -+ } - return simplified; +- 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 @@ } -@@ -5598,13 +5606,32 @@ - return NULL; + 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)) + { + gfc_free_ref_list (new_ref); +- return resolve_typebound_call (code, NULL); ++ return resolve_typebound_call (code, NULL, NULL); } -- return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size)); -+ return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where); -+ mpz_set (return_value->value.integer, size); - mpz_clear (size); -+ - return return_value; +- 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; } ++/* Callback function for checking if an expression depends on a ++ dummy variable which is any other than INTENT(IN). */ - gfc_expr * -+gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ++static int ++callback_dummy_intent_not_in (gfc_expr **ep, ++ int *walk_subtrees ATTRIBUTE_UNUSED, ++ void *data ATTRIBUTE_UNUSED) +{ -+ gfc_expr *result; -+ int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); ++ gfc_expr *e = *ep; + -+ if (k == -1) -+ return &gfc_bad_expr; ++ if (e->expr_type == EXPR_VARIABLE && e->symtree ++ && e->symtree->n.sym->attr.dummy) ++ return e->symtree->n.sym->attr.intent != INTENT_IN; ++ else ++ return 0; ++} + -+ result = simplify_size (array, dim, k); -+ if (result == NULL || result == &gfc_bad_expr) -+ return result; ++/* Auxiliary function to check if subexpressions have dummy variables which ++ are not intent(in). ++*/ + -+ return range_check (result, "SIZE"); ++static bool ++dummy_intent_not_in (gfc_expr **ep) ++{ ++ return gfc_expr_walker (ep, callback_dummy_intent_not_in, NULL); +} + -+ -+gfc_expr * - gfc_simplify_sign (gfc_expr *x, gfc_expr *y) - { - gfc_expr *result; -Index: gcc/cfgexpand.c + /* 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/cfgexpand.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cfgexpand.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3646,6 +3646,8 @@ - avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth) +--- 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) { - rtx exp = *exp_p; -+ const char *format_ptr; -+ int i, j; - - if (exp == NULL_RTX) - return; -@@ -3668,8 +3670,7 @@ - return; - } +-/* 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))); +- +- 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))); + } -- const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); -- int i, j; -+ format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); - for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) - switch (*format_ptr++) - { -Index: gcc/sched-deps.c + /* Insert the NODE into the splay tree given by DATA. Used by +Index: gcc/cfgexpand.c =================================================================== ---- gcc/sched-deps.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/sched-deps.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1563,24 +1563,15 @@ - add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp, - int uncond, enum reg_note dep_type) - { -- rtx list, next; -+ add_dependence_list (insn, *listp, uncond, dep_type); - - /* We don't want to short-circuit dependencies involving debug - insns, because they may cause actual dependencies to be - disregarded. */ - if (deps->readonly || DEBUG_INSN_P (insn)) -- { -- add_dependence_list (insn, *listp, uncond, dep_type); -- return; -- } -+ return; - -- for (list = *listp, *listp = NULL; list ; list = next) -- { -- next = XEXP (list, 1); -- if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0))) -- add_dependence (insn, XEXP (list, 0), dep_type); -- free_INSN_LIST_node (list); -- } -+ free_INSN_LIST_list (listp); +--- 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); } - - /* Remove all occurences of INSN from LIST. Return the number of -@@ -1764,6 +1755,15 @@ - add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1, - REG_DEP_ANTI); - -+ if (DEBUG_INSN_P (insn)) -+ { -+ if (for_write) -+ free_INSN_LIST_list (&deps->pending_read_insns); -+ free_INSN_LIST_list (&deps->pending_write_insns); -+ free_INSN_LIST_list (&deps->last_pending_memory_flush); -+ free_INSN_LIST_list (&deps->pending_jump_insns); -+ } -+ - if (!deps->readonly) - { - free_EXPR_LIST_list (&deps->pending_write_mems); -@@ -3262,9 +3262,9 @@ - SET_REGNO_REG_SET (&deps->reg_last_in_use, i); - } - -- /* Flush pending lists on jumps, but not on speculative checks. */ -- if (JUMP_P (insn) && !(sel_sched_p () -- && sel_insn_is_speculation_check (insn))) -+ /* Don't flush pending lists on speculative checks for -+ selective scheduling. */ -+ if (!sel_sched_p () || !sel_insn_is_speculation_check (insn)) - flush_pending_lists (deps, insn, true, true); - - reg_pending_barrier = NOT_A_BARRIER; -Index: gcc/config/sparc/sparc.c -=================================================================== ---- gcc/config/sparc/sparc.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/sparc/sparc.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -4207,13 +4207,14 @@ - mapped into one sparc_mode_class mode. */ - - enum sparc_mode_class { -- S_MODE, D_MODE, T_MODE, O_MODE, -+ H_MODE, S_MODE, D_MODE, T_MODE, O_MODE, - SF_MODE, DF_MODE, TF_MODE, OF_MODE, - CC_MODE, CCFP_MODE - }; - - /* Modes for single-word and smaller quantities. */ --#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) -+#define S_MODES \ -+ ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE)) - - /* Modes for double-word and smaller quantities. */ - #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) -@@ -4224,13 +4225,11 @@ - /* Modes for 8-word and smaller quantities. */ - #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE)) - --/* Modes for single-float quantities. We must allow any single word or -- smaller quantity. This is because the fix/float conversion instructions -- take integer inputs/outputs from the float registers. */ --#define SF_MODES (S_MODES) -+/* Modes for single-float quantities. */ -+#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) - - /* Modes for double-float and smaller quantities. */ --#define DF_MODES (D_MODES) -+#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) - - /* Modes for quad-float and smaller quantities. */ - #define TF_MODES (DF_MODES | (1 << (int) TF_MODE)) -@@ -4326,7 +4325,9 @@ - case MODE_INT: - case MODE_PARTIAL_INT: - case MODE_COMPLEX_INT: -- if (GET_MODE_SIZE (i) <= 4) -+ if (GET_MODE_SIZE (i) < 4) -+ sparc_mode_class[i] = 1 << (int) H_MODE; -+ else if (GET_MODE_SIZE (i) == 4) - sparc_mode_class[i] = 1 << (int) S_MODE; - else if (GET_MODE_SIZE (i) == 8) - sparc_mode_class[i] = 1 << (int) D_MODE; -@@ -4338,14 +4339,16 @@ - sparc_mode_class[i] = 0; - break; - case MODE_VECTOR_INT: -- if (GET_MODE_SIZE (i) <= 4) -- sparc_mode_class[i] = 1 << (int)SF_MODE; -+ if (GET_MODE_SIZE (i) == 4) -+ sparc_mode_class[i] = 1 << (int) SF_MODE; - else if (GET_MODE_SIZE (i) == 8) -- sparc_mode_class[i] = 1 << (int)DF_MODE; -+ sparc_mode_class[i] = 1 << (int) DF_MODE; -+ else -+ sparc_mode_class[i] = 0; - break; - case MODE_FLOAT: - case MODE_COMPLEX_FLOAT: -- if (GET_MODE_SIZE (i) <= 4) -+ if (GET_MODE_SIZE (i) == 4) - sparc_mode_class[i] = 1 << (int) SF_MODE; - else if (GET_MODE_SIZE (i) == 8) - sparc_mode_class[i] = 1 << (int) DF_MODE; +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_7_3_release) (revision 198690) -+++ gcc/config/i386/i386.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3444,9 +3444,9 @@ - }) - - (define_insn "*zero_extendsidi2_rex64" -- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?*y,?*Yi,*x") -+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?!*y,?*Yi,*x") - (zero_extend:DI -- (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] -+ (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] - "TARGET_64BIT" - "@ - mov{l}\t{%1, %k0|%k0, %1} -@@ -3469,9 +3469,9 @@ - - ;; %%% Kill me once multi-word ops are sane. - (define_insn "zero_extendsidi2_1" -- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x") -+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x") - (zero_extend:DI -- (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) -+ (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) - (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT" - "@ -Index: gcc/config/i386/sse.md +--- 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/sse.md (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/i386/sse.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -11167,7 +11167,8 @@ - (match_operand:SI 2 "const_0_to__operand" "n")))] - "TARGET_XOP" +--- 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); ++} ++ ++extern __inline __m256i ++__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) + _mm256_slli_si256 (__m256i __A, const int __N) { -- operands[3] = GEN_INT (( * 8) - INTVAL (operands[2])); -+ operands[3] -+ = GEN_INT (GET_MODE_BITSIZE (mode) - INTVAL (operands[2])); - return \"vprot\t{%3, %1, %0|%0, %1, %3}\"; + return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8); } - [(set_attr "type" "sseishft") -Index: gcc/config/i386/i386.c + #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); ++} ++ ++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); + } + #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/i386.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/i386/i386.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -20026,7 +20026,7 @@ - vec[i * 2 + 1] = const1_rtx; - } - vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec)); -- vt = force_const_mem (maskmode, vt); -+ vt = validize_mem (force_const_mem (maskmode, vt)); - t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1, - OPTAB_DIRECT); - -@@ -20223,7 +20223,7 @@ - for (i = 0; i < 16; ++i) - vec[i] = GEN_INT (i/e * e); - vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); -- vt = force_const_mem (V16QImode, vt); -+ vt = validize_mem (force_const_mem (V16QImode, vt)); - if (TARGET_XOP) - emit_insn (gen_xop_pperm (mask, mask, mask, vt)); - else -@@ -20234,7 +20234,7 @@ - for (i = 0; i < 16; ++i) - vec[i] = GEN_INT (i % e); - vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); -- vt = force_const_mem (V16QImode, vt); -+ vt = validize_mem (force_const_mem (V16QImode, vt)); - emit_insn (gen_addv16qi3 (mask, mask, vt)); - } - -Index: gcc/config/sh/sh.md -=================================================================== ---- gcc/config/sh/sh.md (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/sh/sh.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -654,7 +654,7 @@ - - (define_insn "tstsi_t_zero_extract_eq" - [(set (reg:SI T_REG) -- (eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z") -+ (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z") - (match_operand:SI 1 "const_int_operand") - (match_operand:SI 2 "const_int_operand")) - (const_int 0)))] -Index: gcc/config/darwin.h -=================================================================== ---- gcc/config/darwin.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/darwin.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -356,7 +356,9 @@ - %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ - %{!static:%{object:-lgcrt0.o} \ - %{!object:%{preload:-lgcrt0.o} \ -- %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \ -+ %{!preload:-lgcrt1.o \ -+ %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \ -+ %(darwin_crt2)}}}} \ - %{!pg:%{static:-lcrt0.o} \ - %{!static:%{object:-lcrt0.o} \ - %{!object:%{preload:-lcrt0.o} \ -@@ -379,7 +381,7 @@ - #define DARWIN_CRT1_SPEC \ - "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ - %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \ -- %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \ -+ %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \ - %{fgnu-tm: -lcrttms.o}" - - /* Default Darwin ASM_SPEC, very simple. */ -@@ -414,6 +416,8 @@ - - #define TARGET_WANT_DEBUG_PUB_SECTIONS true - -+#define TARGET_FORCE_AT_COMP_DIR true -+ - /* When generating stabs debugging, use N_BINCL entries. */ - - #define DBX_USE_BINCL -Index: gcc/config/pa/pa.c -=================================================================== ---- gcc/config/pa/pa.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/pa/pa.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -790,7 +790,9 @@ - /* Extract CODE_LABEL. */ - orig = XEXP (orig, 0); - add_reg_note (insn, REG_LABEL_OPERAND, orig); -- LABEL_NUSES (orig)++; -+ /* Make sure we have label and not a note. */ -+ if (LABEL_P (orig)) -+ LABEL_NUSES (orig)++; - } - crtl->uses_pic_offset_table = 1; - return reg; -Index: libgfortran/ChangeLog +--- 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 =================================================================== ---- libgfortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,38 @@ -+2013-04-28 Jerry DeLisle -+ -+ Backport from mainline: -+ 2013-03-20 Tilo Schwarz -+ -+ PR libfortran/51825 -+ * io/list_read.c (nml_read_obj): Don't end the component loop on a -+ nested derived type, but continue with the next loop iteration. -+ (nml_get_obj_data): Don't move the first_nl pointer further in the -+ list if a qualifier was found. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from mainline: -+ -+ PR libfortran/56786 -+ * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call -+ when checking for EOF. Use error return mechanism when EOF detected. -+ Do not return FAILURE unless parse_err_msg and parse_err_msg_size have -+ been set. Use hit_eof. -+ (nml_get_obj_data): Likewise use the correct error mechanism. -+ * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist -+ mode. +--- 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 @@ + + #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); ++} + -+2013-04-28 Jerry DeLisle ++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); ++} + -+ Backport from mainline: -+ 2013-03-25 Tilo Schwarz -+ -+ PR libfortran/52512 -+ * io/list_read.c (nml_parse_qualifier): To check for a derived type -+ don't use the namelist head element type but the current element type. -+ (nml_get_obj_data): Add current namelist element type to -+ nml_parse_qualifier call. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: libgfortran/io/list_read.c -=================================================================== ---- libgfortran/io/list_read.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/io/list_read.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -2028,8 +2028,8 @@ - - static try - nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, -- array_loop_spec *ls, int rank, char *parse_err_msg, -- size_t parse_err_msg_size, -+ array_loop_spec *ls, int rank, bt nml_elem_type, -+ char *parse_err_msg, size_t parse_err_msg_size, - int *parsed_rank) ++extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) + _mm_srli_si128 (__m128i __A, const int __N) { - int dim; -@@ -2053,7 +2053,7 @@ - /* The next character in the stream should be the '('. */ - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto err_ret; - - /* Process the qualifier, by dimension and triplet. */ - -@@ -2067,7 +2067,7 @@ - - /* Process a potential sign. */ - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto err_ret; - switch (c) - { - case '-': -@@ -2085,11 +2085,12 @@ - /* Process characters up to the next ':' , ',' or ')'. */ - for (;;) - { -- if ((c = next_char (dtp)) == EOF) -- return FAILURE; -- -+ c = next_char (dtp); - switch (c) - { -+ case EOF: -+ goto err_ret; -+ - case ':': - is_array_section = 1; - break; -@@ -2112,10 +2113,8 @@ - push_char (dtp, c); - continue; - -- case ' ': case '\t': -+ case ' ': case '\t': case '\r': case '\n': - eat_spaces (dtp); -- if ((c = next_char (dtp) == EOF)) -- return FAILURE; - break; - - default: -@@ -2204,7 +2203,7 @@ - do not allow excess data to be processed. */ - if (is_array_section == 1 - || !(compile_options.allow_std & GFC_STD_GNU) -- || dtp->u.p.ionml->type == BT_DERIVED) -+ || nml_elem_type == BT_DERIVED) - ls[dim].end = ls[dim].start; - else - dtp->u.p.expanded_read = 1; -@@ -2257,6 +2256,15 @@ - - err_ret: - -+ /* The EOF error message is issued by hit_eof. Return true so that the -+ caller does not use parse_err_msg and parse_err_msg_size to generate -+ an unrelated error message. */ -+ if (c == EOF) -+ { -+ hit_eof (dtp); -+ dtp->u.p.input_complete = 1; -+ return SUCCESS; -+ } - return FAILURE; + return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); +@@ -1154,6 +1166,10 @@ + return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); } - -@@ -2553,17 +2561,17 @@ - since a single object can have multiple reads. */ - dtp->u.p.expanded_read = 0; - -- /* Now loop over the components. Update the component pointer -- with the return value from nml_write_obj. This loop jumps -- past nested derived types by testing if the potential -- component name contains '%'. */ -+ /* Now loop over the components. */ - - for (cmp = nl->next; - cmp && -- !strncmp (cmp->var_name, obj_name, obj_name_len) && -- !strchr (cmp->var_name + obj_name_len, '%'); -+ !strncmp (cmp->var_name, obj_name, obj_name_len); - cmp = cmp->next) - { -+ /* Jump over nested derived type by testing if the potential -+ component name contains '%'. */ -+ if (strchr (cmp->var_name + obj_name_len, '%')) -+ continue; - - if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos), - pprev_nl, nml_err_msg, nml_err_msg_size, -@@ -2726,12 +2734,12 @@ - return SUCCESS; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - switch (c) - { - case '=': - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - if (c != '?') - { - snprintf (nml_err_msg, nml_err_msg_size, -@@ -2781,8 +2789,9 @@ - if (!is_separator (c)) - push_char (dtp, tolower(c)); - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -- } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); -+ goto nml_err_ret; -+ } -+ while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); - - unget_char (dtp, c); - -@@ -2842,7 +2851,7 @@ - { - parsed_rank = 0; - if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank, -- nml_err_msg, nml_err_msg_size, -+ nl->type, nml_err_msg, nml_err_msg_size, - &parsed_rank) == FAILURE) + #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/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) { - char *nml_err_msg_end = strchr (nml_err_msg, '\0'); -@@ -2857,7 +2866,7 @@ - qualifier_flag = 1; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - unget_char (dtp, c); - } - else if (nl->var_rank > 0) -@@ -2876,14 +2885,15 @@ - goto nml_err_ret; + 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; ++ } } - -- if (*pprev_nl == NULL || !component_flag) -+ /* Don't move first_nl further in the list if a qualifier was found. */ -+ if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag) - first_nl = nl; - - root_nl = nl; - - component_flag = 1; - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - goto get_name; - } - -@@ -2898,8 +2908,8 @@ - descriptor_dimension chd[1] = { {1, clow, nl->string_length} }; - array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} }; - -- if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg, -- nml_err_msg_size, &parsed_rank) -+ if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type, -+ nml_err_msg, nml_err_msg_size, &parsed_rank) - == FAILURE) - { - char *nml_err_msg_end = strchr (nml_err_msg, '\0'); -@@ -2921,7 +2931,7 @@ + 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))); + } } - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - unget_char (dtp, c); - } - -@@ -2961,7 +2971,7 @@ - return SUCCESS; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - - if (c != '=') - { -@@ -2996,6 +3006,17 @@ - - nml_err_ret: +@@ -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))); + } + } -+ /* The EOF error message is issued by hit_eof. Return true so that the -+ caller does not use nml_err_msg and nml_err_msg_size to generate -+ an unrelated error message. */ -+ if (c == EOF) +Index: gcc/config/rs6000/rs6000-cpus.def +=================================================================== +--- 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) + { -+ dtp->u.p.input_complete = 1; -+ unget_char (dtp, c); -+ hit_eof (dtp); -+ return SUCCESS; ++ rtx temp = op1; ++ op1 = op2; ++ op2 = temp; + } + - return FAILURE; + 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; } - -Index: libgfortran/io/transfer.c +@@ -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 =================================================================== ---- libgfortran/io/transfer.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/io/transfer.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3748,7 +3748,7 @@ - case NO_ENDFILE: - case AT_ENDFILE: - generate_error (&dtp->common, LIBERROR_END, NULL); -- if (!is_internal_unit (dtp)) -+ if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode) - { - dtp->u.p.current_unit->endfile = AFTER_ENDFILE; - dtp->u.p.current_unit->current_record = 0; +--- 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); \