[gcc-6] 221/401: * Update to SVN 20161005 (r240765, 6.2.1) from the gcc-6-branch.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:49:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.
commit f16752c866d39df369dc3bd0631386cd36990db3
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Wed Oct 5 02:25:27 2016 +0000
* Update to SVN 20161005 (r240765, 6.2.1) from the gcc-6-branch.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8992 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 13 +-
debian/patches/pr71709.diff | 22 -
debian/patches/svn-updates.diff | 3134 ++++++++++++++++++++++++++++++++++++++-
debian/rules.patch | 1 -
4 files changed, 3125 insertions(+), 45 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 21f0247..b426c39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,19 @@
gcc-6 (6.2.0-6) UNRELEASED; urgency=medium
+ * Update to SVN 20161005 (r240765, 6.2.1) from the gcc-6-branch.
+ - Fix PR libstdc++/68323, PR libstdc++/77794, PR libstdc++/77795,
+ PR libstdc++/77801, PR libgcc/77519, PR target/77756 (x86),
+ PR target/77670 (PPC), PR rtl-optimization/71709, PR c++/77804,
+ PR fortran/41922, PR fortran/60774, PR fortran/61318, PR fortran/68566,
+ PR fortran/69514, PR fortran/69867, PR fortran/69962, PR fortran/70006,
+ PR fortran/71067, PR fortran/71730, PR fortran/71799, PR fortran/71859,
+ PR fortran/71862, PR fortran/77260, PR fortran/77351, PR fortran/77372,
+ PR fortran/77380, PR fortran/77391, PR fortran/77420, PR fortran/77429,
+ PR fortran/77460, PR fortran/77506, PR fortran/77507, PR fortran/77612,
+ PR fortran/77694, PR libgfortran/77707.
* Really fix gij installation on hppa. Closes: #838111.
- -- Matthias Klose <doko at debian.org> Fri, 30 Sep 2016 18:18:39 +0200
+ -- Matthias Klose <doko at debian.org> Wed, 05 Oct 2016 04:20:00 +0200
gcc-6 (6.2.0-5) unstable; urgency=medium
diff --git a/debian/patches/pr71709.diff b/debian/patches/pr71709.diff
deleted file mode 100644
index 505385a..0000000
--- a/debian/patches/pr71709.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-# DP: Fix PR rtl-optimization/71709, taken from the trunk
-
-gcc/
-
-2016-07-01 Alan Modra <amodra at gmail.com>
-
- PR rtl-optimization/71709
- * ira-lives.c (find_call_crossed_cheap_reg): Exit loop on arg reg
- being set, not referenced.
-
-
---- a/src/gcc/ira-lives.c
-+++ b/src/gcc/ira-lives.c
-@@ -1014,7 +1014,7 @@
- break;
- }
-
-- if (reg_overlap_mentioned_p (reg, PATTERN (prev)))
-+ if (reg_set_p (reg, prev))
- break;
- }
- prev = PREV_INSN (prev);
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 83b57a7..ef7e9cc 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 6 branch upto 20160922 (r240553).
+# DP: updates from the 6 branch upto 20161005 (r240765).
last_update()
{
cat > ${dir}LAST_UPDATED <EOF
-Tue Sep 27 20:06:22 CEST 2016
-Tue Sep 27 18:06:22 UTC 2016 (revision 240553)
+Wed Oct 5 03:59:55 CEST 2016
+Wed Oct 5 01:59:55 UTC 2016 (revision 240765)
EOF
}
@@ -143,6 +143,25 @@ Index: libstdc++-v3/configure
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
+@@ -18173,6 +18175,10 @@
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
++ # Use C++11 because a conforming <stdio.h> won't define gets for C++14,
++ # and we don't need a declaration for C++14 anyway.
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=gnu++11"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gets declaration" >&5
+ $as_echo_n "checking for gets declaration... " >&6; }
+@@ -18207,6 +18213,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_gets" >&5
+ $as_echo "$glibcxx_cv_gets" >&6; }
+
++ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
Index: libstdc++-v3/python/libstdcxx/v6/xmethods.py
===================================================================
--- a/src/libstdc++-v3/python/libstdcxx/v6/xmethods.py (.../tags/gcc_6_2_0_release)
@@ -387,6 +406,18 @@ Index: libstdc++-v3/doc/html/api.html
The rendered HTML, as above, is also available for download on the
gcc.gnu.org site in a directory located at
<code class="literal"><URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/></code>.
+Index: libstdc++-v3/include/Makefile.in
+===================================================================
+--- a/src/libstdc++-v3/include/Makefile.in (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/Makefile.in (.../branches/gcc-6-branch)
+@@ -970,6 +970,7 @@
+ experimental_bits_builddir = ./experimental/bits
+ experimental_bits_headers = \
+ ${experimental_bits_srcdir}/erase_if.h \
++ ${experimental_bits_srcdir}/lfts_config.h \
+ ${experimental_bits_srcdir}/shared_ptr.h \
+ ${experimental_bits_srcdir}/string_view.tcc \
+ ${experimental_bits_filesystem_headers}
Index: libstdc++-v3/include/debug/safe_iterator.h
===================================================================
--- a/src/libstdc++-v3/include/debug/safe_iterator.h (.../tags/gcc_6_2_0_release)
@@ -438,6 +469,548 @@ Index: libstdc++-v3/include/std/type_traits
static constexpr bool value = type::value;
};
+Index: libstdc++-v3/include/std/chrono
+===================================================================
+--- a/src/libstdc++-v3/include/std/chrono (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/std/chrono (.../branches/gcc-6-branch)
+@@ -788,6 +788,7 @@
+ {
+ inline namespace chrono_literals
+ {
++ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _Rep, unsigned long long _Val>
+ struct _Checked_integral_constant
+@@ -863,6 +864,7 @@
+ operator""ns()
+ { return __check_overflow<chrono::nanoseconds, _Digits...>(); }
+
++ _GLIBCXX_END_NAMESPACE_VERSION
+ } // inline namespace chrono_literals
+ } // inline namespace literals
+
+Index: libstdc++-v3/include/std/functional
+===================================================================
+--- a/src/libstdc++-v3/include/std/functional (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/std/functional (.../branches/gcc-6-branch)
+@@ -1462,7 +1462,7 @@
+ void (_Undefined_class::*_M_member_pointer)();
+ };
+
+- union _Any_data
++ union [[gnu::may_alias]] _Any_data
+ {
+ void* _M_access() { return &_M_pod_data[0]; }
+ const void* _M_access() const { return &_M_pod_data[0]; }
+Index: libstdc++-v3/include/std/complex
+===================================================================
+--- a/src/libstdc++-v3/include/std/complex (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/std/complex (.../branches/gcc-6-branch)
+@@ -1932,10 +1932,13 @@
+ conj(_Tp __x)
+ { return __x; }
+
++_GLIBCXX_END_NAMESPACE_VERSION
++
+ #if __cplusplus > 201103L
+
+ inline namespace literals {
+ inline namespace complex_literals {
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ #define __cpp_lib_complex_udls 201309
+
+@@ -1963,12 +1966,12 @@
+ operator""il(unsigned long long __num)
+ { return std::complex<long double>{0.0L, static_cast<long double>(__num)}; }
+
++_GLIBCXX_END_NAMESPACE_VERSION
+ } // inline namespace complex_literals
+ } // inline namespace literals
+
+ #endif // C++14
+
+-_GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+
+ #endif // C++11
+Index: libstdc++-v3/include/c_std/cstdio
+===================================================================
+--- a/src/libstdc++-v3/include/c_std/cstdio (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/c_std/cstdio (.../branches/gcc-6-branch)
+@@ -44,7 +44,7 @@
+ #include <bits/c++config.h>
+ #include <stdio.h>
+
+-#ifndef _GLIBCXX_HAVE_GETS
++#if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS)
+ extern "C" char* gets (char* __s) __attribute__((__deprecated__));
+ #endif
+
+Index: libstdc++-v3/include/experimental/memory_resource
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/memory_resource (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/memory_resource (.../branches/gcc-6-branch)
+@@ -34,6 +34,7 @@
+ #include <atomic>
+ #include <cstddef>
+ #include <bits/alloc_traits.h>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std {
+ namespace experimental {
+Index: libstdc++-v3/include/experimental/random
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/random (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/random (.../branches/gcc-6-branch)
+@@ -30,6 +30,7 @@
+ #define _GLIBCXX_EXPERIMENTAL_RANDOM 1
+
+ #include <random>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std {
+ namespace experimental {
+Index: libstdc++-v3/include/experimental/optional
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/optional (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/optional (.../branches/gcc-6-branch)
+@@ -53,6 +53,7 @@
+ #include <bits/functexcept.h>
+ #include <bits/functional_hash.h>
+ #include <bits/enable_special_members.h>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/algorithm
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/algorithm (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/algorithm (.../branches/gcc-6-branch)
+@@ -37,6 +37,7 @@
+
+ #include <algorithm>
+ #include <random>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/any
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/any (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/any (.../branches/gcc-6-branch)
+@@ -39,6 +39,7 @@
+ #include <new>
+ #include <utility>
+ #include <type_traits>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/propagate_const
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/propagate_const (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/propagate_const (.../branches/gcc-6-branch)
+@@ -37,6 +37,7 @@
+
+ #include <type_traits>
+ #include <functional>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/chrono
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/chrono (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/chrono (.../branches/gcc-6-branch)
+@@ -40,8 +40,8 @@
+ #else
+
+ #include <chrono>
++#include <experimental/bits/lfts_config.h>
+
+-
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ namespace chrono {
+Index: libstdc++-v3/include/experimental/tuple
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/tuple (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/tuple (.../branches/gcc-6-branch)
+@@ -37,6 +37,7 @@
+
+ #include <tuple>
+ #include <functional>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/system_error
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/system_error (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/system_error (.../branches/gcc-6-branch)
+@@ -40,8 +40,8 @@
+ #else
+
+ #include <system_error>
++#include <experimental/bits/lfts_config.h>
+
+-
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ namespace experimental
+@@ -49,6 +49,7 @@
+ inline namespace fundamentals_v1
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
++
+ // See C++14 §19.5, System error support
+ template <typename _Tp>
+ constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
+@@ -55,6 +56,7 @@
+ template <typename _Tp>
+ constexpr bool is_error_condition_enum_v =
+ is_error_condition_enum<_Tp>::value;
++
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace fundamentals_v1
+ } // namespace experimental
+Index: libstdc++-v3/include/experimental/string_view
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/string_view (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/string_view (.../branches/gcc-6-branch)
+@@ -41,6 +41,7 @@
+
+ #include <string>
+ #include <limits>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+@@ -651,13 +652,12 @@
+
+ namespace experimental
+ {
+-_GLIBCXX_BEGIN_NAMESPACE_VERSION
+-
+ // I added these EMSR.
+ inline namespace literals
+ {
+ inline namespace string_view_literals
+ {
++ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ inline constexpr basic_string_view<char>
+ operator""sv(const char* __str, size_t __len)
+@@ -679,10 +679,9 @@
+ { return basic_string_view<char32_t>{__str, __len}; }
+ #endif
+
+- }
+- }
+-
+-_GLIBCXX_END_NAMESPACE_VERSION
++ _GLIBCXX_END_NAMESPACE_VERSION
++ } // namespace string_literals
++ } // namespace literals
+ } // namespace experimental
+ } // namespace std
+
+Index: libstdc++-v3/include/experimental/bits/erase_if.h
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/bits/erase_if.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/bits/erase_if.h (.../branches/gcc-6-branch)
+@@ -35,6 +35,7 @@
+ #if __cplusplus <= 201103L
+ # include <bits/c++14_warning.h>
+ #else
++#include <experimental/bits/lfts_config.h>
+
+ namespace std
+ {
+Index: libstdc++-v3/include/experimental/bits/lfts_config.h
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/bits/lfts_config.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/bits/lfts_config.h (.../branches/gcc-6-branch)
+@@ -0,0 +1,60 @@
++// Namespace declarations for Library Fundamentals TS -*- C++ -*-
++
++// Copyright (C) 2016 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// Under Section 7 of GPL version 3, you are granted additional
++// permissions described in the GCC Runtime Library Exception, version
++// 3.1, as published by the Free Software Foundation.
++
++// You should have received a copy of the GNU General Public License and
++// a copy of the GCC Runtime Library Exception along with this program;
++// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
++// <http://www.gnu.org/licenses/>.
++
++/** @file experimental/bits/lfts_config.h
++ * This is an internal header file, included by other library headers.
++ * Do not attempt to use it directly.
++ */
++
++#if __cplusplus <= 201103L
++# include <bits/c++14_warning.h>
++#else
++#include <bits/c++config.h>
++
++#if _GLIBCXX_INLINE_VERSION
++namespace std _GLIBCXX_VISIBILITY(default)
++{
++namespace chrono
++{
++namespace experimental
++{
++inline namespace fundamentals_v1 { inline namespace __7 { } }
++inline namespace fundamentals_v2 { inline namespace __7 { } }
++} // namespace experimental
++} // namespace chrono
++
++namespace experimental
++{
++inline namespace fundamentals_v1 { inline namespace __7 { } }
++inline namespace fundamentals_v2 {
++ inline namespace __7 { }
++ namespace pmr { inline namespace __7 { } }
++} // namespace fundamentals_v2
++inline namespace literals { inline namespace string_view_literals {
++ inline namespace __7 { }
++} } // namespace literals::string_view_literals
++} // namespace experimental
++} // namespace std
++#endif
++#endif
+Index: libstdc++-v3/include/experimental/bits/string_view.tcc
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/bits/string_view.tcc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/bits/string_view.tcc (.../branches/gcc-6-branch)
+@@ -44,6 +44,8 @@
+ {
+ namespace experimental
+ {
++inline namespace fundamentals_v1
++{
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ template<typename _CharT, typename _Traits>
+@@ -222,6 +224,7 @@
+ }
+
+ _GLIBCXX_END_NAMESPACE_VERSION
++} // namespace fundamentals_v1
+ } // namespace experimental
+ } // namespace std
+
+Index: libstdc++-v3/include/experimental/bits/fs_fwd.h
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/bits/fs_fwd.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/bits/fs_fwd.h (.../branches/gcc-6-branch)
+@@ -46,10 +46,13 @@
+ {
+ inline namespace v1
+ {
++#if _GLIBCXX_INLINE_VERSION
++inline namespace __7 { }
++#endif
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ #if _GLIBCXX_USE_CXX11_ABI
+- inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
++inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
+ #endif
+
+ /**
+Index: libstdc++-v3/include/experimental/numeric
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/numeric (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/numeric (.../branches/gcc-6-branch)
+@@ -39,8 +39,8 @@
+ # include <bits/c++14_warning.h>
+ #else
+
++#include <numeric>
+ #include <experimental/type_traits>
+-#include <cmath>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+@@ -52,6 +52,19 @@
+
+ #define __cpp_lib_experimental_gcd_lcm 201411
+
++ // std::abs is not constexpr and doesn't support unsigned integers.
++ template<typename _Tp>
++ constexpr
++ enable_if_t<__and_<is_integral<_Tp>, is_signed<_Tp>>::value, _Tp>
++ __abs(_Tp __val)
++ { return __val < 0 ? -__val : __val; }
++
++ template<typename _Tp>
++ constexpr
++ enable_if_t<__and_<is_integral<_Tp>, is_unsigned<_Tp>>::value, _Tp>
++ __abs(_Tp __val)
++ { return __val; }
++
+ // Greatest common divisor
+ template<typename _Mn, typename _Nn>
+ constexpr common_type_t<_Mn, _Nn>
+@@ -60,8 +73,8 @@
+ static_assert(is_integral<_Mn>::value, "arguments to gcd are integers");
+ static_assert(is_integral<_Nn>::value, "arguments to gcd are integers");
+
+- return __m == 0 ? std::abs(__n)
+- : __n == 0 ? std::abs(__m)
++ return __m == 0 ? fundamentals_v2::__abs(__n)
++ : __n == 0 ? fundamentals_v2::__abs(__m)
+ : fundamentals_v2::gcd(__n, __m % __n);
+ }
+
+@@ -74,7 +87,8 @@
+ static_assert(is_integral<_Nn>::value, "arguments to lcm are integers");
+
+ return (__m != 0 && __n != 0)
+- ? (std::abs(__m) / fundamentals_v2::gcd(__m, __n)) * std::abs(__n)
++ ? (fundamentals_v2::__abs(__m) / fundamentals_v2::gcd(__m, __n))
++ * fundamentals_v2::__abs(__n)
+ : 0;
+ }
+
+Index: libstdc++-v3/include/experimental/functional
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/functional (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/functional (.../branches/gcc-6-branch)
+@@ -45,6 +45,7 @@
+ #ifdef _GLIBCXX_PARALLEL
+ # include <parallel/algorithm> // For std::__parallel::search
+ #endif
++#include <experimental/bits/lfts_config.h>
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: libstdc++-v3/include/experimental/utility
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/utility (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/utility (.../branches/gcc-6-branch)
+@@ -31,6 +31,7 @@
+
+ #include <utility>
+ #include <bits/uses_allocator.h>
++#include <experimental/bits/lfts_config.h>
+
+ namespace std {
+ namespace experimental {
+Index: libstdc++-v3/include/experimental/type_traits
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/type_traits (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/type_traits (.../branches/gcc-6-branch)
+@@ -40,8 +40,8 @@
+ #else
+
+ #include <type_traits>
++#include <experimental/bits/lfts_config.h>
+
+-
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ namespace experimental
+Index: libstdc++-v3/include/experimental/ratio
+===================================================================
+--- a/src/libstdc++-v3/include/experimental/ratio (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/experimental/ratio (.../branches/gcc-6-branch)
+@@ -40,8 +40,8 @@
+ #else
+
+ #include <ratio>
++#include <experimental/bits/lfts_config.h>
+
+-
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ namespace experimental
+@@ -49,6 +49,7 @@
+ inline namespace fundamentals_v1
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
++
+ // See C++14 §20.11.5, ratio comparison
+ template <typename _R1, typename _R2>
+ constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value;
+Index: libstdc++-v3/include/bits/uniform_int_dist.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/uniform_int_dist.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/bits/uniform_int_dist.h (.../branches/gcc-6-branch)
+@@ -36,10 +36,10 @@
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+-_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ namespace __detail
+ {
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ /* Determine whether number is a power of 2. */
+ template<typename _Tp>
+ inline bool
+@@ -47,8 +47,11 @@
+ {
+ return ((__x - 1) & __x) == 0;
+ };
++_GLIBCXX_END_NAMESPACE_VERSION
+ }
+
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
++
+ /**
+ * @brief Uniform discrete distribution for random numbers.
+ * A discrete random distribution on the range @f$[min, max]@f$ with equal
+Index: libstdc++-v3/include/bits/basic_string.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/basic_string.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/bits/basic_string.h (.../branches/gcc-6-branch)
+@@ -5698,6 +5698,8 @@
+ { };
+ #endif
+
++_GLIBCXX_END_NAMESPACE_VERSION
++
+ #if __cplusplus > 201103L
+
+ #define __cpp_lib_string_udls 201304
+@@ -5706,6 +5708,7 @@
+ {
+ inline namespace string_literals
+ {
++_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ _GLIBCXX_DEFAULT_ABI_TAG
+ inline basic_string<char>
+@@ -5731,12 +5734,12 @@
+ { return basic_string<char32_t>{__str, __len}; }
+ #endif
+
++_GLIBCXX_END_NAMESPACE_VERSION
+ } // inline namespace string_literals
+ } // inline namespace literals
+
+ #endif // __cplusplus > 201103L
+
+-_GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace std
+
+ #endif // C++11
Index: libstdc++-v3/include/bits/stl_pair.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_pair.h (.../tags/gcc_6_2_0_release)
@@ -794,6 +1367,37 @@ Index: libstdc++-v3/include/bits/stl_pair.h
operator=(pair<_U1, _U2>&& __p)
{
first = std::forward<_U1>(__p.first);
+Index: libstdc++-v3/include/bits/c++config
+===================================================================
+--- a/src/libstdc++-v3/include/bits/c++config (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/bits/c++config (.../branches/gcc-6-branch)
+@@ -179,8 +179,11 @@
+ namespace placeholders { }
+ namespace regex_constants { }
+ namespace this_thread { }
+-
+- namespace experimental { }
++ inline namespace literals {
++ inline namespace chrono_literals { }
++ inline namespace complex_literals { }
++ inline namespace string_literals { }
++ }
+ }
+
+ namespace abi { }
+@@ -265,7 +268,11 @@
+ namespace regex_constants { inline namespace __7 { } }
+ namespace this_thread { inline namespace __7 { } }
+
+- namespace experimental { inline namespace __7 { } }
++ inline namespace literals {
++ inline namespace chrono_literals { inline namespace __7 { } }
++ inline namespace complex_literals { inline namespace __7 { } }
++ inline namespace string_literals { inline namespace __7 { } }
++ }
+
+ namespace __detail { inline namespace __7 { } }
+ }
Index: libstdc++-v3/include/bits/stl_iterator.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_iterator.h (.../tags/gcc_6_2_0_release)
@@ -815,6 +1419,46 @@ Index: libstdc++-v3/include/bits/stl_iterator.h
{ return __y.base() - __x.base(); }
template<typename _Iterator>
+Index: libstdc++-v3/include/bits/regex.h
+===================================================================
+--- a/src/libstdc++-v3/include/bits/regex.h (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/bits/regex.h (.../branches/gcc-6-branch)
+@@ -769,10 +769,13 @@
+
+ template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
+ __detail::_RegexExecutorPolicy, bool>
+- friend bool
+- __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
+- const basic_regex<_Cp, _Rp>&,
+- regex_constants::match_flag_type);
++ friend bool __detail::
++#if _GLIBCXX_INLINE_VERSION
++ __7:: // Required due to PR c++/59256
++#endif
++ __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
++ const basic_regex<_Cp, _Rp>&,
++ regex_constants::match_flag_type);
+
+ template<typename, typename, typename, bool>
+ friend class __detail::_Executor;
+@@ -1860,10 +1863,13 @@
+
+ template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
+ __detail::_RegexExecutorPolicy, bool>
+- friend bool
+- __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
+- const basic_regex<_Cp, _Rp>&,
+- regex_constants::match_flag_type);
++ friend bool __detail::
++#if _GLIBCXX_INLINE_VERSION
++ __7:: // Required due to PR c++/59256
++#endif
++ __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
++ const basic_regex<_Cp, _Rp>&,
++ regex_constants::match_flag_type);
+
+ void
+ _M_resize(unsigned int __size)
Index: libstdc++-v3/include/bits/stl_tree.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_6_2_0_release)
@@ -900,11 +1544,110 @@ Index: libstdc++-v3/include/bits/stl_tree.h
return *this;
}
+Index: libstdc++-v3/include/c_global/cstdio
+===================================================================
+--- a/src/libstdc++-v3/include/c_global/cstdio (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/c_global/cstdio (.../branches/gcc-6-branch)
+@@ -44,7 +44,7 @@
+ #ifndef _GLIBCXX_CSTDIO
+ #define _GLIBCXX_CSTDIO 1
+
+-#ifndef _GLIBCXX_HAVE_GETS
++#if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS)
+ extern "C" char* gets (char* __s) __attribute__((__deprecated__));
+ #endif
+
+Index: libstdc++-v3/include/Makefile.am
+===================================================================
+--- a/src/libstdc++-v3/include/Makefile.am (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/Makefile.am (.../branches/gcc-6-branch)
+@@ -681,6 +681,7 @@
+ experimental_bits_builddir = ./experimental/bits
+ experimental_bits_headers = \
+ ${experimental_bits_srcdir}/erase_if.h \
++ ${experimental_bits_srcdir}/lfts_config.h \
+ ${experimental_bits_srcdir}/shared_ptr.h \
+ ${experimental_bits_srcdir}/string_view.tcc \
+ ${experimental_bits_filesystem_headers}
Index: libstdc++-v3/ChangeLog
===================================================================
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,106 @@
+@@ -1,3 +1,180 @@
++2016-10-03 Jonathan Wakely <jwakely at redhat.com>
++
++ PR libstdc++/68323
++ PR libstdc++/77794
++ * config/abi/pre/gnu-versioned-namespace.ver: Add exports for
++ __cxa_thread_atexit and __gnu_cxx::__freeres.
++ * include/Makefile.am: Add <experimental/bits/lfts_config.h>
++ * include/Makefile.in: Regenerate.
++ * include.bits/basic_string.h: Fix nesting of versioned namespaces.
++ * include/bits/c++config: Declare versioned namespaces for literals.
++ * include/bits/regex.h (basic_regex, match_results): Add workarounds
++ for PR c++/59256.
++ * include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
++ * include/std/chrono: Likewise.
++ * include/std/complex: Likewise.
++ * include/experimental/bits/fs_fwd.h: Declare versioned namespace.
++ * include/experimental/bits/lfts_config.h: Declare versioned
++ namespaces.
++ * include/experimental/algorithm: Include
++ <experimental/bits/lfts_config.h>.
++ * include/experimental/any: Likewise.
++ * include/experimental/bits/erase_if.h: Likewise.
++ * include/experimental/chrono: Likewise.
++ * include/experimental/functional: Likewise.
++ * include/experimental/memory_resource: Likewise.
++ * include/experimental/optional: Likewise.
++ * include/experimental/propagate_const: Likewise.
++ * include/experimental/random: Likewise.
++ * include/experimental/ratio: Likewise.
++ * include/experimental/system_error: Likewise.
++ * include/experimental/tuple: Likewise.
++ * include/experimental/type_traits: Likewise.
++ * include/experimental/utility: Likewise.
++ * include/experimental/string_view: Likewise. Fix nesting of
++ versioned namespaces.
++ * include/experimental/bits/string_view.tcc: Reopen inline namespace
++ for non-inline function definitions.
++ * testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
++ * testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
++ * testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
++ * testsuite/experimental/propagate_const/assignment/move_neg.cc:
++ Likewise.
++ * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
++ * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
++ * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
++ * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
++ * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
++ * testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
++
++2016-09-30 Jonathan Wakely <jwakely at redhat.com>
++
++ PR libstdc++/77795
++ * acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check
++ for gets.
++ * config.h.in: Regenerate.
++ * configure: Regenerate.
++ * include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare
++ for C++98 and C++11.
++ * include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise.
++ * testsuite/27_io/headers/cstdio/functions_neg.cc: New test.
++
++ PR libstdc++/77801
++ * include/experimental/numeric: Include <numeric>.
++ (__abs): Define.
++ (gcd, lcm): Use __abs instead of std::abs.
++ * testsuite/experimental/numeric/77801.cc: New test.
++ * testsuite/experimental/numeric/gcd.cc: Test unsigned inputs.
++ * testsuite/experimental/numeric/lcm.cc: Likewise.
++
++2016-09-28 Jonathan Wakely <jwakely at redhat.com>
++
++ PR libstdc++/77686
++ * include/std/functional (_Any_data): Add may_alias attribute.
++
+2016-09-27 Jonathan Wakely <jwakely at redhat.com>
+
+ * include/debug/safe_iterator.h (_Safe_iterator::operator++()): Fix
@@ -1059,6 +1802,19 @@ Index: libstdc++-v3/testsuite/24_iterators/reverse_iterator/71771.cc
+ c(i);
+ diff2(std::rbegin(c), std::rend(c));
+}
+Index: libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc (.../branches/gcc-6-branch)
+@@ -25,7 +25,7 @@
+
+ #include <vector>
+
+-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 324 }
++// { dg-error "multiple inlined namespaces" "" { target *-*-* } 331 }
+
+ // "template argument 1 is invalid"
+ // { dg-prune-output "tuple:993" }
Index: libstdc++-v3/testsuite/23_containers/map/77334.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/23_containers/map/77334.cc (.../tags/gcc_6_2_0_release)
@@ -1093,6 +1849,269 @@ Index: libstdc++-v3/testsuite/23_containers/map/77334.cc
+ std::map<int, A> m1, m2;
+ m2 = std::move(m1);
+}
+Index: libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/27_io/headers/cstdio/functions_neg.cc (.../branches/gcc-6-branch)
+@@ -0,0 +1,25 @@
++// { dg-do compile { target c++14 } }
++
++// Copyright (C) 2007-2016 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <cstdio>
++
++namespace gnu
++{
++ using std::gets; // { dg-error "has not been declared" }
++}
+Index: libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc (.../branches/gcc-6-branch)
+@@ -26,5 +26,5 @@
+ using std::experimental::any_cast;
+
+ const any y(1);
+- any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 368 }
++ any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 369 }
+ }
+Index: libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc (.../branches/gcc-6-branch)
+@@ -26,10 +26,10 @@
+ using std::experimental::propagate_const;
+ using std::unique_ptr;
+
+-// { dg-error "no type" "" { target *-*-* } 117 }
+-// { dg-error "no type" "" { target *-*-* } 124 }
+-// { dg-error "no type" "" { target *-*-* } 133 }
+-// { dg-error "no type" "" { target *-*-* } 142 }
++// { dg-error "no type" "" { target *-*-* } 118 }
++// { dg-error "no type" "" { target *-*-* } 125 }
++// { dg-error "no type" "" { target *-*-* } 134 }
++// { dg-error "no type" "" { target *-*-* } 143 }
+
+ int main()
+ {
+Index: libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc (.../branches/gcc-6-branch)
+@@ -26,7 +26,7 @@
+ using std::experimental::propagate_const;
+ using std::unique_ptr;
+
+-// { dg-error "no type" "" { target *-*-* } 158 }
++// { dg-error "no type" "" { target *-*-* } 159 }
+
+ int main()
+ {
+Index: libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc (.../branches/gcc-6-branch)
+@@ -22,9 +22,9 @@
+
+ using std::experimental::propagate_const;
+
+-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 104 }
+-// { dg-error "not a pointer-to-object type" "" { target *-*-* } 65 }
+-// { dg-error "forming pointer to reference type" "" { target *-*-* } 184 }
+-// { dg-error "forming pointer to reference type" "" { target *-*-* } 210 }
++// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
++// { dg-error "not a pointer-to-object type" "" { target *-*-* } 66 }
++// { dg-error "forming pointer to reference type" "" { target *-*-* } 185 }
++// { dg-error "forming pointer to reference type" "" { target *-*-* } 211 }
+
+ propagate_const<void*> test1;
+Index: libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements3.cc (.../branches/gcc-6-branch)
+@@ -22,6 +22,6 @@
+
+ using std::experimental::propagate_const;
+
+-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 104 }
++// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
+
+ propagate_const<void (*)()> test1;
+Index: libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements4.cc (.../branches/gcc-6-branch)
+@@ -22,8 +22,8 @@
+
+ using std::experimental::propagate_const;
+
+-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 104 }
+-// { dg-error "invalid type" "" { target *-*-* } 65 }
+-// { dg-error "uninitialized reference member" "" { target *-*-* } 111 }
++// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
++// { dg-error "invalid type" "" { target *-*-* } 66 }
++// { dg-error "uninitialized reference member" "" { target *-*-* } 112 }
+
+ propagate_const<int&> test1; // { dg-error "use of deleted function" }
+Index: libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/propagate_const/requirements5.cc (.../branches/gcc-6-branch)
+@@ -22,6 +22,6 @@
+
+ using std::experimental::propagate_const;
+
+-// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 104 }
++// { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 105 }
+
+ propagate_const<int[1]> test1;
+Index: libstdc++-v3/testsuite/experimental/numeric/lcm.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/numeric/lcm.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/numeric/lcm.cc (.../branches/gcc-6-branch)
+@@ -30,3 +30,6 @@
+ static_assert( gcd(29, 0) == 29, "GCD of any number and 0 is that number" );
+ static_assert( gcd(0, 0) == 0, "" );
+
++static_assert(gcd(1u, 2) == 1, "unsigned and signed");
++static_assert(gcd(3, 4u) == 1, "signed and unsigned");
++static_assert(gcd(5u, 6u) == 1, "unsigned and unsigned");
+Index: libstdc++-v3/testsuite/experimental/numeric/gcd.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/numeric/gcd.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/numeric/gcd.cc (.../branches/gcc-6-branch)
+@@ -26,3 +26,7 @@
+ static_assert(lcm(41, 0) == 0, "LCD with zero is zero");
+ static_assert(lcm(0, 7) == 0, "LCD with zero is zero");
+ static_assert(lcm(0, 0) == 0, "no division by zero");
++
++static_assert(lcm(1u, 2) == 2, "unsigned and signed");
++static_assert(lcm(3, 4u) == 12, "signed and unsigned");
++static_assert(lcm(5u, 6u) == 30, "unsigned and unsigned");
+Index: libstdc++-v3/testsuite/experimental/numeric/77801.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/experimental/numeric/77801.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/experimental/numeric/77801.cc (.../branches/gcc-6-branch)
+@@ -0,0 +1,22 @@
++// Copyright (C) 2016 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++// { dg-do compile { target c++14 } }
++
++#include <cstdlib>
++#include <experimental/numeric>
++constexpr int i = std::experimental::gcd(4L, 5L); // PR libstdc++/77801
+Index: libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc (.../branches/gcc-6-branch)
+@@ -0,0 +1,66 @@
++// { dg-options "-std=gnu++11" }
++// { dg-do compile }
++
++// Copyright (C) 2016 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 3, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING3. If not see
++// <http://www.gnu.org/licenses/>.
++
++#include <algorithm>
++#include <array>
++#include <bitset>
++#include <complex>
++#include <deque>
++#include <exception>
++#include <fstream>
++#include <functional>
++#include <iomanip>
++#include <ios>
++#include <iosfwd>
++#include <iostream>
++#include <istream>
++#include <iterator>
++#include <limits>
++#include <list>
++#include <locale>
++#include <map>
++#include <memory>
++#include <new>
++#include <numeric>
++#include <ostream>
++#include <queue>
++#include <random>
++#include <regex>
++#include <set>
++#include <sstream>
++#include <stack>
++#include <stdexcept>
++#include <streambuf>
++#include <string>
++#include <tuple>
++#include <typeinfo>
++#include <type_traits>
++#include <unordered_map>
++#include <unordered_set>
++#include <utility>
++#include <valarray>
++#include <vector>
++
++namespace gnu
++{
++ using namespace std::experimental; // { dg-error "is not a namespace-name" }
++}
++
++// { dg-error "expected namespace-name before" "" { target *-*-* } 63 }
+Index: libstdc++-v3/testsuite/20_util/duration/literals/range.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/duration/literals/range.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/duration/literals/range.cc (.../branches/gcc-6-branch)
+@@ -27,5 +27,5 @@
+
+ // std::numeric_limits<int64_t>::max() == 9223372036854775807;
+ auto h = 9223372036854775808h;
+- // { dg-error "cannot be represented" "" { target *-*-* } 796 }
++ // { dg-error "cannot be represented" "" { target *-*-* } 797 }
+ }
Index: libstdc++-v3/testsuite/20_util/pair/traits.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/20_util/pair/traits.cc (.../tags/gcc_6_2_0_release)
@@ -1337,6 +2356,19 @@ Index: libstdc++-v3/testsuite/20_util/is_constructible/77395.cc
+ derived&& d2(std::move(b));
+ static_assert(std::is_constructible<derived&&, base&&>::value, "");
+}
+Index: libstdc++-v3/config.h.in
+===================================================================
+--- a/src/libstdc++-v3/config.h.in (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/config.h.in (.../branches/gcc-6-branch)
+@@ -180,7 +180,7 @@
+ /* Define if _Unwind_GetIPInfo is available. */
+ #undef HAVE_GETIPINFO
+
+-/* Define if gets is available in <stdio.h>. */
++/* Define if gets is available in <stdio.h> before C++14. */
+ #undef HAVE_GETS
+
+ /* Define to 1 if you have the `hypot' function. */
Index: libstdc++-v3/config/cpu/m68k/atomicity.h
===================================================================
--- a/src/libstdc++-v3/config/cpu/m68k/atomicity.h (.../tags/gcc_6_2_0_release)
@@ -1351,11 +2383,57 @@ Index: libstdc++-v3/config/cpu/m68k/atomicity.h
// TAS/JBNE is unsafe on systems with strict priority-based scheduling.
// Disable interrupts, which we can do only from supervisor mode.
_Atomic_word
+Index: libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+===================================================================
+--- a/src/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver (.../branches/gcc-6-branch)
+@@ -186,6 +186,7 @@
+ __cxa_guard_release;
+ __cxa_pure_virtual;
+ __cxa_rethrow;
++ __cxa_thread_atexit;
+ __cxa_throw;
+ __cxa_type_match;
+ __cxa_vec_cctor;
+@@ -342,6 +343,9 @@
+ _ZdlPv[jmy];
+ # operator delete[](void*, std::size_t)
+ _ZdaPv[jmy];
++
++ # __gnu_cxx::__freeres()
++ _ZN9__gnu_cxx9__freeresEv;
+ };
+
+ # Symbols in the support library (libsupc++) supporting trans-mem.
Index: libstdc++-v3/acinclude.m4
===================================================================
--- a/src/libstdc++-v3/acinclude.m4 (.../tags/gcc_6_2_0_release)
+++ b/src/libstdc++-v3/acinclude.m4 (.../branches/gcc-6-branch)
-@@ -3489,10 +3489,12 @@
+@@ -2153,6 +2153,10 @@
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
++ # Use C++11 because a conforming <stdio.h> won't define gets for C++14,
++ # and we don't need a declaration for C++14 anyway.
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=gnu++11"
+
+ AC_MSG_CHECKING([for gets declaration])
+ AC_CACHE_VAL(glibcxx_cv_gets, [
+@@ -2168,10 +2172,11 @@
+ )])
+
+ if test $glibcxx_cv_gets = yes; then
+- AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in <stdio.h>.])
++ AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in <stdio.h> before C++14.])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_gets)
+
++ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+@@ -3489,10 +3494,12 @@
CXXFLAGS="$old_CXXFLAGS"
AC_LANG_RESTORE
@@ -1405,7 +2483,15 @@ Index: libgcc/ChangeLog
===================================================================
--- a/src/libgcc/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/libgcc/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,7 @@
+@@ -1,3 +1,15 @@
++2016-09-28 Joseph Myers <joseph at codesourcery.com>
++
++ Backport from mainline
++ 2016-09-07 Joseph Myers <joseph at codesourcery.com>
++
++ PR libgcc/77519
++ * libgcc2.c (NOTRUNC): Invert settings.
++
+2016-08-31 Jakub Sejdak <jakub.sejdak at phoesys.com>
+
+ * config.host: Add support for arm*-*-phoenix* targets.
@@ -1413,6 +2499,40 @@ Index: libgcc/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
+Index: libgcc/libgcc2.c
+===================================================================
+--- a/src/libgcc/libgcc2.c (.../tags/gcc_6_2_0_release)
++++ b/src/libgcc/libgcc2.c (.../branches/gcc-6-branch)
+@@ -1866,25 +1866,25 @@
+ # define CTYPE SCtype
+ # define MODE sc
+ # define CEXT __LIBGCC_SF_FUNC_EXT__
+-# define NOTRUNC __LIBGCC_SF_EXCESS_PRECISION__
++# define NOTRUNC (!__LIBGCC_SF_EXCESS_PRECISION__)
+ #elif defined(L_muldc3) || defined(L_divdc3)
+ # define MTYPE DFtype
+ # define CTYPE DCtype
+ # define MODE dc
+ # define CEXT __LIBGCC_DF_FUNC_EXT__
+-# define NOTRUNC __LIBGCC_DF_EXCESS_PRECISION__
++# define NOTRUNC (!__LIBGCC_DF_EXCESS_PRECISION__)
+ #elif defined(L_mulxc3) || defined(L_divxc3)
+ # define MTYPE XFtype
+ # define CTYPE XCtype
+ # define MODE xc
+ # define CEXT __LIBGCC_XF_FUNC_EXT__
+-# define NOTRUNC __LIBGCC_XF_EXCESS_PRECISION__
++# define NOTRUNC (!__LIBGCC_XF_EXCESS_PRECISION__)
+ #elif defined(L_multc3) || defined(L_divtc3)
+ # define MTYPE TFtype
+ # define CTYPE TCtype
+ # define MODE tc
+ # define CEXT __LIBGCC_TF_FUNC_EXT__
+-# define NOTRUNC __LIBGCC_TF_EXCESS_PRECISION__
++# define NOTRUNC (!__LIBGCC_TF_EXCESS_PRECISION__)
+ #else
+ # error
+ #endif
Index: gcc/tree-vrp.c
===================================================================
--- a/src/gcc/tree-vrp.c (.../tags/gcc_6_2_0_release)
@@ -1606,7 +2726,7 @@ Index: gcc/DATESTAMP
+++ b/src/gcc/DATESTAMP (.../branches/gcc-6-branch)
@@ -1 +1 @@
-20160822
-+20160927
++20161005
Index: gcc/configure
===================================================================
--- a/src/gcc/configure (.../tags/gcc_6_2_0_release)
@@ -1755,7 +2875,46 @@ Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,380 @@
+@@ -1,3 +1,419 @@
++2016-10-04 Uros Bizjak <ubizjak at gmail.com>
++
++ Backport from mainline
++ 2016-09-29 Uros Bizjak <ubizjak at gmail.com>
++
++ * config/i386/driver-i386.c (host_detect_local_cpu): Check maximum
++ ext_level before calling CPUID with 0x80000008.
++
++ 2016-09-29 Uros Bizjak <ubizjak at gmail.com>
++
++ PR target/77756
++ * config/i386/cpuid.h (__get_cpuid_count): New.
++ (__get_cpuid): Rename __level to __leaf.
++
++2016-09-30 Michael Meissner <meissner at linux.vnet.ibm.com>
++
++ Back port from trunk
++
++ 2016-09-21 Michael Meissner <meissner at linux.vnet.ibm.com>
++
++ PR target/77670
++ * config/rs6000/predicates.md (invert_fpmask_comparison_operator):
++ New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP
++ instructions when you want to invert the test.
++ * config/rs6000/rs6000.md (fpmask<mode>): Use the arguments in the
++ correct order for XXSEL.
++ (mov<SFDF:mode><SFDF2:mode>cc_invert_p9): Define the inverted test
++ for using XSCMP{EQ,GT,GE}DP.
++
++2016-09-28 Bill Schmidt <wschmidt at linux.vnet.ibm.com>
++ Alan Modra <amodra at gmail.com>
++
++ Backport from mainline
++ 2016-07-01 Alan Modra <amodra at gmail.com>
++
++ PR rtl-optimization/71709
++ * ira-lives.c (find_call_crossed_cheap_reg): Exit loop on arg reg
++ being set, not referenced.
++
+2016-09-27 David Edelsohn <dje.gcc at gmail.com>
+
+ Backport from mainline
@@ -1768,7 +2927,7 @@ Index: gcc/ChangeLog
+
+ * configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment.
+ * configure: Regenerate.
-+
++
+2016-09-27 Richard Biener <rguenther at suse.de>
+
+ Backport from mainline
@@ -1802,7 +2961,7 @@ Index: gcc/ChangeLog
+ proper niter to bound the loops.
+
+ 2016-09-22 Richard Biener <rguenther at suse.de>
-+
++
+ PR middle-end/77679
+ * gimple-fold.c (fold_array_ctor_reference): Turn asserts into
+ fold fails.
@@ -2136,7 +3295,7 @@ Index: gcc/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
-@@ -205,9 +586,9 @@
+@@ -205,9 +625,9 @@
2016-08-09 Martin Jambor <mjambor at suse.cz>
@@ -2297,6 +3456,33 @@ Index: gcc/testsuite/gcc.target/i386/pr72867.c
+ if (!__builtin_isnan (x[0]))
+ abort ();
+}
+Index: gcc/testsuite/gcc.target/i386/pr77756.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr77756.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr77756.c (.../branches/gcc-6-branch)
+@@ -0,0 +1,22 @@
++/* { dg-do run } */
++
++#include "cpuid.h"
++
++int
++main ()
++{
++ __builtin_cpu_init ();
++
++ if (__builtin_cpu_supports ("avx2"))
++ {
++ unsigned int eax, ebx, ecx, edx;
++
++ if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx))
++ __builtin_abort ();
++
++ if (!(ebx & bit_AVX2))
++ __builtin_abort ();
++ }
++
++ return 0;
++}
Index: gcc/testsuite/gcc.target/i386/pr69255-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr69255-1.c (.../tags/gcc_6_2_0_release)
@@ -2445,6 +3631,67 @@ Index: gcc/testsuite/gcc.target/i386/pr77377.c
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+#include "../../c-c++-common/pr59037.c"
+Index: gcc/testsuite/lib/gcc-dg.exp
+===================================================================
+--- a/src/gcc/testsuite/lib/gcc-dg.exp (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/lib/gcc-dg.exp (.../branches/gcc-6-branch)
+@@ -944,6 +944,13 @@
+ proc process-message { msgproc msgprefix dgargs } {
+ upvar dg-messages dg-messages
+
++ # Handle relative line specification, .+1 or .-1 etc.
++ if { [llength $dgargs] == 5
++ && [regsub "^\.\[+-\](\[0-9\])$" [lindex $dgargs 4] "\\1" num] } {
++ set num [expr [lindex $dgargs 0] [string index [lindex $dgargs 4] 1] $num]
++ set dgargs [lreplace $dgargs 4 4 $num]
++ }
++
+ # Process the dg- directive, including adding the regular expression
+ # to the new message entry in dg-messages.
+ set msgcnt [llength ${dg-messages}]
+Index: gcc/testsuite/gfortran.dg/pr77420_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77420_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77420_1.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,15 @@
++! { dg-do compile }
++module test_equivalence
++ real, private :: array1(100)
++ real, private :: array2(100)
++ equivalence(array1(3),array2(3))
++end module test_equivalence
++
++module mymodule
++ use test_equivalence
++ real, dimension(:), allocatable :: array1
++end module mymodule
++
++program test
++ use mymodule
++end program test
+Index: gcc/testsuite/gfortran.dg/pr77506.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77506.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77506.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,4 @@
++! { dg-do compile }
++program foo
++ print *, [character(len=*)::'ab','cd'] ! { dg-error "contain an asterisk" }
++end program foo
+Index: gcc/testsuite/gfortran.dg/empty_label_typedecl.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/empty_label_typedecl.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/empty_label_typedecl.f90 (.../branches/gcc-6-branch)
+@@ -1,8 +1,6 @@
+ ! { dg-do compile }
+-! { dg-options "-Werror" }
+ subroutine s
+ type t
+- 1 ! { dg-error "empty statement" }
++ 1 ! { dg-error "Statement label without statement" }
+ end type
+ end subroutine
+-! { dg-excess-errors "warnings being treated as errors" }
Index: gcc/testsuite/gfortran.dg/gomp/pr77352.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr77352.f90 (.../tags/gcc_6_2_0_release)
@@ -2614,6 +3861,19 @@ Index: gcc/testsuite/gfortran.dg/gomp/pr69281.f90
+ integer, dimension(:,:), intent(in) :: a
+ end subroutine
+end program
+Index: gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/warnings_are_errors_1.f90 (.../branches/gcc-6-branch)
+@@ -20,8 +20,6 @@
+ 1234 complex :: cplx ! { dg-error "defined but cannot be used" }
+ cplx = 20.
+
+-! gfc_warning_now:
+- 1 ! { dg-error "Ignoring statement label in empty statement" }
+ end
+ ! { dg-final { output-exists-not } }
+ ! { dg-excess-errors "warnings being treated as errors" }
Index: gcc/testsuite/gfortran.dg/c_by_val_1.f
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/c_by_val_1.f (.../tags/gcc_6_2_0_release)
@@ -2645,6 +3905,461 @@ Index: gcc/testsuite/gfortran.dg/c_by_val_1.f
if ((4.0 * u8).ne.v8) call abort ()
stop
+Index: gcc/testsuite/gfortran.dg/c_assoc_4.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/c_assoc_4.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/c_assoc_4.f90 (.../branches/gcc-6-branch)
+@@ -9,6 +9,6 @@
+
+ TYPE (C_PTR) :: x, y
+
+- PRINT *, C_ASSOCIATED([x,y]) ! { dg-error "'C_PTR_1' argument of 'c_associated' intrinsic at .1. must be a scalar" }
++ PRINT *, C_ASSOCIATED([x,y]) ! { dg-error "'c_ptr_1' argument of 'c_associated' intrinsic at .1. must be a scalar" }
+
+ END PROGRAM test
+Index: gcc/testsuite/gfortran.dg/pr71730.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71730.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71730.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,5 @@
++! { dg-do compile }
++subroutine foo
++ implicit none
++ character(len=bar) :: a ! { dg-error "Scalar INTEGER expression" }
++end subroutine foo
+Index: gcc/testsuite/gfortran.dg/array_constructor_27.f03
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/array_constructor_27.f03 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/array_constructor_27.f03 (.../branches/gcc-6-branch)
+@@ -8,8 +8,7 @@
+ implicit none
+
+ type t
+- character (a) :: arr (1) = [ "a" ]
+- ! { dg-error "specification expression" "" { target *-*-* } 11 }
++ character (a) :: arr (1) = [ "a" ] ! { dg-error "Scalar INTEGER expression" }
+ end type t
+
+ end
+Index: gcc/testsuite/gfortran.dg/pr77612.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77612.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77612.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++
++program bad_len
++
++ implicit none
++
++contains
++
++ subroutine sub
++ character(len = ICE) :: line ! { dg-error "INTEGER expression expected" }
++ end subroutine
++
++end program
+Index: gcc/testsuite/gfortran.dg/pr77460.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77460.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77460.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++ double precision, parameter :: x = huge(1d0)
++ print*, sum((/x,-x/))
++ print*, sum((/x,x,-x,-x/)) ! { dg-error "overflow" }
++ print*, sum((/x,-x,1d0/))
++ print*, sum((/1d0,x,-x/))
++end
+Index: gcc/testsuite/gfortran.dg/inquire_17.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/inquire_17.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/inquire_17.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,10 @@
++! { dg-do run }
++! PR77707 formatted direct access: nextrec off by one
++program directaccess_formatted
++ integer nextrec
++ open(10, status='scratch', form='formatted', access='direct', recl=10*4)
++ write(10,'(10i4)',rec=9) 1,2,3,4,5,6,7,8,9,10
++ inquire(unit=10,nextrec=nextrec)
++ if (nextrec.ne.10) call abort
++ close(10)
++end
+Index: gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/intrinsic_numeric_arg.f (.../branches/gcc-6-branch)
+@@ -4,6 +4,6 @@
+ LOGICAL Z
+ CHARACTER A
+ REAL R
+- R = ABS(Z) ! { dg-error " must be a numeric type" }
+- R = ABS(A) ! { dg-error " must be a numeric type" }
++ R = ABS(Z) ! { dg-error " must have a numeric type" }
++ R = ABS(A) ! { dg-error " must have a numeric type" }
+ END
+Index: gcc/testsuite/gfortran.dg/pr77420_4.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77420_4.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77420_4.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,10 @@
++! { dg-do compile { target { ! *-*-* } } }
++!
++program bug
++ use H5GLOBAL
++ implicit none
++ integer :: i
++ i=H5P_DEFAULT_F
++end program bug
++
++
+Index: gcc/testsuite/gfortran.dg/pr77260_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77260_2.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77260_2.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,26 @@
++! { dg-do compile }
++! { dg-options "-Wall" }
++module foo
++
++ implicit none
++
++ private
++ public f1,f2
++
++ contains
++
++ integer function f1()
++ integer f2
++ integer f3 ! { dg-warning "Unused variable" }
++ f1=5
++ entry f2
++ f2=8
++ end function
++end module
++
++program test
++ use foo
++ implicit none
++ print *,f2()
++end program
++! { dg-final { cleanup-modules "foo" } }
+Index: gcc/testsuite/gfortran.dg/pr71067_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71067_2.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71067_2.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++program p
++ integer :: a(2), b(2), c(2)
++ data a /2*b1'/ ! { dg-error "must be a PARAMETER in DATA" }
++ data b /2*o1' ! { dg-error "must be a PARAMETER in DATA" }
++ data c /2*z1 ! { dg-error "must be a PARAMETER in DATA" }
++end
+Index: gcc/testsuite/gfortran.dg/pr71862.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71862.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71862.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,16 @@
++! { dg-do compile }
++program p
++ type t
++ integer :: n = 0
++ integer, pointer :: q => null()
++ end type
++ type(t) :: x
++ print *, associated(x%q)
++ x = f()
++ print *, associated(x%q)
++contains
++ function f() result (z) ! { dg-error "must be dummy, allocatable or pointer" }
++ class(t) :: z
++ print *, associated(z%q)
++ end
++end
+Index: gcc/testsuite/gfortran.dg/array_constructor_26.f03
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/array_constructor_26.f03 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/array_constructor_26.f03 (.../branches/gcc-6-branch)
+@@ -10,7 +10,6 @@
+ INTEGER (1), PARAMETER :: MAXFLD = 25_1, MAXHED = 5_1, MAXCHR = 80_1
+ integer :: i
+ TYPE TWindowData
+- CHARACTER (MAX_FLD_HED, 1) :: DWFdHd(MAXFLD) = [(" ", i = 1, MAXFLD)]
+- ! { dg-error "specification expression" "" { target *-*-* } 13 }
++ CHARACTER (MAX_FLD_HED, 1) :: DWFdHd(MAXFLD) = [(" ", i = 1, MAXFLD)] ! { dg-error "Scalar INTEGER expression" }
+ END TYPE TWindowData
+ END MODULE WinData
+Index: gcc/testsuite/gfortran.dg/equiv_constraint_7.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90 (.../branches/gcc-6-branch)
+@@ -5,7 +5,7 @@
+ ! Started out being in BLOCK DATA; however, blockdata variables must be in
+ ! COMMON and therefore cannot have F95 style initializers....
+ MODULE DATA
+- INTEGER :: I=1,J=2 ! { dg-error "Overlapping unequal initializers" }
+- EQUIVALENCE(I,J)
++ INTEGER :: I=1,J=2
++ EQUIVALENCE(I,J) ! { dg-error "Overlapping unequal initializers" }
+ END MODULE DATA
+ END
+Index: gcc/testsuite/gfortran.dg/pr71859.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71859.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71859.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,8 @@
++! { dg-do compile }
++program p
++ call s(1)
++ x = abs(s) ! { dg-error "must have a numeric type" }
++end
++subroutine s(n)
++ print *, n
++end
+Index: gcc/testsuite/gfortran.dg/ieee/pr77507.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/ieee/pr77507.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/ieee/pr77507.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++Program p
++ Use ieee_arithmetic
++ Use iso_c_binding
++ Print *, ieee_value(x=1.0, class=ieee_negative_inf)
++ Print *, c_associated(c_ptr_1=c_null_ptr)
++End Program
+Index: gcc/testsuite/gfortran.dg/ieee/pr77372.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/ieee/pr77372.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/ieee/pr77372.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++program p
++ use ieee_arithmetic
++ real(kind=ieee_selected_real_kind(10_1)) :: z1
++ real(kind=ieee_selected_real_kind(10_2)) :: z2
++ real(kind=ieee_selected_real_kind(10_4)) :: z4
++end
+Index: gcc/testsuite/gfortran.dg/coarray_collectives_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/coarray_collectives_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/coarray_collectives_1.f90 (.../branches/gcc-6-branch)
+@@ -14,7 +14,7 @@
+ integer(8) :: i8
+ character(len=19, kind=4) :: msg4
+
+- call co_sum("abc") ! { dg-error "must be a numeric type" }
++ call co_sum("abc") ! { dg-error "must have a numeric type" }
+ call co_max(cmplx(1.0,0.0)) ! { dg-error "shall be of type integer, real or character" }
+ call co_min(cmplx(0.0,1.0)) ! { dg-error "shall be of type integer, real or character" }
+
+Index: gcc/testsuite/gfortran.dg/pr77420_3.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77420_3.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77420_3.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,9 @@
++! { dg-do link }
++! { dg-additional-sources pr77420_4.f90 }
++!
++module h5global
++ implicit none
++ integer :: h5p_default_f, h5p_flags
++ equivalence(h5p_flags, h5p_default_f)
++end module h5global
++! { dg-final { cleanup-modules "h5global" } }
+Index: gcc/testsuite/gfortran.dg/c_assoc_2.f03
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/c_assoc_2.f03 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/c_assoc_2.f03 (.../branches/gcc-6-branch)
+@@ -20,7 +20,7 @@
+ call abort()
+ end if
+
+- if(.not. c_associated()) then ! { dg-error "Missing actual argument 'C_PTR_1' in call to 'c_associated'" }
++ if(.not. c_associated()) then ! { dg-error "Missing actual argument 'c_ptr_1' in call to 'c_associated'" }
+ call abort()
+ end if
+
+Index: gcc/testsuite/gfortran.dg/pr77260_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77260_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77260_1.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,25 @@
++! { dg-do compile }
++! { dg-options "-Wall" }
++module foo
++
++ implicit none
++
++ private
++ public f1,f2
++
++ contains
++
++ integer function f1()
++ integer f2
++ f1=5
++ entry f2
++ f2=8
++ end function
++end module
++
++program test
++ use foo
++ implicit none
++ print *,f2()
++end program
++! { dg-final { cleanup-modules "foo" } }
+Index: gcc/testsuite/gfortran.dg/pr71067_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71067_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71067_1.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,5 @@
++program p
++ integer :: i = 0
++ integer :: z(2)
++ data z /2*i/ ! { dg-error "must be a PARAMETER in DATA" }
++end
+Index: gcc/testsuite/gfortran.dg/pr61318.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr61318.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr61318.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,23 @@
++! { dg-do compile }
++!
++module gbl_message
++ type :: mytype
++ integer(kind=4) :: e
++ end type mytype
++ type(mytype), parameter :: seve = mytype(1)
++end module gbl_message
++
++module gbl_interfaces
++ interface
++ subroutine gagout(message)
++ character(len=*), intent(in) :: message
++ end subroutine gagout
++ end interface
++end module gbl_interfaces
++
++program test
++ use gbl_message
++ use gbl_interfaces
++ call gagout(seve%e,'Some string') ! { dg-error "Type mismatch in argument" }
++end program test
++! { dg-final { cleanup-modules "gbl_interfaces gbl_message" } }
+Index: gcc/testsuite/gfortran.dg/pr41922.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr41922.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr41922.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,11 @@
++! { dg-do compile}
++! { dg-options -std=gnu }
++ Subroutine RestoreR8Run()
++ Implicit NONE
++ Integer ISTORE
++ Real XSTORE
++ character CSTORE(8)
++ data cstore/8*' '/
++ data istore/0/
++ EQUIVALENCE (CSTORE(1),XSTORE,ISTORE) ! { dg-error "Overlapping unequal" }
++ end
+Index: gcc/testsuite/gfortran.dg/pr71799.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr71799.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr71799.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,10 @@
++! { dg-do compile }
++subroutine test2(s)
++integer(1) :: i
++integer (8) :: s
++
++do i = 10, HUGE(i) - 10, 222 ! { dg-error "overflow converting" }
++ s = s + 1
++end do
++
++end subroutine test2
+Index: gcc/testsuite/gfortran.dg/pr69514_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr69514_2.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr69514_2.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,49 @@
++! { dg-do run }
++program p
++ implicit none
++
++ real , parameter :: arr(3) = [ real :: 2, 2.5, (1.5, 2.5) ]
++ real , parameter :: ari(3) = [ integer :: 2, 2.5, (1.5, 2.5) ]
++ real , parameter :: arc(3) = [ complex :: 2, 2.5, (1.5, 2.5) ]
++ integer, parameter :: air(3) = [ real :: 2, 2.5, (1.5, 2.5) ]
++ integer, parameter :: aii(3) = [ integer :: 2, 2.5, (1.5, 2.5) ]
++ integer, parameter :: aic(3) = [ complex :: 2, 2.5, (1.5, 2.5) ]
++ complex, parameter :: acr(3) = [ real :: 2, 2.5, (1.5, 2.5) ]
++ complex, parameter :: aci(3) = [ integer :: 2, 2.5, (1.5, 2.5) ]
++ complex, parameter :: acc(3) = [ complex :: 2, 2.5, (1.5, 2.5) ]
++
++ real , parameter :: mrr(3) = 4.5 * [ real :: 2, 2.5, (3.5, 4.0) ]
++ real , parameter :: mri(3) = 4.5 * [ integer :: 2, 2.5, (3.5, 4.0) ]
++ real , parameter :: mrc(3) = 4.5 * [ complex :: 2, 2.5, (3.5, 4.0) ]
++ integer, parameter :: mir(3) = 4 * [ real :: 2, 2.5, (3.5, 4.0) ]
++ integer, parameter :: mii(3) = 4 * [ integer :: 2, 2.5, (3.5, 4.0) ]
++ integer, parameter :: mic(3) = 4 * [ complex :: 2, 2.5, (3.5, 4.0) ]
++ complex, parameter :: mcr(3) = (4.5, 5.5) * [ real :: 2, 2.5, (3.5, 4.0) ]
++ complex, parameter :: mci(3) = (4.5, 5.5) * [ integer :: 2, 2.5, (3.5, 4.0) ]
++ complex, parameter :: mcc(3) = (4.5, 5.5) * [ complex :: 2, 2.5, (3.5, 4.0) ]
++
++ if (any(arr /= [2.00, 2.50, 1.50])) call abort
++ if (any(ari /= [2.00, 2.00, 1.00])) call abort
++ if (any(arc /= [2.00, 2.50, 1.50])) call abort
++
++ if (any(air /= [2, 2, 1])) call abort
++ if (any(aii /= [2, 2, 1])) call abort
++ if (any(aic /= [2, 2, 1])) call abort
++
++ if (any(acr /= [(2.00, 0.00), (2.50, 0.00), (1.50, 0.00)])) call abort
++ if (any(aci /= [(2.00, 0.00), (2.00, 0.00), (1.00, 0.00)])) call abort
++ if (any(acc /= [(2.00, 0.00), (2.50, 0.00), (1.50, 2.50)])) call abort
++
++ if (any(mrr /= [9.00, 11.25, 15.75])) call abort
++ if (any(mri /= [9.00, 9.00, 13.50])) call abort
++ if (any(mrc /= [9.00, 11.25, 15.75])) call abort
++
++ if (any(mir /= [8, 10, 14])) call abort
++ if (any(mii /= [8, 8, 12])) call abort
++ if (any(mic /= [8, 10, 14])) call abort
++
++ if (any(mcr /= [(9.00, 11.00), (11.25, 13.75), (15.75, 19.25)])) call abort
++ if (any(mci /= [(9.00, 11.00), ( 9.00, 11.00), (13.50, 16.50)])) call abort
++ if (any(mcc /= [(9.00, 11.00), (11.25, 13.75), (-6.25, 37.25)])) call abort
++
++end program p
+Index: gcc/testsuite/gfortran.dg/empty_label.f
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/empty_label.f (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/empty_label.f (.../branches/gcc-6-branch)
+@@ -1,7 +1,4 @@
+ C { dg-do compile }
+-C { dg-options "-Werror -fmax-errors=1" }
+-100 ! { dg-error "empty statement" }
++100 ! { dg-error "Statement label without statement" }
+ end
+-subroutine foo ! Not checked ...
+-end function ! ... but an error
+-C { dg-excess-errors "warnings being treated as errors" }
++
+Index: gcc/testsuite/gfortran.dg/pr77351.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77351.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77351.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,6 @@
++! { dg-do compile }
++program p
++ integer :: z(4) = [1, 2, 3, 4]
++ print *, any(shape(z) /= [4,1]) ! { dg-error "shape for elemental binary" }
++end
++! { dg-excess-errors "operands are incommensurate" }
Index: gcc/testsuite/gfortran.dg/submodule_17.f08
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/submodule_17.f08 (.../tags/gcc_6_2_0_release)
@@ -2677,6 +4392,195 @@ Index: gcc/testsuite/gfortran.dg/submodule_17.f08
+ use hello_interface
+ if (get() .ne. string) call abort
+end
+Index: gcc/testsuite/gfortran.dg/pr68566.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr68566.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr68566.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,13 @@
++! { dg-do run }
++program p
++ character(len=20) s1, s2
++ integer, allocatable :: n(:)
++ n = [2,1]
++ s1 = '1 5 2 6 3 0 4 0'
++ write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], [2,1])
++ if (trim(s1) /= trim(s2)) call abort
++ write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], n)
++ if (trim(s1) /= trim(s2)) call abort
++ write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], [n])
++ if (trim(s1) /= trim(s2)) call abort
++end
+Index: gcc/testsuite/gfortran.dg/pr77420_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77420_2.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77420_2.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,15 @@
++! { dg-do compile }
++module test_equivalence
++ real, private :: array1(100)
++ real, private :: array2(100)
++ equivalence(array1,array2)
++end module test_equivalence
++
++module mymodule
++ use test_equivalence
++ real, dimension(:), allocatable :: array1
++end module mymodule
++
++program test
++ use mymodule
++end program test
+Index: gcc/testsuite/gfortran.dg/pr77380.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77380.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77380.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,6 @@
++! { dg-do compile }
++! { dg-options "-fcoarray=lib -O2" }
++program p
++ integer :: z(2)[*] = 1
++ z(:)[1] = z(:)[*] ! { dg-error "must be a scalar at" }
++end
+Index: gcc/testsuite/gfortran.dg/pr77694.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77694.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77694.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++! { dg-options -O }
++program p
++ logical x(2), y(2)
++ x = .true.
++ y = .nt. x ! { dg-error "Unknown operator" }
++end
+Index: gcc/testsuite/gfortran.dg/pr77391.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77391.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77391.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++program picky
++character(len=:), parameter :: a="whoops" ! { dg-error "POINTER or ALLOCATABLE" }
++character(len=:) :: b="whoops" ! { dg-error "POINTER or ALLOCATABLE" }
++character(len=:) :: good
++pointer good
++end program picky
+Index: gcc/testsuite/gfortran.dg/pr69867.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr69867.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr69867.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,6 @@
++! { dg-do compile }
++program p
++ type t
++ character(1) :: c(1)=[1] ! { dg-error "convert INTEGER.4. to CHARACTER.1." }
++ end type
++end
+Index: gcc/testsuite/gfortran.dg/pr69514_1.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr69514_1.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr69514_1.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,5 @@
++! { dg-do run }
++program foo
++ real, parameter :: x(3) = 2.0 * [real :: 1, 2, 3 ]
++ if (any(x /= [2., 4., 6.])) call abort
++end program foo
+Index: gcc/testsuite/gfortran.dg/equiv_constraint_5.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/equiv_constraint_5.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/equiv_constraint_5.f90 (.../branches/gcc-6-branch)
+@@ -19,13 +19,13 @@
+ END TYPE T2
+ TYPE T3
+ sequence
+- integer :: i=2 ! { dg-error "Overlapping unequal initializers" }
++ integer :: i=2
+ END TYPE T3
+ TYPE(T1) :: a1
+ TYPE(T2) :: a2
+ TYPE(T3) :: a3
+ EQUIVALENCE (a1, a2)
+- EQUIVALENCE (a1, a3)
++ EQUIVALENCE (a1, a3) ! { dg-error "Overlapping unequal initializers" }
+ write(6, *) a1, a2, a3
+ END
+
+Index: gcc/testsuite/gfortran.dg/label_3.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/label_3.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/label_3.f90 (.../branches/gcc-6-branch)
+@@ -1,5 +1,5 @@
+ ! { dg-do compile }
+ ! PR fortran/25756.
+ ! This used to ICE due to the space after the label.
+-1 ! { dg-warning "Ignoring statement label in empty statement" }
++1 ! { dg-error "Statement label without statement" }
+ end
+Index: gcc/testsuite/gfortran.dg/empty_label.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/empty_label.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/empty_label.f90 (.../branches/gcc-6-branch)
+@@ -1,7 +1,3 @@
+ ! { dg-do compile }
+-! { dg-options "-Werror -fmax-errors=1" }
+-100 ! { dg-error "empty statement" }
++100 ! { dg-error "Statement label without statement" }
+ end
+-subroutine foo ! Not checked ...
+-end function ! ... but an error
+-! { dg-excess-errors "warnings being treated as errors" }
+Index: gcc/testsuite/gfortran.dg/pr69962.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr69962.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr69962.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,6 @@
++! { dg-do compile }
++program p
++ integer :: n = 1
++ character(3), parameter :: x(2) = ['abc', 'xyz']
++ character(2), parameter :: y(2) = [x(2)(2:3), x(n)(1:2)] ! { dg-error "CHARACTER length must be a constant" }
++end
+Index: gcc/testsuite/gfortran.dg/pr77429.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr77429.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr77429.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,7 @@
++! { dg-do compile }
++program p
++ shape(1) = 0 ! { dg-error "expression in variable definition context" }
++ shape(1,2) = 0 ! { dg-error "expression in variable definition context" }
++ shape(1,2,3) = 0 ! { dg-error "Too many arguments in call" }
++ lbound([1]) = 0 ! { dg-error "expression in variable definition context" }
++end
+Index: gcc/testsuite/gfortran.dg/pr70006.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/pr70006.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/pr70006.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,9 @@
++! { dg-do compile}
++program test
++ print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } 3 }
++ print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } 4 }
++!1 format(a)
++ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } 6 }
++ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } 7 }
++!2 continue
++end program
+Index: gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90 (.../branches/gcc-6-branch)
+@@ -11,8 +11,8 @@
+
+ SUBROUTINE test (str, n)
+ IMPLICIT NONE
++ INTEGER :: n
+ CHARACTER(len=n) :: str
+- INTEGER :: n
+ END SUBROUTINE test
+
+ SUBROUTINE test2 (str)
Index: gcc/testsuite/gcc.c-torture/execute/pr71700.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr71700.c (.../tags/gcc_6_2_0_release)
@@ -3011,6 +4915,29 @@ Index: gcc/testsuite/gcc.dg/torture/pr77436.c
+ __builtin_abort ();
+ return 0;
+}
+Index: gcc/testsuite/gcc.dg/dg-test-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/dg-test-1.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/dg-test-1.c (.../branches/gcc-6-branch)
+@@ -0,0 +1,18 @@
++/* Test relative line number specification extensions over what DejaGNU supports. */
++/* { dg-do compile } */
++/* { dg-options "-Wunused-parameter" } */
++
++void
++foo (void)
++{ /* { dg-error "'a' undeclared" "err1" { target *-*-* } .+1 } */
++ int z = a + b + c + d;/* { dg-error "'b' undeclared" "err2" { target *-*-* } . } */
++} /* { dg-error "'c' undeclared" "err3" { target *-*-* } .-1 } */
++
++
++/* { dg-error "'d' undeclared" "err4" { target *-*-* } .-4 } */
++/* { dg-warning "unused parameter 'e'" "warn1" { target *-*-* } .+3 } */
++
++void /* { dg-warning "unused parameter 'f'" "warn2" { target *-*-* } .+1 } */
++bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" { target *-*-* } . } */
++{ /* { dg-warning "unused parameter 'h'" "warn4" { target *-*-* } .-1 } */
++}
Index: gcc/testsuite/gcc.dg/tree-ssa/update-unroll-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/tree-ssa/update-unroll-1.c (.../tags/gcc_6_2_0_release)
@@ -3228,7 +5155,128 @@ Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,299 @@
+@@ -1,3 +1,420 @@
++2016-10-04 Martin Sebor <msebor at redhat.com>
++
++ * g++.dg/warn/Wplacement-new-size-4.C: Use relative line number
++ references.
++
++2016-10-04 Martin Sebor <msebor at redhat.com>
++
++ Backport from trunk.
++ * lib/gcc-dg.exp (process-message): Support relative line number
++ notation - .+4 or .-1 etc.
++ * gcc.dg/dg-test-1.c: New test.
++
++2016-10-04 Uros Bizjak <ubizjak at gmail.com>
++
++ Backport from mainline
++ 2016-09-29 Uros Bizjak <ubizjak at gmail.com>
++
++ PR target/77756
++ * gcc.target/i386/pr77756.c: New test.
++
++2016-09-29 Jerry DeLisle <jvdelisle at gcc.gnu.org>
++
++ Backport from trunk
++ PR libgfortran/77707
++ * gfortran.dg/inquire_17.f90: New test.
++
++2016-09-28 Steven G. Kargl <kargl at gcc.gnu.org>
++
++ Backport from trunk
++ PR fortran/41922
++ * gfortran.dg/equiv_constraint_5.f90: Adjust the error message.
++ * gfortran.dg/equiv_constraint_7.f90: Ditto.
++ * gfortran.dg/pr41922.f90: New test.
++
++ PR fortran/60774
++ * gfortran.dg/empty_label.f: Adjust test for new error message.
++ * gfortran.dg/empty_label.f90: Ditto.
++ * gfortran.dg/empty_label_typedecl.f90: Ditto.
++ * gfortran.dg/label_3.f90: Deleted (redundant with empty_label.f90).
++ * gfortran.dg/warnings_are_errors_1.f90: Remove invalid statement label.
++
++ PR fortran/61318
++ * gfortran.dg/pr61318.f90: New test.
++
++ PR fortran/68566
++ * gfortran.dg/pr68566.f90: new test.
++
++ PR fortran/69514
++ * gfortran.dg/pr69514_1.f90: New test.
++ * gfortran.dg/pr69514_2.f90: New test.
++
++ PR fortran/69867
++ * gfortran.dg/pr69867.f90: New test.
++
++ PR fortran/69962
++ * gfortran.dg/pr69962.f90: New test.
++
++ PR fortran/70006
++ * gfortran.dg/pr70006.f90: New test.
++
++ PR fortran/71067
++ * gfortran.dg/pr71067_1.f90: New test.
++ * gfortran.dg/pr71067_2.f90: Ditto.
++
++ PR fortran/71730
++ * gfortran.dg/pr71730.f90: New test.
++ * gfortran.dg/bounds_check_strlen_2.f90: Fix invalid code.
++ * gfortran.dg/array_constructor_27.f03: Update dg-error message.
++ * gfortran.dg/array_constructor_26.f03: Ditto.
++
++ PR fortran/71799
++ * gfortran.dg/pr71799.f90: New test.
++
++ PR fortran/71859
++ * gfortran.dg/pr71859.f90: New test.
++ * gfortran.dg/intrinsic_numeric_arg.f: Update error message.
++ * gfortran.dg/coarray_collectives_1.f90: Ditto.
++
++ PR fortran/71862
++ * gfortran.dg/pr71862.f90: New test.
++
++ PR fortran/77260
++ * gfortran.dg/pr77260_1.f90: New test.
++ * gfortran.dg/pr77260_2.f90: Ditto.
++
++ PR fortran/77351
++ * gfortran.dg/pr77351.f90: New test.
++
++ PR fortran/77372
++ gfortran.dg/pr77372.f90: New test.
++
++ PR fortran/77380
++ * gfortran.dg/pr77380.f90: New test.
++
++ PR fortran/77391
++ * gfortran.dg/pr77391.f90: New test.
++
++ PR fortran/77420
++ * gfortran.dg/pr77420_1.f90: New test.
++ * gfortran.dg/pr77420_2.f90: Ditto.
++ * gfortran.dg/pr77420_3.f90: New test. Requires ...
++ * gfortran.dg/pr77420_4.f90: this file.
++
++ PR fortran/77429
++ * gfortran.dg/pr77429.f90: New test.
++
++ PR fortran/77460
++ * gfortran.dg/pr77460.f90: New test.
++
++ PR fortran/77506
++ * gfortran.dg/pr77506.f90: New test.
++
++ PR fortran/77507
++ * gfortran.dg/ieee/pr77507.f90: New test.
++
++ PR fortran/77612
++ * gfortran.dg/pr77612.f90: New test.
++
++ PR fortran/77694
++ * gfortran.dg/pr77694.f90: New test.
++
+2016-09-27 Richard Biener <rguenther at suse.de>
+
+ PR tree-optimization/77478
@@ -3528,7 +5576,7 @@ Index: gcc/testsuite/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
-@@ -150,8 +446,8 @@
+@@ -150,8 +567,8 @@
2016-08-09 Martin Jambor <mjambor at suse.cz>
@@ -3539,7 +5587,7 @@ Index: gcc/testsuite/ChangeLog
2016-08-09 Richard Biener <rguenther at suse.de>
-@@ -276,8 +572,8 @@
+@@ -276,8 +693,8 @@
2016-07-20 Martin Jambor <mjambor at suse.cz>
@@ -3550,7 +5598,7 @@ Index: gcc/testsuite/ChangeLog
2016-07-19 Jakub Jelinek <jakub at redhat.com>
-@@ -418,7 +714,7 @@
+@@ -418,7 +835,7 @@
2016-07-06 Yuri Rumyantsev <ysrumyan at gmail.com>
PR tree-optimization/71518
@@ -3816,6 +5864,25 @@ Index: gcc/testsuite/g++.dg/gomp/pr71910.C
+#pragma omp parallel
+ __builtin_exit (0);
+}
+Index: gcc/testsuite/g++.dg/warn/Wplacement-new-size-4.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/warn/Wplacement-new-size-4.C (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/warn/Wplacement-new-size-4.C (.../branches/gcc-6-branch)
+@@ -0,0 +1,14 @@
++// PR c++/77804 - Internal compiler error on incorrect initialization of
++// new-d array
++// { dg-do compile }
++// { dg-additional-options "-Wplacement-new -Wvla -Wno-error=vla" }
++
++void* operator new[] (__SIZE_TYPE__ n, void *p) { return p; }
++
++int main()
++{
++ char buf[256];
++ unsigned n = 10;
++ int* p = new (buf) (int[n]); // { dg-warning "non-constant array new length must be specified without parentheses around the type-id" }
++ // { dg-warning "ISO C\\+\\+ forbids variable length array" "vla warning" { target *-*-* } .-1 }
++}
Index: gcc/testsuite/g++.dg/asan/pr77396-2.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/asan/pr77396-2.C (.../tags/gcc_6_2_0_release)
@@ -3931,6 +5998,34 @@ Index: gcc/testsuite/c-c++-common/torture/pr77544.c
+} b;
+int c, d;
+void e() { b.a = d + c + ~(long)(302806U >> 0); }
+Index: gcc/cp/init.c
+===================================================================
+--- a/src/gcc/cp/init.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/cp/init.c (.../branches/gcc-6-branch)
+@@ -2503,7 +2503,7 @@
+ && warn_placement_new < 2)
+ return;
+ }
+-
++
+ /* The size of the buffer can only be adjusted down but not up. */
+ gcc_checking_assert (0 <= adjust);
+
+@@ -2525,8 +2525,13 @@
+ else if (nelts && CONSTANT_CLASS_P (nelts))
+ bytes_need = tree_to_uhwi (nelts)
+ * tree_to_uhwi (TYPE_SIZE_UNIT (type));
++ else if (tree_fits_uhwi_p (TYPE_SIZE_UNIT (type)))
++ bytes_need = tree_to_uhwi (TYPE_SIZE_UNIT (type));
+ else
+- bytes_need = tree_to_uhwi (TYPE_SIZE_UNIT (type));
++ {
++ /* The type is a VLA. */
++ return;
++ }
+
+ if (bytes_avail < bytes_need)
+ {
Index: gcc/cp/class.c
===================================================================
--- a/src/gcc/cp/class.c (.../tags/gcc_6_2_0_release)
@@ -4169,7 +6264,13 @@ Index: gcc/cp/ChangeLog
===================================================================
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,28 @@
+@@ -1,3 +1,34 @@
++2016-10-04 Martin Sebor <msebor at redhat.com>
++
++ PR c++/77804
++ * init.c (warn_placement_new_too_small): Avoid assuming an array type
++ has a constant size.
++
+2016-09-22 Paolo Carlini <paolo.carlini at oracle.com>
+
+ PR c++/71979
@@ -4869,6 +6970,236 @@ Index: gcc/fortran/openmp.c
if (code->expr1->expr_type != EXPR_VARIABLE
|| code->expr1->symtree == NULL
+Index: gcc/fortran/interface.c
+===================================================================
+--- a/src/gcc/fortran/interface.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/interface.c (.../branches/gcc-6-branch)
+@@ -2146,7 +2146,7 @@
+ {
+ if (where)
+ gfc_error ("Type mismatch in argument %qs at %L; passed %s to %s",
+- formal->name, &actual->where, gfc_typename (&actual->ts),
++ formal->name, where, gfc_typename (&actual->ts),
+ gfc_typename (&formal->ts));
+ return 0;
+ }
+Index: gcc/fortran/intrinsic.c
+===================================================================
+--- a/src/gcc/fortran/intrinsic.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/intrinsic.c (.../branches/gcc-6-branch)
+@@ -1239,7 +1239,8 @@
+ *z = "z", *ln = "len", *ut = "unit", *han = "handler",
+ *num = "number", *tm = "time", *nm = "name", *md = "mode",
+ *vl = "values", *p1 = "path1", *p2 = "path2", *com = "command",
+- *ca = "coarray", *sub = "sub", *dist = "distance", *failed="failed";
++ *ca = "coarray", *sub = "sub", *dist = "distance", *failed="failed",
++ *c_ptr_1 = "c_ptr_1", *c_ptr_2 = "c_ptr_2";
+
+ int di, dr, dd, dl, dc, dz, ii;
+
+@@ -2811,8 +2812,8 @@
+ /* The following functions are part of ISO_C_BINDING. */
+ add_sym_2 ("c_associated", GFC_ISYM_C_ASSOCIATED, CLASS_INQUIRY, ACTUAL_NO,
+ BT_LOGICAL, dl, GFC_STD_F2003, gfc_check_c_associated, NULL, NULL,
+- "C_PTR_1", BT_VOID, 0, REQUIRED,
+- "C_PTR_2", BT_VOID, 0, OPTIONAL);
++ c_ptr_1, BT_VOID, 0, REQUIRED,
++ c_ptr_2, BT_VOID, 0, OPTIONAL);
+ make_from_module();
+
+ add_sym_1 ("c_loc", GFC_ISYM_C_LOC, CLASS_INQUIRY, ACTUAL_NO,
+Index: gcc/fortran/class.c
+===================================================================
+--- a/src/gcc/fortran/class.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/class.c (.../branches/gcc-6-branch)
+@@ -238,12 +238,14 @@
+ /* Avoid losing memory. */
+ gfc_free_ref_list (*tail);
+ c = gfc_find_component (derived, name, true, true, tail);
+- gcc_assert (c);
+- for (ref = *tail; ref->next; ref = ref->next)
+- ;
+- ref->next = next;
+- if (!next)
+- e->ts = c->ts;
++
++ if (c) {
++ for (ref = *tail; ref->next; ref = ref->next)
++ ;
++ ref->next = next;
++ if (!next)
++ e->ts = c->ts;
++ }
+ }
+
+
+Index: gcc/fortran/decl.c
+===================================================================
+--- a/src/gcc/fortran/decl.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/decl.c (.../branches/gcc-6-branch)
+@@ -395,6 +395,7 @@
+ {
+ gfc_error ("Symbol %qs must be a PARAMETER in DATA statement at %C",
+ name);
++ *result = NULL;
+ return MATCH_ERROR;
+ }
+ else if (dt_sym && gfc_fl_struct (dt_sym->attr.flavor))
+@@ -905,6 +906,7 @@
+ goto syntax;
+ else if ((*expr)->expr_type == EXPR_VARIABLE)
+ {
++ bool t;
+ gfc_expr *e;
+
+ e = gfc_copy_expr (*expr);
+@@ -916,8 +918,17 @@
+ && e->ref->u.ar.dimen_type[0] == DIMEN_RANGE)
+ goto syntax;
+
+- gfc_reduce_init_expr (e);
++ t = gfc_reduce_init_expr (e);
+
++ if (!t && e->ts.type == BT_UNKNOWN
++ && e->symtree->n.sym->attr.untyped == 1
++ && (e->symtree->n.sym->ns->seen_implicit_none == 1
++ || e->symtree->n.sym->ns->parent->seen_implicit_none == 1))
++ {
++ gfc_free_expr (e);
++ goto syntax;
++ }
++
+ if ((e->ref && e->ref->type == REF_ARRAY
+ && e->ref->u.ar.type != AR_ELEMENT)
+ || (!e->ref && e->expr_type == EXPR_ARRAY))
+@@ -1485,10 +1496,14 @@
+ gfc_char_t *s;
+ int slen;
+
+- gcc_assert (expr->expr_type == EXPR_CONSTANT);
+-
+ if (expr->ts.type != BT_CHARACTER)
+ return;
++
++ if (expr->expr_type != EXPR_CONSTANT)
++ {
++ gfc_error_now ("CHARACTER length must be a constant at %L", &expr->where);
++ return;
++ }
+
+ slen = expr->value.character.length;
+ if (len != slen)
+@@ -1912,8 +1927,10 @@
+
+ if (c->initializer->expr_type == EXPR_CONSTANT)
+ gfc_set_constant_character_len (len, c->initializer, -1);
+- else if (mpz_cmp (c->ts.u.cl->length->value.integer,
+- c->initializer->ts.u.cl->length->value.integer))
++ else if (c->initializer
++ && c->initializer->ts.u.cl
++ && mpz_cmp (c->ts.u.cl->length->value.integer,
++ c->initializer->ts.u.cl->length->value.integer))
+ {
+ gfc_constructor *ctor;
+ ctor = gfc_constructor_first (c->initializer->value.constructor);
+Index: gcc/fortran/trans-common.c
+===================================================================
+--- a/src/gcc/fortran/trans-common.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/trans-common.c (.../branches/gcc-6-branch)
+@@ -532,10 +532,15 @@
+ memset (chk, '\0', (size_t)length);
+ for (s = head; s; s = s->next)
+ if (s->sym->value)
+- gfc_merge_initializers (s->sym->ts, s->sym->value,
++ {
++ locus *loc = NULL;
++ if (s->sym->ns->equiv && s->sym->ns->equiv->eq)
++ loc = &s->sym->ns->equiv->eq->expr->where;
++ gfc_merge_initializers (s->sym->ts, s->sym->value, loc,
+ &data[s->offset],
+ &chk[s->offset],
+ (size_t)s->length);
++ }
+
+ for (i = 0; i < length; i++)
+ CONSTRUCTOR_APPEND_ELT (v, NULL, build_int_cst (type, data[i]));
+@@ -800,13 +805,21 @@
+ if (ar->dimen_type[i] != DIMEN_ELEMENT)
+ gfc_internal_error ("element_number(): Bad dimension type");
+
+- mpz_sub (n, *get_mpz (ar->start[i]), *get_mpz (as->lower[i]));
++ if (as && as->lower[i])
++ mpz_sub (n, *get_mpz (ar->start[i]), *get_mpz (as->lower[i]));
++ else
++ mpz_sub_ui (n, *get_mpz (ar->start[i]), 1);
+
+ mpz_mul (n, n, multiplier);
+ mpz_add (offset, offset, n);
+
+- mpz_sub (extent, *get_mpz (as->upper[i]), *get_mpz (as->lower[i]));
+- mpz_add_ui (extent, extent, 1);
++ if (as && as->upper[i] && as->lower[i])
++ {
++ mpz_sub (extent, *get_mpz (as->upper[i]), *get_mpz (as->lower[i]));
++ mpz_add_ui (extent, extent, 1);
++ }
++ else
++ mpz_set_ui (extent, 0);
+
+ if (mpz_sgn (extent) < 0)
+ mpz_set_ui (extent, 0);
+Index: gcc/fortran/array.c
+===================================================================
+--- a/src/gcc/fortran/array.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/array.c (.../branches/gcc-6-branch)
+@@ -1072,6 +1072,7 @@
+ match
+ gfc_match_array_constructor (gfc_expr **result)
+ {
++ gfc_constructor *c;
+ gfc_constructor_base head, new_cons;
+ gfc_undo_change_set changed_syms;
+ gfc_expr *expr;
+@@ -1124,6 +1125,15 @@
+ gfc_restore_last_undo_checkpoint ();
+ goto cleanup;
+ }
++
++ if (ts.type == BT_CHARACTER
++ && ts.u.cl && !ts.u.cl->length && !ts.u.cl->length_from_typespec)
++ {
++ gfc_error ("Type-spec at %L cannot contain an asterisk for a "
++ "type parameter", &where);
++ gfc_restore_last_undo_checkpoint ();
++ goto cleanup;
++ }
+ }
+ }
+ else if (m == MATCH_ERROR)
+@@ -1177,8 +1187,6 @@
+ be converted. See PR fortran/67803. */
+ if (ts.type == BT_CHARACTER)
+ {
+- gfc_constructor *c;
+-
+ c = gfc_constructor_first (head);
+ for (; c; c = gfc_constructor_next (c))
+ {
+@@ -1201,6 +1209,14 @@
+ }
+ }
+ }
++
++ /* Walk the constructor and ensure type conversion for numeric types. */
++ if (gfc_numeric_ts (&ts))
++ {
++ c = gfc_constructor_first (head);
++ for (; c; c = gfc_constructor_next (c))
++ gfc_convert_type (c->expr, &ts, 1);
++ }
+ }
+ else
+ expr = gfc_get_array_expr (BT_UNKNOWN, 0, &where);
Index: gcc/fortran/trans-openmp.c
===================================================================
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_6_2_0_release)
@@ -4967,7 +7298,107 @@ Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,49 @@
+@@ -1,3 +1,149 @@
++2016-09-28 Steven G. Kargl <kargl at gcc.gnu.org>
++
++ Backport from trunk
++ PR fortran/41922
++ * target-memory.c (expr_to_char): Pass in locus and use it in error
++ messages.
++ (gfc_merge_initializers): Ditto.
++ * target-memory.h: Update prototype for gfc_merge_initializers ().
++ * trans-common.c (get_init_field): Use the correct locus.
++
++ PR fortran/60774
++ * parse.c (next_free,next_fixed): Issue error for statement label
++ without a statement.
++
++ PR fortran/61318
++ * interface.c (compare_parameter): Use better locus for error message.
++
++ PR fortran/68566
++ * check.c (gfc_check_reshape): Check for constant expression.
++
++ PR fortran/69514
++ * array.c (gfc_match_array_constructor): If type-spec is present,
++ walk the array constructor performing possible conversions for
++ numeric types.
++
++ PR fortran/69867
++ * decl.c (build_struct): Ensure that pointers point to something.
++
++ PR fortran/69962
++ * decl.c (gfc_set_constant_character_len): if expr is not
++ constant issue an error instead of an ICE.
++
++ PR fortran/70006
++ * io.c (gfc_resolve_dt): Use correct locus.
++ * resolve.c (resolve_branch): Ditto.
++
++ PR fortran/71067
++ * decl.c (match_data_constant): On error, set 'result' to NULL.
++
++ PR fortran/71730
++ * decl.c (char_len_param_value): Check return value of
++ gfc_reduce_init_expr().
++
++ PR fortran/71799
++ * resolve.c(gfc_resolve_iterator): Failure of type conversion need
++ not ICE.
++
++ PR fortran/71859
++ * check.c(numeric_check): Prevent ICE. Issue error for invalid
++ subroutine as an actual argument when numeric argument is expected.
++
++ PR fortran/71862
++ * class.c: Remove assert. Iterate over component only if non-null.
++
++ PR fortran/77260
++ * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
++ for unused variable if symbol is entry point.
++
++ PR fortran/77351
++ * frontend-passes.c (remove_trim,combine_array_constructor): Check for
++ NULL pointer.
++
++ PR fortran/77372
++ simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
++
++ PR fortran/77380
++ * dependency.c (gfc_check_dependency): Do not assert with
++ -fcoarray=lib.
++
++ PR fortran/77391
++ * resolve.c (deferred_requirements): New function to check F2008:C402.
++ (resolve_fl_variable,resolve_fl_parameter): Use it.
++
++ PR fortran/77420
++ * trans-common.c: Handle array elements in equivalence when
++ the lower and upper bounds of array spec are NULL.
++
++ PR fortran/77429
++ * dependency.c (gfc_check_dependency): Convert gcc_assert() to
++ a conditional and possible call to gfc_internal_error().
++
++ PR fortran/77460
++ * simplify.c (simplify_transformation_to_scalar): On error, result
++ may be NULL, simply return.
++
++ PR fortran/77506
++ * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
++ appear in an array constructor.
++
++ PR fortran/77507
++ * intrinsic.c (add_functions): Use correct keyword.
++
++ PR fortran/77612
++ * decl.c (char_len_param_value): Check parent namespace for
++ seen_implicit_none.
++
++ PR fortran/77694
++ * frontend-passes.c (optimize_binop_array_assignment): Check pointer
++ for NULL.
++
+2016-09-16 Jakub Jelinek <jakub at redhat.com>
+
+ Backported from mainline
@@ -5017,10 +7448,84 @@ Index: gcc/fortran/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
+Index: gcc/fortran/io.c
+===================================================================
+--- a/src/gcc/fortran/io.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/io.c (.../branches/gcc-6-branch)
+@@ -3052,7 +3052,7 @@
+ && dt->format_label->defined == ST_LABEL_UNKNOWN)
+ {
+ gfc_error ("FORMAT label %d at %L not defined", dt->format_label->value,
+- &dt->format_label->where);
++ loc);
+ return false;
+ }
+
+Index: gcc/fortran/frontend-passes.c
+===================================================================
+--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-6-branch)
+@@ -1061,6 +1061,9 @@
+ {
+ gfc_expr *e;
+
++ if (!*rhs)
++ return false;
++
+ e = *rhs;
+ if (e->expr_type == EXPR_OP)
+ {
+@@ -1137,6 +1140,8 @@
+ bool ret;
+
+ ret = false;
++ if (!rhs)
++ return ret;
+
+ /* Check for a // b // trim(c). Looping is probably not
+ necessary because the parser usually generates
+@@ -1274,6 +1279,9 @@
+ op1 = e->value.op.op1;
+ op2 = e->value.op.op2;
+
++ if (!op1 || !op2)
++ return false;
++
+ if (op1->expr_type == EXPR_ARRAY && op2->rank == 0)
+ scalar_first = false;
+ else if (op2->expr_type == EXPR_ARRAY && op1->rank == 0)
Index: gcc/fortran/resolve.c
===================================================================
--- a/src/gcc/fortran/resolve.c (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/fortran/resolve.c (.../branches/gcc-6-branch)
+@@ -6508,15 +6508,15 @@
+ /* Convert start, end, and step to the same type as var. */
+ if (iter->start->ts.kind != iter->var->ts.kind
+ || iter->start->ts.type != iter->var->ts.type)
+- gfc_convert_type (iter->start, &iter->var->ts, 2);
++ gfc_convert_type (iter->start, &iter->var->ts, 1);
+
+ if (iter->end->ts.kind != iter->var->ts.kind
+ || iter->end->ts.type != iter->var->ts.type)
+- gfc_convert_type (iter->end, &iter->var->ts, 2);
++ gfc_convert_type (iter->end, &iter->var->ts, 1);
+
+ if (iter->step->ts.kind != iter->var->ts.kind
+ || iter->step->ts.type != iter->var->ts.type)
+- gfc_convert_type (iter->step, &iter->var->ts, 2);
++ gfc_convert_type (iter->step, &iter->var->ts, 1);
+
+ if (iter->start->expr_type == EXPR_CONSTANT
+ && iter->end->expr_type == EXPR_CONSTANT
+@@ -8936,7 +8936,7 @@
+ if (label->defined == ST_LABEL_UNKNOWN)
+ {
+ gfc_error ("Label %d referenced at %L is never defined", label->value,
+- &label->where);
++ &code->loc);
+ return;
+ }
+
@@ -9431,6 +9431,24 @@
case EXEC_WAIT:
break;
@@ -5056,7 +7561,55 @@ Index: gcc/fortran/resolve.c
case EXEC_OMP_CRITICAL:
case EXEC_OMP_DISTRIBUTE:
case EXEC_OMP_DISTRIBUTE_PARALLEL_DO:
-@@ -11961,6 +11977,13 @@
+@@ -11479,6 +11495,27 @@
+ }
+
+
++/* F2008, C402 (R401): A colon shall not be used as a type-param-value
++ except in the declaration of an entity or component that has the POINTER
++ or ALLOCATABLE attribute. */
++
++static bool
++deferred_requirements (gfc_symbol *sym)
++{
++ if (sym->ts.deferred
++ && !(sym->attr.pointer
++ || sym->attr.allocatable
++ || sym->attr.omp_udr_artificial_var))
++ {
++ gfc_error ("Entity %qs at %L has a deferred type parameter and "
++ "requires either the POINTER or ALLOCATABLE attribute",
++ sym->name, &sym->declared_at);
++ return false;
++ }
++ return true;
++}
++
++
+ /* Resolve symbols with flavor variable. */
+
+ static bool
+@@ -11518,17 +11555,8 @@
+ }
+
+ /* Constraints on deferred type parameter. */
+- if (sym->ts.deferred
+- && !(sym->attr.pointer
+- || sym->attr.allocatable
+- || sym->attr.omp_udr_artificial_var))
+- {
+- gfc_error ("Entity %qs at %L has a deferred type parameter and "
+- "requires either the pointer or allocatable attribute",
+- sym->name, &sym->declared_at);
+- specification_expr = saved_specification_expr;
+- return false;
+- }
++ if (!deferred_requirements (sym))
++ return false;
+
+ if (sym->ts.type == BT_CHARACTER)
+ {
+@@ -11961,6 +11989,13 @@
iface = sym->ts.interface;
sym->ts.interface = NULL;
@@ -5070,7 +7623,18 @@ Index: gcc/fortran/resolve.c
if (iface == NULL)
goto check_formal;
-@@ -15660,7 +15683,8 @@
+@@ -13640,6 +13675,10 @@
+ return false;
+ }
+
++ /* Constraints on deferred type parameter. */
++ if (!deferred_requirements (sym))
++ return false;
++
+ /* Make sure a parameter that has been implicitly typed still
+ matches the implicit type, since PARAMETER statements can precede
+ IMPLICIT statements. */
+@@ -15660,7 +15699,8 @@
/* As gfc_resolve can be called during resolution of an OpenMP construct
body, we should clear any state associated to it, so that say NS's
DO loops are not interpreted as OpenMP loops. */
@@ -5080,7 +7644,7 @@ Index: gcc/fortran/resolve.c
resolve_types (ns);
component_assignment_level = 0;
-@@ -15672,5 +15696,6 @@
+@@ -15672,5 +15712,6 @@
gfc_run_passes (ns);
@@ -5088,11 +7652,149 @@ Index: gcc/fortran/resolve.c
+ if (!ns->construct_entities)
+ gfc_omp_restore_state (&old_omp_state);
}
+Index: gcc/fortran/trans-decl.c
+===================================================================
+--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-6-branch)
+@@ -5279,9 +5279,19 @@
+ }
+ else if (!sym->attr.use_assoc)
+ {
+- gfc_warning (OPT_Wunused_variable,
+- "Unused variable %qs declared at %L",
+- sym->name, &sym->declared_at);
++ /* Corner case: the symbol may be an entry point. At this point,
++ it may appear to be an unused variable. Suppress warning. */
++ bool enter = false;
++ gfc_entry_list *el;
++
++ for (el = sym->ns->entries; el; el=el->next)
++ if (strcmp(sym->name, el->sym->name) == 0)
++ enter = true;
++
++ if (!enter)
++ gfc_warning (OPT_Wunused_variable,
++ "Unused variable %qs declared at %L",
++ sym->name, &sym->declared_at);
+ if (sym->backend_decl != NULL_TREE)
+ TREE_NO_WARNING(sym->backend_decl) = 1;
+ }
+Index: gcc/fortran/target-memory.c
+===================================================================
+--- a/src/gcc/fortran/target-memory.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/target-memory.c (.../branches/gcc-6-branch)
+@@ -639,7 +639,8 @@
+ error. */
+
+ static size_t
+-expr_to_char (gfc_expr *e, unsigned char *data, unsigned char *chk, size_t len)
++expr_to_char (gfc_expr *e, locus *loc,
++ unsigned char *data, unsigned char *chk, size_t len)
+ {
+ int i;
+ int ptr;
+@@ -663,7 +664,7 @@
+ continue;
+ ptr = TREE_INT_CST_LOW(DECL_FIELD_OFFSET(cmp->backend_decl))
+ + TREE_INT_CST_LOW(DECL_FIELD_BIT_OFFSET(cmp->backend_decl))/8;
+- expr_to_char (c->expr, &data[ptr], &chk[ptr], len);
++ expr_to_char (c->expr, loc, &data[ptr], &chk[ptr], len);
+ }
+ return len;
+ }
+@@ -674,12 +675,16 @@
+ buffer = (unsigned char*)alloca (len);
+ len = gfc_target_encode_expr (e, buffer, len);
+
+- for (i = 0; i < (int)len; i++)
++ for (i = 0; i < (int)len; i++)
+ {
+ if (chk[i] && (buffer[i] != data[i]))
+ {
+- gfc_error ("Overlapping unequal initializers in EQUIVALENCE "
+- "at %L", &e->where);
++ if (loc)
++ gfc_error ("Overlapping unequal initializers in EQUIVALENCE "
++ "at %L", loc);
++ else
++ gfc_error ("Overlapping unequal initializers in EQUIVALENCE "
++ "at %C");
+ return 0;
+ }
+ chk[i] = 0xFF;
+@@ -695,7 +700,8 @@
+ the union declaration. */
+
+ size_t
+-gfc_merge_initializers (gfc_typespec ts, gfc_expr *e, unsigned char *data,
++gfc_merge_initializers (gfc_typespec ts, gfc_expr *e, locus *loc,
++ unsigned char *data,
+ unsigned char *chk, size_t length)
+ {
+ size_t len = 0;
+@@ -705,8 +711,7 @@
+ {
+ case EXPR_CONSTANT:
+ case EXPR_STRUCTURE:
+- len = expr_to_char (e, &data[0], &chk[0], length);
+-
++ len = expr_to_char (e, loc, &data[0], &chk[0], length);
+ break;
+
+ case EXPR_ARRAY:
+@@ -718,7 +723,7 @@
+ if (mpz_cmp_si (c->offset, 0) != 0)
+ len = elt_size * (size_t)mpz_get_si (c->offset);
+
+- len = len + gfc_merge_initializers (ts, c->expr, &data[len],
++ len = len + gfc_merge_initializers (ts, c->expr, loc, &data[len],
+ &chk[len], length - len);
+ }
+ break;
+Index: gcc/fortran/target-memory.h
+===================================================================
+--- a/src/gcc/fortran/target-memory.h (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/target-memory.h (.../branches/gcc-6-branch)
+@@ -44,7 +44,7 @@
+ int gfc_target_interpret_expr (unsigned char *, size_t, gfc_expr *, bool);
+
+ /* Merge overlapping equivalence initializers for trans-common.c. */
+-size_t gfc_merge_initializers (gfc_typespec, gfc_expr *,
++size_t gfc_merge_initializers (gfc_typespec, gfc_expr *, locus *,
+ unsigned char *, unsigned char *,
+ size_t);
+
Index: gcc/fortran/parse.c
===================================================================
--- a/src/gcc/fortran/parse.c (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/fortran/parse.c (.../branches/gcc-6-branch)
-@@ -4701,6 +4701,7 @@
+@@ -1071,13 +1071,8 @@
+ }
+
+ if (gfc_match_eos () == MATCH_YES)
+- {
+- gfc_warning_now (0, "Ignoring statement label in empty statement "
+- "at %L", &label_locus);
+- gfc_free_st_label (gfc_statement_label);
+- gfc_statement_label = NULL;
+- return ST_NONE;
+- }
++ gfc_error_now ("Statement label without statement at %L",
++ &label_locus);
+ }
+ }
+ else if (c == '!')
+@@ -1333,8 +1328,7 @@
+
+ blank_line:
+ if (digit_flag)
+- gfc_warning_now (0, "Ignoring statement label in empty statement at %L",
+- &label_locus);
++ gfc_error_now ("Statement label without statement at %L", &label_locus);
+
+ gfc_current_locus.lb->truncated = 0;
+ gfc_advance_line ();
+@@ -4701,6 +4695,7 @@
np = new_level (cp);
np->op = cp->op;
np->block = NULL;
@@ -5100,6 +7802,111 @@ Index: gcc/fortran/parse.c
count = 1 + ((cp->ext.omp_atomic & GFC_OMP_ATOMIC_MASK)
== GFC_OMP_ATOMIC_CAPTURE);
+Index: gcc/fortran/check.c
+===================================================================
+--- a/src/gcc/fortran/check.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/check.c (.../branches/gcc-6-branch)
+@@ -72,6 +72,11 @@
+ static bool
+ numeric_check (gfc_expr *e, int n)
+ {
++ /* Users sometime use a subroutine designator as an actual argument to
++ an intrinsic subprogram that expects an argument with a numeric type. */
++ if (e->symtree && e->symtree->n.sym->attr.subroutine)
++ goto error;
++
+ if (gfc_numeric_ts (&e->ts))
+ return true;
+
+@@ -86,7 +91,9 @@
+ return true;
+ }
+
+- gfc_error ("%qs argument of %qs intrinsic at %L must be a numeric type",
++error:
++
++ gfc_error ("%qs argument of %qs intrinsic at %L must have a numeric type",
+ gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
+ &e->where);
+
+@@ -3820,7 +3827,7 @@
+ if (!type_check (order, 3, BT_INTEGER))
+ return false;
+
+- if (order->expr_type == EXPR_ARRAY)
++ if (order->expr_type == EXPR_ARRAY && gfc_is_constant_expr (order))
+ {
+ int i, order_size, dim, perm[GFC_MAX_DIMENSIONS];
+ gfc_expr *e;
+Index: gcc/fortran/dependency.c
+===================================================================
+--- a/src/gcc/fortran/dependency.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/dependency.c (.../branches/gcc-6-branch)
+@@ -1252,8 +1252,15 @@
+ gfc_constructor *c;
+ int n;
+
+- gcc_assert (expr1->expr_type == EXPR_VARIABLE);
++ /* -fcoarray=lib can end up here with expr1->expr_type set to EXPR_FUNCTION
++ and a reference to _F.caf_get, so skip the assert. */
++ if (expr1->expr_type == EXPR_FUNCTION
++ && strcmp (expr1->value.function.name, "_F.caf_get") == 0)
++ return 0;
+
++ if (expr1->expr_type != EXPR_VARIABLE)
++ gfc_internal_error ("gfc_check_dependency: expecting an EXPR_VARIABLE");
++
+ switch (expr2->expr_type)
+ {
+ case EXPR_OP:
+Index: gcc/fortran/simplify.c
+===================================================================
+--- a/src/gcc/fortran/simplify.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/simplify.c (.../branches/gcc-6-branch)
+@@ -489,6 +489,8 @@
+ }
+
+ result = op (result, gfc_copy_expr (a));
++ if (!result)
++ return result;
+ }
+
+ return result;
+@@ -7043,10 +7045,18 @@
+ gfc_expr *
+ simplify_ieee_selected_real_kind (gfc_expr *expr)
+ {
+- gfc_actual_arglist *arg = expr->value.function.actual;
+- gfc_expr *p = arg->expr, *q = arg->next->expr,
+- *rdx = arg->next->next->expr;
++ gfc_actual_arglist *arg;
++ gfc_expr *p = NULL, *q = NULL, *rdx = NULL;
+
++ arg = expr->value.function.actual;
++ p = arg->expr;
++ if (arg->next)
++ {
++ q = arg->next->expr;
++ if (arg->next->next)
++ rdx = arg->next->next->expr;
++ }
++
+ /* Currently, if IEEE is supported and this module is built, it means
+ all our floating-point types conform to IEEE. Hence, we simply handle
+ IEEE_SELECTED_REAL_KIND like SELECTED_REAL_KIND. */
+Index: gcc/ira-lives.c
+===================================================================
+--- a/src/gcc/ira-lives.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/ira-lives.c (.../branches/gcc-6-branch)
+@@ -1014,7 +1014,7 @@
+ break;
+ }
+
+- if (reg_overlap_mentioned_p (reg, PATTERN (prev)))
++ if (reg_set_p (reg, prev))
+ break;
+ }
+ prev = PREV_INSN (prev);
Index: gcc/configure.ac
===================================================================
--- a/src/gcc/configure.ac (.../tags/gcc_6_2_0_release)
@@ -571097,6 +573904,54 @@ Index: gcc/config/i386/mmx.md
[(set_attr "type" "mmxadd")
(set_attr "prefix_extra" "1")
(set_attr "mode" "V2SF")])
+Index: gcc/config/i386/cpuid.h
+===================================================================
+--- a/src/gcc/config/i386/cpuid.h (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/i386/cpuid.h (.../branches/gcc-6-branch)
+@@ -229,21 +229,37 @@
+ return __eax;
+ }
+
+-/* Return cpuid data for requested cpuid level, as found in returned
++/* Return cpuid data for requested cpuid leaf, as found in returned
+ eax, ebx, ecx and edx registers. The function checks if cpuid is
+ supported and returns 1 for valid cpuid information or 0 for
+- unsupported cpuid level. All pointers are required to be non-null. */
++ unsupported cpuid leaf. All pointers are required to be non-null. */
+
+ static __inline int
+-__get_cpuid (unsigned int __level,
++__get_cpuid (unsigned int __leaf,
+ unsigned int *__eax, unsigned int *__ebx,
+ unsigned int *__ecx, unsigned int *__edx)
+ {
+- unsigned int __ext = __level & 0x80000000;
++ unsigned int __ext = __leaf & 0x80000000;
+
+- if (__get_cpuid_max (__ext, 0) < __level)
++ if (__get_cpuid_max (__ext, 0) < __leaf)
+ return 0;
+
+- __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
++ __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
+ return 1;
+ }
++
++/* Same as above, but sub-leaf can be specified. */
++
++static __inline int
++__get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
++ unsigned int *__eax, unsigned int *__ebx,
++ unsigned int *__ecx, unsigned int *__edx)
++{
++ unsigned int __ext = __leaf & 0x80000000;
++
++ if (__get_cpuid_max (__ext, 0) < __leaf)
++ return 0;
++
++ __cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
++ return 1;
++}
Index: gcc/config/i386/sse.md
===================================================================
--- a/src/gcc/config/i386/sse.md (.../tags/gcc_6_2_0_release)
@@ -571289,6 +574144,39 @@ Index: gcc/config/i386/subst.md
(define_subst_attr "round_saeonly_constraint" "round_saeonly" "vm" "v")
(define_subst_attr "round_saeonly_constraint2" "round_saeonly" "m" "v")
(define_subst_attr "round_saeonly_nimm_predicate" "round_saeonly" "vector_operand" "register_operand")
+Index: gcc/config/i386/driver-i386.c
+===================================================================
+--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-6-branch)
+@@ -517,7 +517,7 @@
+ /* Check cpuid level of extended features. */
+ __cpuid (0x80000000, ext_level, ebx, ecx, edx);
+
+- if (ext_level > 0x80000000)
++ if (ext_level >= 0x80000001)
+ {
+ __cpuid (0x80000001, eax, ebx, ecx, edx);
+
+@@ -535,7 +535,10 @@
+ has_3dnowp = edx & bit_3DNOWP;
+ has_3dnow = edx & bit_3DNOW;
+ has_mwaitx = ecx & bit_MWAITX;
++ }
+
++ if (ext_level >= 0x80000008)
++ {
+ __cpuid (0x80000008, eax, ebx, ecx, edx);
+ has_clzero = ebx & bit_CLZERO;
+ }
+@@ -603,7 +606,7 @@
+ unsigned int name;
+
+ /* Detect geode processor by its processor signature. */
+- if (ext_level > 0x80000001)
++ if (ext_level >= 0x80000002)
+ __cpuid (0x80000002, name, ebx, ecx, edx);
+ else
+ name = 0;
Index: gcc/config/i386/i386.c
===================================================================
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_6_2_0_release)
@@ -571675,6 +574563,23 @@ Index: gcc/config/avr/avr.c
cost = 18;
}
else if (CONSTANT_ADDRESS_P (x))
+Index: gcc/config/rs6000/predicates.md
+===================================================================
+--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-6-branch)
+@@ -1163,6 +1163,12 @@
+ (define_predicate "fpmask_comparison_operator"
+ (match_code "eq,gt,ge"))
+
++;; Return 1 if OP is a comparison operator suitable for vector/scalar
++;; comparisons that generate a 0/-1 mask (i.e. the inverse of
++;; fpmask_comparison_operator).
++(define_predicate "invert_fpmask_comparison_operator"
++ (match_code "ne,unlt,unle"))
++
+ ;; Return 1 if OP is a comparison operation that is valid for a branch
+ ;; insn, which is true if the corresponding bit in the CC register is set.
+ (define_predicate "branch_positive_comparison_operator"
Index: gcc/config/rs6000/xcoff.h
===================================================================
--- a/src/gcc/config/rs6000/xcoff.h (.../tags/gcc_6_2_0_release)
@@ -571739,6 +574644,63 @@ Index: gcc/config/rs6000/vsx.md
;; Explicit load/store expanders for the builtin functions for lxvd2x, etc.,
;; when you really want their element-reversing behavior.
+Index: gcc/config/rs6000/rs6000.md
+===================================================================
+--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-6-branch)
+@@ -4846,6 +4846,43 @@
+ [(set_attr "length" "8")
+ (set_attr "type" "vecperm")])
+
++;; Handle inverting the fpmask comparisons.
++(define_insn_and_split "*mov<SFDF:mode><SFDF2:mode>cc_invert_p9"
++ [(set (match_operand:SFDF 0 "vsx_register_operand" "=&<SFDF:Fv>,<SFDF:Fv>")
++ (if_then_else:SFDF
++ (match_operator:CCFP 1 "invert_fpmask_comparison_operator"
++ [(match_operand:SFDF2 2 "vsx_register_operand" "<SFDF2:Fv>,<SFDF2:Fv>")
++ (match_operand:SFDF2 3 "vsx_register_operand" "<SFDF2:Fv>,<SFDF2:Fv>")])
++ (match_operand:SFDF 4 "vsx_register_operand" "<SFDF:Fv>,<SFDF:Fv>")
++ (match_operand:SFDF 5 "vsx_register_operand" "<SFDF:Fv>,<SFDF:Fv>")))
++ (clobber (match_scratch:V2DI 6 "=0,&wa"))]
++ "TARGET_P9_MINMAX"
++ "#"
++ "&& 1"
++ [(set (match_dup 6)
++ (if_then_else:V2DI (match_dup 9)
++ (match_dup 7)
++ (match_dup 8)))
++ (set (match_dup 0)
++ (if_then_else:SFDF (ne (match_dup 6)
++ (match_dup 8))
++ (match_dup 5)
++ (match_dup 4)))]
++{
++ rtx op1 = operands[1];
++ enum rtx_code cond = reverse_condition_maybe_unordered (GET_CODE (op1));
++
++ if (GET_CODE (operands[6]) == SCRATCH)
++ operands[6] = gen_reg_rtx (V2DImode);
++
++ operands[7] = CONSTM1_RTX (V2DImode);
++ operands[8] = CONST0_RTX (V2DImode);
++
++ operands[9] = gen_rtx_fmt_ee (cond, CCFPmode, operands[2], operands[3]);
++}
++ [(set_attr "length" "8")
++ (set_attr "type" "vecperm")])
++
+ (define_insn "*fpmask<mode>"
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
+ (if_then_else:V2DI
+@@ -4865,7 +4902,7 @@
+ (match_operand:SFDF 3 "vsx_register_operand" "<Fv>")
+ (match_operand:SFDF 4 "vsx_register_operand" "<Fv>")))]
+ "TARGET_P9_MINMAX"
+- "xxsel %x0,%x1,%x3,%x4"
++ "xxsel %x0,%x4,%x3,%x1"
+ [(set_attr "type" "vecmove")])
+
+
Index: gcc/config/arm/arm.c
===================================================================
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_6_2_0_release)
@@ -571850,6 +574812,136 @@ Index: config.sub
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
+Index: libgfortran/ieee/ieee_arithmetic.F90
+===================================================================
+--- a/src/libgfortran/ieee/ieee_arithmetic.F90 (.../tags/gcc_6_2_0_release)
++++ b/src/libgfortran/ieee/ieee_arithmetic.F90 (.../branches/gcc-6-branch)
+@@ -857,12 +857,12 @@
+
+ ! IEEE_VALUE
+
+- elemental real(kind=4) function IEEE_VALUE_4(X, C) result(res)
+- implicit none
++ elemental real(kind=4) function IEEE_VALUE_4(X, CLASS) result(res)
++
+ real(kind=4), intent(in) :: X
+- type(IEEE_CLASS_TYPE), intent(in) :: C
++ type(IEEE_CLASS_TYPE), intent(in) :: CLASS
+
+- select case (C%hidden)
++ select case (CLASS%hidden)
+ case (1) ! IEEE_SIGNALING_NAN
+ res = -1
+ res = sqrt(res)
+@@ -895,12 +895,12 @@
+ end select
+ end function
+
+- elemental real(kind=8) function IEEE_VALUE_8(X, C) result(res)
+- implicit none
++ elemental real(kind=8) function IEEE_VALUE_8(X, CLASS) result(res)
++
+ real(kind=8), intent(in) :: X
+- type(IEEE_CLASS_TYPE), intent(in) :: C
++ type(IEEE_CLASS_TYPE), intent(in) :: CLASS
+
+- select case (C%hidden)
++ select case (CLASS%hidden)
+ case (1) ! IEEE_SIGNALING_NAN
+ res = -1
+ res = sqrt(res)
+@@ -934,12 +934,12 @@
+ end function
+
+ #ifdef HAVE_GFC_REAL_10
+- elemental real(kind=10) function IEEE_VALUE_10(X, C) result(res)
+- implicit none
++ elemental real(kind=10) function IEEE_VALUE_10(X, CLASS) result(res)
++
+ real(kind=10), intent(in) :: X
+- type(IEEE_CLASS_TYPE), intent(in) :: C
++ type(IEEE_CLASS_TYPE), intent(in) :: CLASS
+
+- select case (C%hidden)
++ select case (CLASS%hidden)
+ case (1) ! IEEE_SIGNALING_NAN
+ res = -1
+ res = sqrt(res)
+@@ -971,15 +971,16 @@
+ res = 0
+ end select
+ end function
++
+ #endif
+
+ #ifdef HAVE_GFC_REAL_16
+- elemental real(kind=16) function IEEE_VALUE_16(X, C) result(res)
+- implicit none
++ elemental real(kind=16) function IEEE_VALUE_16(X, CLASS) result(res)
++
+ real(kind=16), intent(in) :: X
+- type(IEEE_CLASS_TYPE), intent(in) :: C
++ type(IEEE_CLASS_TYPE), intent(in) :: CLASS
+
+- select case (C%hidden)
++ select case (CLASS%hidden)
+ case (1) ! IEEE_SIGNALING_NAN
+ res = -1
+ res = sqrt(res)
+Index: libgfortran/ChangeLog
+===================================================================
+--- a/src/libgfortran/ChangeLog (.../tags/gcc_6_2_0_release)
++++ b/src/libgfortran/ChangeLog (.../branches/gcc-6-branch)
+@@ -1,3 +1,17 @@
++2016-09-29 Jerry DeLisle <jvdelisle at gcc.gnu.org>
++
++ Backport from trunk
++ PR libgfortran/77707
++ io/transfer.c (next_record): Flush before calculating next_record.
++ Correctly calculate.
++
++2016-09-28 Steven G. Kargl <kargl at gcc.gnu.org>
++
++ Backport from trunk
++ PR fortran/77507
++ * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
++ IEEE_VALUE_16): Use correct keyword.
++
+ 2016-08-22 Release Manager
+
+ * GCC 6.2.0 released.
+Index: libgfortran/io/transfer.c
+===================================================================
+--- a/src/libgfortran/io/transfer.c (.../tags/gcc_6_2_0_release)
++++ b/src/libgfortran/io/transfer.c (.../branches/gcc-6-branch)
+@@ -3503,6 +3503,8 @@
+ else
+ next_record_w (dtp, done);
+
++ fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode);
++
+ if (!is_stream_io (dtp))
+ {
+ /* Since we have changed the position, set it to unspecified so
+@@ -3516,8 +3518,8 @@
+ fp = stell (dtp->u.p.current_unit->s);
+ /* Calculate next record, rounding up partial records. */
+ dtp->u.p.current_unit->last_record =
+- (fp + dtp->u.p.current_unit->recl - 1) /
+- dtp->u.p.current_unit->recl;
++ (fp + dtp->u.p.current_unit->recl) /
++ dtp->u.p.current_unit->recl - 1;
+ }
+ else
+ dtp->u.p.current_unit->last_record++;
+@@ -3526,7 +3528,6 @@
+ if (!done)
+ pre_position (dtp);
+
+- fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode);
+ smarkeor (dtp->u.p.current_unit->s);
+ }
+
Index: .
===================================================================
--- a/src/. (.../tags/gcc_6_2_0_release)
diff --git a/debian/rules.patch b/debian/rules.patch
index 8511da1..ce203ec 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -93,7 +93,6 @@ debian_patches += \
$(if $(with_linaro_branch),,vulcan-costs) \
libffi-pax \
libffi-race-condition \
- pr71709 \
pr77686-workaround \
# this is still needed on powerpc, e.g. firefox and insighttoolkit4 will ftbfs.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git
More information about the Reproducible-commits
mailing list