[gcc-6] 199/401: * Update to SVN 20160901 (r239944, 6.2.1) from the gcc-6-branch.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:49:26 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 81eb06018b85a999b03e0456b37328e8f6882151
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Sun Sep 4 12:13:58 2016 +0000
* Update to SVN 20160901 (r239944, 6.2.1) from the gcc-6-branch.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8964 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 12 +-
debian/patches/svn-updates.diff | 1403 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 1393 insertions(+), 22 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1dc4c26..f979264 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
-gcc-6 (6.2.0-3) UNRELEASED; urgency=medium
-
+gcc-6 (6.2.0-3) unstable; urgency=medium
+
+ * Update to SVN 20160901 (r239944, 6.2.1) from the gcc-6-branch.
+ - Fix PR fortran/71014, PR libstdc++/77395, PR tree-optimization/72866,
+ PR debug/77363, PR middle-end/77377, PR middle-end/77259,
+ PR target/71910 (cygwin), PR target/77281 (ARM),
+ PR tree-optimization/71077, PR tree-optimization/68542, PR fortran/77352,
+ PR fortran/77374, PR fortran/71014, PR fortran/69281.
* Fix setting the stage1 C++ compiler.
- -- Matthias Klose <doko at debian.org> Thu, 01 Sep 2016 21:52:45 +0200
+ -- Matthias Klose <doko at debian.org> Sun, 04 Sep 2016 12:38:47 +0200
gcc-6 (6.2.0-2) unstable; urgency=medium
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 9294858..487d8a9 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 6 branch upto 20160830 (r239868).
+# DP: updates from the 6 branch upto 20160901 (r239944).
last_update()
{
cat > ${dir}LAST_UPDATED <EOF
-Tue Aug 30 19:48:45 CEST 2016
-Tue Aug 30 17:48:45 UTC 2016 (revision 239868)
+Thu Sep 1 21:54:12 CEST 2016
+Thu Sep 1 19:54:12 UTC 2016 (revision 239944)
EOF
}
@@ -12,6 +12,47 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_6_2_0_release svn://gcc.gnu.o
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
+Index: libgomp/ChangeLog
+===================================================================
+--- a/src/libgomp/ChangeLog (.../tags/gcc_6_2_0_release)
++++ b/src/libgomp/ChangeLog (.../branches/gcc-6-branch)
+@@ -1,3 +1,11 @@
++2016-09-01 Jakub Jelinek <jakub at redhat.com>
++
++ Backported from mainline
++ 2016-08-19 Jakub Jelinek <jakub at redhat.com>
++
++ PR fortran/71014
++ * testsuite/libgomp.fortran/pr71014.f90: New test.
++
+ 2016-08-22 Release Manager
+
+ * GCC 6.2.0 released.
+Index: libgomp/testsuite/libgomp.fortran/pr71014.f90
+===================================================================
+--- a/src/libgomp/testsuite/libgomp.fortran/pr71014.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/libgomp/testsuite/libgomp.fortran/pr71014.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,20 @@
++! PR fortran/71014
++! { dg-do run }
++! { dg-additional-options "-O0" }
++
++program pr71014
++ implicit none
++ integer :: i, j
++ integer, parameter :: t = 100*101/2
++ integer :: s(16)
++ s(:) = 0
++!$omp parallel do
++ do j = 1, 16
++ associate (k => j)
++ do i = 1, 100
++ s(j) = s(j) + i
++ end do
++ end associate
++ end do
++ if (any(s /= t)) call abort
++end program pr71014
Index: libstdc++-v3/scripts/testsuite_flags.in
===================================================================
--- a/src/libstdc++-v3/scripts/testsuite_flags.in (.../tags/gcc_6_2_0_release)
@@ -171,6 +212,30 @@ 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/std/type_traits
+===================================================================
+--- a/src/libstdc++-v3/include/std/type_traits (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/include/std/type_traits (.../branches/gcc-6-branch)
+@@ -994,6 +994,9 @@
+ is_function<_From>>>::value>
+ struct __is_base_to_derived_ref;
+
++ template<typename _Tp, typename... _Args>
++ struct is_constructible;
++
+ // Detect whether we have a downcast situation during
+ // reference binding.
+ template<typename _From, typename _To>
+@@ -1004,7 +1007,8 @@
+ typedef typename remove_cv<typename remove_reference<_To
+ >::type>::type __dst_t;
+ typedef __and_<__not_<is_same<__src_t, __dst_t>>,
+- is_base_of<__src_t, __dst_t>> type;
++ is_base_of<__src_t, __dst_t>,
++ __not_<is_constructible<__dst_t, _From>>> type;
+ static constexpr bool value = type::value;
+ };
+
Index: libstdc++-v3/include/bits/stl_iterator.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_iterator.h (.../tags/gcc_6_2_0_release)
@@ -281,7 +346,19 @@ 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,35 @@
+@@ -1,3 +1,47 @@
++2016-08-31 Ville Voutilainen <ville.voutilainen at gmail.com>
++
++ PR libstdc++/77395
++ * include/std/type_traits (is_constructible): Forward-declare...
++ (__is_base_to_derived_ref): ...and use here.
++ * testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
++ * testsuite/20_util/is_constructible/77395.cc: New.
++ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
++ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
++ Likewise.
++ * testsuite/20_util/tuple/77395.cc: New.
++
+2016-08-30 Jonathan Wakely <jwakely at redhat.com>
+
+ Backport from mainline
@@ -399,6 +476,93 @@ Index: libstdc++-v3/testsuite/23_containers/map/77334.cc
+ std::map<int, A> m1, m2;
+ m2 = std::move(m1);
+}
+Index: libstdc++-v3/testsuite/20_util/tuple/77395.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/tuple/77395.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/tuple/77395.cc (.../branches/gcc-6-branch)
+@@ -0,0 +1,47 @@
++// { 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 <tuple>
++#include <utility>
++
++struct derived;
++struct base
++{
++ operator derived & () &;
++ operator derived const & () const &;
++ operator derived && () &&;
++};
++
++struct derived : base {};
++
++base::operator derived & () & { return *static_cast<derived *>(this); }
++base::operator derived const & () const & { return *static_cast<derived const *>(this); }
++base::operator derived && () && { return std::move(*static_cast<derived *>(this)); }
++
++std::tuple<derived &&> test(base && b)
++{
++ return std::tuple<derived &&>(std::move(b));
++}
++
++int main(int,char**)
++{
++ auto d = std::get<0>(test(derived{}));
++ return 0;
++}
+Index: libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc (.../branches/gcc-6-branch)
+@@ -48,4 +48,4 @@
+ // { dg-error "required from here" "" { target *-*-* } 40 }
+ // { dg-error "required from here" "" { target *-*-* } 42 }
+
+-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1924 }
++// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1928 }
+Index: libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc (.../branches/gcc-6-branch)
+@@ -48,5 +48,5 @@
+ // { dg-error "required from here" "" { target *-*-* } 40 }
+ // { dg-error "required from here" "" { target *-*-* } 42 }
+
+-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1820 }
+-// { dg-error "declaration of" "" { target *-*-* } 1777 }
++// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1824 }
++// { dg-error "declaration of" "" { target *-*-* } 1781 }
+Index: libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc (.../branches/gcc-6-branch)
+@@ -19,7 +19,7 @@
+ // with this library; see the file COPYING3. If not see
+ // <http://www.gnu.org/licenses/>.
+
+-// { dg-error "static assertion failed" "" { target *-*-* } 2259 }
++// { dg-error "static assertion failed" "" { target *-*-* } 2263 }
+
+ #include <utility>
+
Index: libstdc++-v3/testsuite/20_util/forward/1_neg.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/20_util/forward/1_neg.cc (.../tags/gcc_6_2_0_release)
@@ -414,6 +578,108 @@ Index: libstdc++-v3/testsuite/20_util/forward/1_neg.cc
}
struct A
+Index: libstdc++-v3/testsuite/20_util/is_constructible/77395.cc
+===================================================================
+--- a/src/libstdc++-v3/testsuite/20_util/is_constructible/77395.cc (.../tags/gcc_6_2_0_release)
++++ b/src/libstdc++-v3/testsuite/20_util/is_constructible/77395.cc (.../branches/gcc-6-branch)
+@@ -0,0 +1,55 @@
++// { 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 <type_traits>
++#include <utility>
++
++struct derived;
++struct base
++{
++ operator derived & () &;
++ operator derived const & () const &;
++ operator derived && () &&;
++};
++
++struct derived : base {};
++
++base::operator derived & () &
++{
++ return *static_cast<derived *>(this);
++}
++
++base::operator derived const & () const &
++{
++ return *static_cast<derived const *>(this);
++}
++
++base::operator derived && () &&
++{
++ return std::move(*static_cast<derived *>(this));
++}
++
++int main()
++{
++ base b;
++ derived&& d(static_cast<derived&&>(std::move(b)));
++ derived&& d2(std::move(b));
++ static_assert(std::is_constructible<derived&&, base&&>::value, "");
++}
+Index: ChangeLog
+===================================================================
+--- a/src/ChangeLog (.../tags/gcc_6_2_0_release)
++++ b/src/ChangeLog (.../branches/gcc-6-branch)
+@@ -1,3 +1,7 @@
++2016-08-31 Jakub Sejdak <jakub.sejdak at phoesys.com>
++
++ * config.sub: Add support for Phoenix-RTOS targets.
++
+ 2016-08-22 Release Manager
+
+ * GCC 6.2.0 released.
+Index: libgcc/config.host
+===================================================================
+--- a/src/libgcc/config.host (.../tags/gcc_6_2_0_release)
++++ b/src/libgcc/config.host (.../branches/gcc-6-branch)
+@@ -402,6 +402,13 @@
+ unwind_header=config/arm/unwind-arm.h
+ extra_parts="$extra_parts crti.o crtn.o"
+ ;;
++arm*-*-phoenix*)
++ tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix"
++ tmake_file="${tmake_file} arm/t-bpabi"
++ tm_file="$tm_file arm/bpabi-lib.h"
++ extra_parts="crtbegin.o crtend.o crti.o crtn.o"
++ unwind_header=config/arm/unwind-arm.h
++ ;;
+ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+ tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
+ tm_file="$tm_file arm/bpabi-lib.h"
+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 @@
++2016-08-31 Jakub Sejdak <jakub.sejdak at phoesys.com>
++
++ * config.host: Add support for arm*-*-phoenix* targets.
++
+ 2016-08-22 Release Manager
+
+ * GCC 6.2.0 released.
Index: gcc/tree-vrp.c
===================================================================
--- a/src/gcc/tree-vrp.c (.../tags/gcc_6_2_0_release)
@@ -500,12 +766,118 @@ Index: gcc/DATESTAMP
+++ b/src/gcc/DATESTAMP (.../branches/gcc-6-branch)
@@ -1 +1 @@
-20160822
-+20160830
++20160901
+Index: gcc/fold-const.c
+===================================================================
+--- a/src/gcc/fold-const.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fold-const.c (.../branches/gcc-6-branch)
+@@ -14093,7 +14093,6 @@
+ if (!VECTOR_TYPE_P (type))
+ {
+ /* Have vector comparison with scalar boolean result. */
+- bool result = true;
+ gcc_assert ((code == EQ_EXPR || code == NE_EXPR)
+ && VECTOR_CST_NELTS (op0) == VECTOR_CST_NELTS (op1));
+ for (unsigned i = 0; i < VECTOR_CST_NELTS (op0); i++)
+@@ -14101,11 +14100,12 @@
+ tree elem0 = VECTOR_CST_ELT (op0, i);
+ tree elem1 = VECTOR_CST_ELT (op1, i);
+ tree tmp = fold_relational_const (code, type, elem0, elem1);
+- result &= integer_onep (tmp);
++ if (tmp == NULL_TREE)
++ return NULL_TREE;
++ if (integer_zerop (tmp))
++ return constant_boolean_node (false, type);
+ }
+- if (code == NE_EXPR)
+- result = !result;
+- return constant_boolean_node (result, type);
++ return constant_boolean_node (true, type);
+ }
+ unsigned count = VECTOR_CST_NELTS (op0);
+ tree *elts = XALLOCAVEC (tree, count);
Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_6_2_0_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-6-branch)
-@@ -1,3 +1,149 @@
+@@ -1,3 +1,226 @@
++2016-09-01 Jakub Jelinek <jakub at redhat.com>
++
++ Backported from mainline
++ 2016-08-30 Jakub Jelinek <jakub at redhat.com>
++
++ PR tree-optimization/72866
++ * tree-vect-patterns.c (search_type_for_mask): Turn into
++ a small wrapper, move all code to ...
++ (search_type_for_mask_1): ... this new function. Add caching
++ and adjust recursive calls.
++
++ PR debug/77363
++ * dwarf2out.c (modified_type_die): Use lookup_type_die (type)
++ instead of lookup_type_die (type_main_variant (type)) even for array
++ types.
++
++ PR middle-end/77377
++ * simplify-rtx.c (avoid_constant_pool_reference): For out of bounds
++ constant pool reference return x instead of c.
++
++ 2016-08-19 Jakub Jelinek <jakub at redhat.com>
++
++ * config/i386/t-i386 (i386-c.o): Don't depend on
++ i386-builtin-types.inc.
++ (i386.o): Depend on i386-builtin-types.inc.
++
++ 2016-08-17 Jakub Jelinek <jakub at redhat.com>
++
++ PR middle-end/77259
++ * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If
++ turning a call into __builtin_unreachable-like noreturn call, adjust
++ gimple_call_set_fntype.
++ * tree-cfgcleanup.c (fixup_noreturn_call): Remove lhs also if
++ gimple_call_fntype has void return type.
++
++ 2016-08-16 Jakub Jelinek <jakub at redhat.com>
++
++ PR target/71910
++ * tree-cfg.c (execute_fixup_cfg): Add node variable, use it. Before inlining,
++ add cgraph edge for the added __builtin_unreachable call.
++
++2016-09-01 Gerald Pfeifer <gerald at pfeifer.com>
++
++ * doc/extend.texi (SPU Built-in Functions): Remove stale
++ references to material formerly at IBM and Sony.
++
++2016-09-01 Matthew Wahab <matthew.wahab at arm.com>
++
++ PR target/77281
++ * config/arm/arm.c (neon_valid_immediate): Delete declaration.
++ Use const_vec_duplicate to check for duplicated elements.
++
++2016-09-01 Eric Botcazou <ebotcazou at adacore.com>
++
++ * config/i386/i386.c (ix86_option_override_internal): Also disable the
++ STV pass if -mstackrealign is enabled.
++
++2016-08-31 Patrick Palka <ppalka at gcc.gnu.org>
++
++ Backport from mainline
++ 2016-08-27 Patrick Palka <ppalka at gcc.gnu.org>
++
++ PR tree-optimization/71077
++ PR tree-optimization/68542
++ * fold-const.c (fold_relational_const): Fix folding of
++ VECTOR_CST comparisons that have a scalar boolean result type.
++
++2016-08-31 Gerald Pfeifer <gerald at pfeifer.com>
++
++ * doc/install.texi (Binaries): www.opencsw.org now uses https.
++
++2016-08-31 Jakub Sejdak <jakub.sejdak at phoesys.com>
++
++ * config.gcc: Add support for arm*-*-phoenix* targets.
++ * config/arm/t-phoenix: New.
++ * config/phoenix.h: New.
++
+2016-08-29 Uros Bizjak <ubizjak at gmail.com>
+
+ PR target/77403
@@ -655,7 +1027,7 @@ Index: gcc/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
-@@ -205,9 +356,9 @@
+@@ -205,9 +433,9 @@
2016-08-09 Martin Jambor <mjambor at suse.cz>
@@ -700,6 +1072,53 @@ Index: gcc/testsuite/gcc.target/powerpc/pr72863.c
+ d8 += 16;
+ }
+}
+Index: gcc/testsuite/gcc.target/i386/pr71077.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr71077.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr71077.c (.../branches/gcc-6-branch)
+@@ -0,0 +1,42 @@
++/* { dg-do run } */
++/* { dg-require-effective-target avx2 } */
++/* { dg-options "-O3 -mavx2" } */
++
++#include "avx2-check.h"
++
++typedef unsigned int ui;
++ui x[32*32];
++ui y[32];
++ui z[32];
++void __attribute__ ((noinline, noclone)) foo (ui n, ui z)
++{
++ ui i, b;
++ ui v;
++ for (i = 0; i< n; i++)
++ {
++ v = y[i];
++ if (v) {
++ for (b = 0; b < 32; b++)
++ if ((v >> b) & 1)
++ x[i*32 +b] = z;
++ y[i] = 0;
++ }
++ }
++}
++
++static void
++avx2_test (void)
++{
++ int i;
++ unsigned int val;
++ for (i = 0; i<32; i++)
++ {
++ val = 1U << i;
++ y[i] = (i & 1)? 0 : val;
++ z[i] = i;
++ }
++ foo (32, 10);
++ for (i=0; i<1024; i+=66)
++ if (x[i] != 10)
++ __builtin_abort ();
++}
Index: gcc/testsuite/gcc.target/i386/pr72867.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr72867.c (.../tags/gcc_6_2_0_release)
@@ -748,6 +1167,155 @@ Index: gcc/testsuite/gcc.target/i386/pr77403.c
+{
+ v ^= (V){1};
+}
+Index: gcc/testsuite/gcc.target/i386/pr77377.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/pr77377.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gcc.target/i386/pr77377.c (.../branches/gcc-6-branch)
+@@ -0,0 +1,6 @@
++/* PR middle-end/77377 */
++/* { dg-do compile } */
++/* { dg-options "-O3 -msse" } */
++/* { dg-additional-options "-fpic" { target fpic } } */
++
++#include "../../c-c++-common/pr59037.c"
+Index: gcc/testsuite/gfortran.dg/gomp/pr77352.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/gomp/pr77352.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/gomp/pr77352.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,16 @@
++! PR fortran/77352
++! { dg-do compile }
++! { dg-additional-options "-fstack-arrays -O2" }
++! { dg-additional-options "-fopenacc" { target fopenacc } }
++
++program pr77352
++ real, allocatable :: a(:,:), b(:)
++ integer :: m, n
++ m = 4
++ n = 2
++ allocate (a(m,n), b(m))
++ a = 1.0
++!$omp parallel workshare
++ b(:) = [ sum(a, dim=1) ]
++!$omp end parallel workshare
++end
+Index: gcc/testsuite/gfortran.dg/gomp/pr72744.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/gomp/pr72744.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/gomp/pr72744.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,18 @@
++! PR fortran/72744
++! { dg-do compile }
++! { dg-additional-options "-Ofast" }
++
++program pr72744
++ integer, parameter :: n = 20
++ integer :: i, z(n), h(n)
++ z = [(i, i=1,n)]
++ h = [(i, i=n,1,-1)]
++ call sub (n, h)
++ if ( any(h/=z) ) call abort
++end
++subroutine sub (n, x)
++ integer :: n, x(n)
++!$omp parallel
++ x(:) = x(n:1:-1)
++!$omp end parallel
++end
+Index: gcc/testsuite/gfortran.dg/gomp/pr77374.f08
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/gomp/pr77374.f08 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/gomp/pr77374.f08 (.../branches/gcc-6-branch)
+@@ -0,0 +1,21 @@
++! PR fortran/77374
++! { dg-do compile }
++
++subroutine foo (a, b)
++ integer :: a, b
++!$omp atomic
++ b = b + a
++!$omp atomic
++ z(1) = z(1) + 1 ! { dg-error "must have the pointer attribute" }
++end subroutine
++subroutine bar (a, b)
++ integer :: a, b
++ interface
++ function baz (i) result (res)
++ integer, pointer :: res
++ integer :: i
++ end function
++ end interface
++!$omp atomic
++ baz (i) = 1 ! { dg-error "unexpected" }
++end subroutine
+Index: gcc/testsuite/gfortran.dg/gomp/pr69281.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/gomp/pr69281.f90 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/gomp/pr69281.f90 (.../branches/gcc-6-branch)
+@@ -0,0 +1,63 @@
++! PR fortran/69281
++! { dg-do compile }
++! { dg-additional-options "-fstack-arrays -O2" }
++
++program pr69281
++ implicit none
++ call foo1((/ 1, 3, 3, 7 /))
++ call foo2((/ 1, 3, 3, 7 /))
++ call foo3((/ 1, 3, 3, 7 /))
++ call foo4((/ 1, 3, 3, 7 /))
++ call foo5((/ 1, 3, 3, 7 /))
++ call foo6((/ 1, 3, 3, 7 /))
++contains
++ subroutine foo1(x)
++ integer, intent(in) :: x(:)
++ !$omp parallel
++ call baz(bar(x))
++ !$omp end parallel
++ end subroutine
++ subroutine foo2(x)
++ integer, intent(in) :: x(:)
++ !$omp task
++ call baz(bar(x))
++ !$omp end task
++ end subroutine
++ subroutine foo3(x)
++ integer, intent(in) :: x(:)
++ !$omp target
++ call baz(bar(x))
++ !$omp end target
++ end subroutine
++ subroutine foo4(x)
++ integer, intent(in) :: x(:)
++ !$omp target teams
++ call baz(bar(x))
++ !$omp end target teams
++ end subroutine
++ subroutine foo5(x)
++ integer, intent(in) :: x(:)
++ integer :: i
++ !$omp parallel do
++ do i = 1, 1
++ call baz(bar(x))
++ end do
++ end subroutine
++ subroutine foo6(x)
++ integer, intent(in) :: x(:)
++ integer :: i
++ !$omp target teams distribute parallel do
++ do i = 1, 1
++ call baz(bar(x))
++ end do
++ end subroutine
++ function bar(x) result(a)
++ integer, dimension(:), intent(in) :: x
++ integer, dimension(2,size(x)) :: a
++ a(1,:) = 1
++ a(2,:) = x
++ end function
++ subroutine baz(a)
++ integer, dimension(:,:), intent(in) :: a
++ end subroutine
++end program
Index: gcc/testsuite/gfortran.dg/submodule_17.f08
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/submodule_17.f08 (.../tags/gcc_6_2_0_release)
@@ -1154,11 +1722,83 @@ Index: gcc/testsuite/gcc.dg/ipa/iinline-attr.c
-/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in test" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in test" "inline" { xfail visium-*-* } } } */
+/* Missing back-end support for attribute __optimize__ on Visium. */
+Index: gcc/testsuite/gcc.dg/vect/pr72866.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/pr72866.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/pr72866.c (.../branches/gcc-6-branch)
+@@ -0,0 +1,19 @@
++/* PR tree-optimization/72866 */
++/* { dg-do compile } */
++
++unsigned int dl;
++int rx, lb;
++
++void
++fo (int jv, int be)
++{
++ const unsigned int xw = 16;
++ unsigned int ya, wo;
++
++ for (ya = 0; ya < 2; ++ya)
++ for (wo = 0; wo < xw; ++wo)
++ {
++ dl += (jv ? be : rx);
++ rx += ((lb == 0) + 1);
++ }
++}
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,99 @@
+@@ -1,3 +1,147 @@
++2016-09-01 Jakub Jelinek <jakub at redhat.com>
++
++ Backported from mainline
++ 2016-08-31 Jakub Jelinek <jakub at redhat.com>
++
++ PR fortran/77352
++ * gfortran.dg/gomp/pr77352.f90: New test.
++
++ PR fortran/77374
++ * gfortran.dg/gomp/pr77374.f08: New test.
++
++ 2016-08-30 Jakub Jelinek <jakub at redhat.com>
++
++ PR tree-optimization/72866
++ * gcc.dg/vect/pr72866.c: New test.
++
++ PR debug/77363
++ * g++.dg/debug/dwarf2/pr77363.C: New test.
++
++ PR middle-end/77377
++ * gcc.target/i386/pr77377.c: New test.
++
++ 2016-08-19 Jakub Jelinek <jakub at redhat.com>
++
++ PR fortran/72744
++ * gfortran.dg/gomp/pr72744.f90: New test.
++
++ PR fortran/69281
++ * gfortran.dg/gomp/pr69281.f90: New test.
++
++ 2016-08-17 Jakub Jelinek <jakub at redhat.com>
++
++ PR middle-end/77259
++ * g++.dg/ipa/devirt-52.C: New test.
++
++ 2016-08-16 Jakub Jelinek <jakub at redhat.com>
++
++ PR target/71910
++ * g++.dg/gomp/pr71910.C: New test.
++
++2016-08-31 Patrick Palka <ppalka at gcc.gnu.org>
++
++ Backport from mainline
++ 2016-08-27 Patrick Palka <ppalka at gcc.gnu.org>
++
++ PR tree-optimization/71077
++ * gcc.target/i386/pr71077.c: New test.
++
+2016-08-29 Uros Bizjak <ubizjak at gmail.com>
+
+ PR target/77403
@@ -1258,7 +1898,7 @@ Index: gcc/testsuite/ChangeLog
2016-08-22 Release Manager
* GCC 6.2.0 released.
-@@ -150,8 +246,8 @@
+@@ -150,8 +294,8 @@
2016-08-09 Martin Jambor <mjambor at suse.cz>
@@ -1269,7 +1909,7 @@ Index: gcc/testsuite/ChangeLog
2016-08-09 Richard Biener <rguenther at suse.de>
-@@ -276,8 +372,8 @@
+@@ -276,8 +420,8 @@
2016-07-20 Martin Jambor <mjambor at suse.cz>
@@ -1280,7 +1920,7 @@ Index: gcc/testsuite/ChangeLog
2016-07-19 Jakub Jelinek <jakub at redhat.com>
-@@ -418,7 +514,7 @@
+@@ -418,7 +562,7 @@
2016-07-06 Yuri Rumyantsev <ysrumyan at gmail.com>
PR tree-optimization/71518
@@ -1317,6 +1957,110 @@ Index: gcc/testsuite/gfortran.fortran-torture/compile/pr76490.f90
+ goto 15
+ endif
+end subroutine bug1
+Index: gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/debug/dwarf2/pr77363.C (.../branches/gcc-6-branch)
+@@ -0,0 +1,20 @@
++// PR debug/77363
++// { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" }
++// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type2\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
++// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type3\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
++// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type4\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
++// { dg-final { scan-assembler "DIE \\(\[^\n\r\]*\\) DW_TAG_typedef\[^\n\r\]*\[\n\r]*\[^\n\r\]*type5\[^\n\r\]* DW_AT_name\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_file\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_decl_line\[^\n\r\]*\[\n\r]*\[^\n\r\]* DW_AT_type" } }
++
++typedef unsigned short type1;
++typedef unsigned char type2;
++typedef type2 type3[16];
++typedef unsigned char type4[16];
++typedef struct
++{
++ struct
++ {
++ type3 a;
++ type4 b;
++ } c;
++} type5;
++type5 var;
+Index: gcc/testsuite/g++.dg/ipa/devirt-52.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/ipa/devirt-52.C (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/ipa/devirt-52.C (.../branches/gcc-6-branch)
+@@ -0,0 +1,56 @@
++// PR middle-end/77259
++// { dg-do compile { target c++11 } }
++// { dg-options "-O2" }
++
++template <typename, typename = int> class A;
++template <typename, typename> struct A
++{
++ A (A &&);
++};
++template <typename S, typename T, typename U>
++A<S> operator+(S *, const A<T, U> &);
++template <typename S, typename T, typename U>
++void operator+(const A<T, U> &, S *);
++struct B
++{
++ template <typename V> B (V);
++};
++template <typename V> V foo (B) {}
++class C;
++template <typename> struct D
++{
++ C *operator->() { return d; }
++ C *d;
++};
++struct C
++{
++ virtual A<int> bar ();
++};
++struct E
++{
++ ~E ();
++ virtual A<char> bar (const B &) const;
++};
++template <typename> struct F : E
++{
++};
++template <typename W> struct F<D<W>> : E
++{
++ A<char> bar (const B &) const try
++ {
++ D<W> a = baz ();
++ }
++ catch (int)
++ {
++ }
++ D<W> baz () const
++ {
++ D<C> b = foo<D<C>>(0);
++ "" + b->bar () + "";
++ }
++};
++struct G : F<D<int>>
++{
++ G (int);
++};
++void test () { G (0); }
+Index: gcc/testsuite/g++.dg/gomp/pr71910.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/gomp/pr71910.C (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/gomp/pr71910.C (.../branches/gcc-6-branch)
+@@ -0,0 +1,13 @@
++// PR target/71910
++// { dg-do compile }
++// { dg-additional-options "-O2" }
++
++#include <vector>
++
++int
++main ()
++{
++ std::vector<double> vec(10);
++#pragma omp parallel
++ __builtin_exit (0);
++}
Index: gcc/tree-ssa-propagate.c
===================================================================
--- a/src/gcc/tree-ssa-propagate.c (.../tags/gcc_6_2_0_release)
@@ -1808,6 +2552,20 @@ Index: gcc/tree-ssa-propagate.c
}
ssa_prop_fini ();
+Index: gcc/dwarf2out.c
+===================================================================
+--- a/src/gcc/dwarf2out.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/dwarf2out.c (.../branches/gcc-6-branch)
+@@ -11466,7 +11466,8 @@
+ copy was created to help us keep track of typedef names) and
+ that copy might have a different TYPE_UID from the original
+ ..._TYPE node. */
+- if (TREE_CODE (type) != VECTOR_TYPE)
++ if (TREE_CODE (type) != VECTOR_TYPE
++ && TREE_CODE (type) != ARRAY_TYPE)
+ return lookup_type_die (type_main_variant (type));
+ else
+ /* Vectors have the debugging information in the type,
Index: gcc/expr.c
===================================================================
--- a/src/gcc/expr.c (.../tags/gcc_6_2_0_release)
@@ -1826,11 +2584,133 @@ Index: gcc/expr.c
}
if (BYTES_BIG_ENDIAN)
+Index: gcc/fortran/openmp.c
+===================================================================
+--- a/src/gcc/fortran/openmp.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/openmp.c (.../branches/gcc-6-branch)
+@@ -3914,12 +3914,33 @@
+ = (gfc_omp_atomic_op) (atomic_code->ext.omp_atomic & GFC_OMP_ATOMIC_MASK);
+
+ code = code->block->next;
+- gcc_assert (code->op == EXEC_ASSIGN);
+- gcc_assert (((aop != GFC_OMP_ATOMIC_CAPTURE) && code->next == NULL)
+- || ((aop == GFC_OMP_ATOMIC_CAPTURE)
+- && code->next != NULL
+- && code->next->op == EXEC_ASSIGN
+- && code->next->next == NULL));
++ /* resolve_blocks asserts this is initially EXEC_ASSIGN.
++ If it changed to EXEC_NOP, assume an error has been emitted already. */
++ if (code->op == EXEC_NOP)
++ return;
++ if (code->op != EXEC_ASSIGN)
++ {
++ unexpected:
++ gfc_error ("unexpected !$OMP ATOMIC expression at %L", &code->loc);
++ return;
++ }
++ if (aop != GFC_OMP_ATOMIC_CAPTURE)
++ {
++ if (code->next != NULL)
++ goto unexpected;
++ }
++ else
++ {
++ if (code->next == NULL)
++ goto unexpected;
++ if (code->next->op == EXEC_NOP)
++ return;
++ if (code->next->op != EXEC_ASSIGN || code->next->next)
++ {
++ code = code->next;
++ goto unexpected;
++ }
++ }
+
+ if (code->expr1->expr_type != EXPR_VARIABLE
+ || code->expr1->symtree == NULL
+Index: gcc/fortran/trans-openmp.c
+===================================================================
+--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-6-branch)
+@@ -3552,7 +3552,9 @@
+ gfc_start_block (&block);
+ omp_clauses = gfc_trans_omp_clauses (&block, code->ext.omp_clauses,
+ code->loc);
++ pushlevel ();
+ stmt = gfc_trans_omp_code (code->block->next, true);
++ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
+ stmt = build2_loc (input_location, OMP_PARALLEL, void_type_node, stmt,
+ omp_clauses);
+ gfc_add_expr_to_block (&block, stmt);
+@@ -3997,10 +3999,7 @@
+ code->loc);
+ pushlevel ();
+ stmt = gfc_trans_omp_workshare (code, &workshare_clauses);
+- if (TREE_CODE (stmt) != BIND_EXPR)
+- stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
+- else
+- poplevel (0, 0);
++ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
+ stmt = build2_loc (input_location, OMP_PARALLEL, void_type_node, stmt,
+ omp_clauses);
+ OMP_PARALLEL_COMBINED (stmt) = 1;
+@@ -4060,7 +4059,9 @@
+ gfc_start_block (&block);
+ omp_clauses = gfc_trans_omp_clauses (&block, code->ext.omp_clauses,
+ code->loc);
++ pushlevel ();
+ stmt = gfc_trans_omp_code (code->block->next, true);
++ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
+ stmt = build2_loc (input_location, OMP_TASK, void_type_node, stmt,
+ omp_clauses);
+ gfc_add_expr_to_block (&block, stmt);
+@@ -4213,7 +4214,11 @@
+ = gfc_trans_omp_clauses (&block, &clausesa[GFC_OMP_SPLIT_TARGET],
+ code->loc);
+ if (code->op == EXEC_OMP_TARGET)
+- stmt = gfc_trans_omp_code (code->block->next, true);
++ {
++ pushlevel ();
++ stmt = gfc_trans_omp_code (code->block->next, true);
++ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0));
++ }
+ else
+ {
+ pushlevel ();
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,10 @@
+@@ -1,3 +1,39 @@
++2016-09-01 Jakub Jelinek <jakub at redhat.com>
++
++ Backported from mainline
++ 2016-08-31 Jakub Jelinek <jakub at redhat.com>
++
++ PR fortran/77352
++ * trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
++ BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
++
++ PR fortran/77374
++ * parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
++ to cp->block->ext.omp_atomic.
++ * resolve.c (gfc_resolve_blocks): Assert block with one or two
++ EXEC_ASSIGNs for EXEC_*_ATOMIC.
++ * openmp.c (resolve_omp_atomic): Don't assert one or two
++ EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
++ error unexpected statements.
++
++ 2016-08-19 Jakub Jelinek <jakub at redhat.com>
++
++ PR fortran/71014
++ * resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
++ and restore omp state around the resolving.
++
++ PR fortran/69281
++ * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
++ gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
++ BIND_EXPR with its own forced BLOCK.
++
+2016-08-24 Paul Thomas <pault at gcc.gnu.org>
+
+ Backport from trunk
@@ -1845,7 +2725,42 @@ 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)
-@@ -11961,6 +11961,13 @@
+@@ -9431,6 +9431,24 @@
+ case EXEC_WAIT:
+ break;
+
++ case EXEC_OMP_ATOMIC:
++ case EXEC_OACC_ATOMIC:
++ {
++ gfc_omp_atomic_op aop
++ = (gfc_omp_atomic_op) (b->ext.omp_atomic & GFC_OMP_ATOMIC_MASK);
++
++ /* Verify this before calling gfc_resolve_code, which might
++ change it. */
++ gcc_assert (b->next && b->next->op == EXEC_ASSIGN);
++ gcc_assert (((aop != GFC_OMP_ATOMIC_CAPTURE)
++ && b->next->next == NULL)
++ || ((aop == GFC_OMP_ATOMIC_CAPTURE)
++ && b->next->next != NULL
++ && b->next->next->op == EXEC_ASSIGN
++ && b->next->next->next == NULL));
++ }
++ break;
++
+ case EXEC_OACC_PARALLEL_LOOP:
+ case EXEC_OACC_PARALLEL:
+ case EXEC_OACC_KERNELS_LOOP:
+@@ -9443,9 +9461,7 @@
+ case EXEC_OACC_CACHE:
+ case EXEC_OACC_ENTER_DATA:
+ case EXEC_OACC_EXIT_DATA:
+- case EXEC_OACC_ATOMIC:
+ case EXEC_OACC_ROUTINE:
+- case EXEC_OMP_ATOMIC:
+ case EXEC_OMP_CRITICAL:
+ case EXEC_OMP_DISTRIBUTE:
+ case EXEC_OMP_DISTRIBUTE_PARALLEL_DO:
+@@ -11961,6 +11977,13 @@
iface = sym->ts.interface;
sym->ts.interface = NULL;
@@ -1859,6 +2774,102 @@ Index: gcc/fortran/resolve.c
if (iface == NULL)
goto check_formal;
+@@ -15660,7 +15683,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. */
+- gfc_omp_save_and_clear_state (&old_omp_state);
++ if (!ns->construct_entities)
++ gfc_omp_save_and_clear_state (&old_omp_state);
+
+ resolve_types (ns);
+ component_assignment_level = 0;
+@@ -15672,5 +15696,6 @@
+
+ gfc_run_passes (ns);
+
+- gfc_omp_restore_state (&old_omp_state);
++ if (!ns->construct_entities)
++ gfc_omp_restore_state (&old_omp_state);
+ }
+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 @@
+ np = new_level (cp);
+ np->op = cp->op;
+ np->block = NULL;
++ np->ext.omp_atomic = cp->ext.omp_atomic;
+ count = 1 + ((cp->ext.omp_atomic & GFC_OMP_ATOMIC_MASK)
+ == GFC_OMP_ATOMIC_CAPTURE);
+
+Index: gcc/tree-cfgcleanup.c
+===================================================================
+--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-6-branch)
+@@ -602,10 +602,15 @@
+ /* If there is an LHS, remove it, but only if its type has fixed size.
+ The LHS will need to be recreated during RTL expansion and creating
+ temporaries of variable-sized types is not supported. Also don't
+- do this with TREE_ADDRESSABLE types, as assign_temp will abort. */
++ do this with TREE_ADDRESSABLE types, as assign_temp will abort.
++ Drop LHS regardless of TREE_ADDRESSABLE, if the function call
++ has been changed into a call that does not return a value, like
++ __builtin_unreachable or __cxa_pure_virtual. */
+ tree lhs = gimple_call_lhs (stmt);
+- if (lhs && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
+- && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
++ if (lhs
++ && ((TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
++ && !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
++ || VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (stmt)))))
+ {
+ gimple_call_set_lhs (stmt, NULL_TREE);
+
+Index: gcc/simplify-rtx.c
+===================================================================
+--- a/src/gcc/simplify-rtx.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/simplify-rtx.c (.../branches/gcc-6-branch)
+@@ -251,15 +251,14 @@
+ /* If we're accessing the constant in a different mode than it was
+ originally stored, attempt to fix that up via subreg simplifications.
+ If that fails we have no choice but to return the original memory. */
+- if ((offset != 0 || cmode != GET_MODE (x))
+- && offset >= 0 && offset < GET_MODE_SIZE (cmode))
++ if (offset == 0 && cmode == GET_MODE (x))
++ return c;
++ else if (offset >= 0 && offset < GET_MODE_SIZE (cmode))
+ {
+ rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);
+ if (tem && CONSTANT_P (tem))
+ return tem;
+ }
+- else
+- return c;
+ }
+
+ return x;
+Index: gcc/tree-ssa-pre.c
+===================================================================
+--- a/src/gcc/tree-ssa-pre.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/tree-ssa-pre.c (.../branches/gcc-6-branch)
+@@ -4335,6 +4335,15 @@
+ lang_hooks.decl_printable_name (fn, 2));
+ }
+ gimple_call_set_fndecl (call_stmt, fn);
++ /* If changing the call to __builtin_unreachable
++ or similar noreturn function, adjust gimple_call_fntype
++ too. */
++ if (gimple_call_noreturn_p (call_stmt)
++ && VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
++ && TYPE_ARG_TYPES (TREE_TYPE (fn))
++ && (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (fn)))
++ == void_type_node))
++ gimple_call_set_fntype (call_stmt, TREE_TYPE (fn));
+ maybe_remove_unused_call_args (cfun, call_stmt);
+ gimple_set_modified (stmt, true);
+ }
Index: gcc/po/es.po
===================================================================
--- a/src/gcc/po/es.po (.../tags/gcc_6_2_0_release)
@@ -567195,6 +568206,142 @@ Index: gcc/po/zh_CN.po
+#, fuzzy
+#~ msgid "Unexpected junk in !$ACC WAIT at %C"
+#~ msgstr "%C处 ELSE 语句后有非预期的垃圾字符"
+Index: gcc/tree-vect-patterns.c
+===================================================================
+--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-6-branch)
+@@ -3177,13 +3177,11 @@
+ }
+
+
+-/* Return the proper type for converting bool VAR into
+- an integer value or NULL_TREE if no such type exists.
+- The type is chosen so that converted value has the
+- same number of elements as VAR's vector type. */
++/* Helper for search_type_for_mask. */
+
+ static tree
+-search_type_for_mask (tree var, vec_info *vinfo)
++search_type_for_mask_1 (tree var, vec_info *vinfo,
++ hash_map<gimple *, tree> &cache)
+ {
+ gimple *def_stmt;
+ enum vect_def_type dt;
+@@ -3208,6 +3206,10 @@
+ if (!is_gimple_assign (def_stmt))
+ return NULL_TREE;
+
++ tree *c = cache.get (def_stmt);
++ if (c)
++ return *c;
++
+ rhs_code = gimple_assign_rhs_code (def_stmt);
+ rhs1 = gimple_assign_rhs1 (def_stmt);
+
+@@ -3216,14 +3218,15 @@
+ case SSA_NAME:
+ case BIT_NOT_EXPR:
+ CASE_CONVERT:
+- res = search_type_for_mask (rhs1, vinfo);
++ res = search_type_for_mask_1 (rhs1, vinfo, cache);
+ break;
+
+ case BIT_AND_EXPR:
+ case BIT_IOR_EXPR:
+ case BIT_XOR_EXPR:
+- res = search_type_for_mask (rhs1, vinfo);
+- res2 = search_type_for_mask (gimple_assign_rhs2 (def_stmt), vinfo);
++ res = search_type_for_mask_1 (rhs1, vinfo, cache);
++ res2 = search_type_for_mask_1 (gimple_assign_rhs2 (def_stmt), vinfo,
++ cache);
+ if (!res || (res2 && TYPE_PRECISION (res) > TYPE_PRECISION (res2)))
+ res = res2;
+ break;
+@@ -3235,8 +3238,9 @@
+
+ if (TREE_CODE (TREE_TYPE (rhs1)) == BOOLEAN_TYPE)
+ {
+- res = search_type_for_mask (rhs1, vinfo);
+- res2 = search_type_for_mask (gimple_assign_rhs2 (def_stmt), vinfo);
++ res = search_type_for_mask_1 (rhs1, vinfo, cache);
++ res2 = search_type_for_mask_1 (gimple_assign_rhs2 (def_stmt),
++ vinfo, cache);
+ if (!res || (res2 && TYPE_PRECISION (res) > TYPE_PRECISION (res2)))
+ res = res2;
+ break;
+@@ -3244,12 +3248,18 @@
+
+ comp_vectype = get_vectype_for_scalar_type (TREE_TYPE (rhs1));
+ if (comp_vectype == NULL_TREE)
+- return NULL_TREE;
++ {
++ res = NULL_TREE;
++ break;
++ }
+
+ mask_type = get_mask_type_for_scalar_type (TREE_TYPE (rhs1));
+ if (!mask_type
+ || !expand_vec_cmp_expr_p (comp_vectype, mask_type))
+- return NULL_TREE;
++ {
++ res = NULL_TREE;
++ break;
++ }
+
+ if (TREE_CODE (TREE_TYPE (rhs1)) != INTEGER_TYPE
+ || !TYPE_UNSIGNED (TREE_TYPE (rhs1)))
+@@ -3262,10 +3272,22 @@
+ }
+ }
+
++ cache.put (def_stmt, res);
+ return res;
+ }
+
++/* Return the proper type for converting bool VAR into
++ an integer value or NULL_TREE if no such type exists.
++ The type is chosen so that converted value has the
++ same number of elements as VAR's vector type. */
+
++static tree
++search_type_for_mask (tree var, vec_info *vinfo)
++{
++ hash_map<gimple *, tree> cache;
++ return search_type_for_mask_1 (var, vinfo, cache);
++}
++
+ /* Function vect_recog_bool_pattern
+
+ Try to find pattern like following:
+Index: gcc/config.gcc
+===================================================================
+--- a/src/gcc/config.gcc (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config.gcc (.../branches/gcc-6-branch)
+@@ -815,6 +815,11 @@
+ ;;
+ esac
+ ;;
++*-*-phoenix*)
++ gas=yes
++ gnu_ld=yes
++ default_use_cxa_atexit=yes
++ ;;
+ *-*-rtems*)
+ case ${enable_threads} in
+ "" | yes | rtems) thread_file='rtems' ;;
+@@ -1097,6 +1102,12 @@
+ # The EABI requires the use of __cxa_atexit.
+ default_use_cxa_atexit=yes
+ ;;
++arm*-*-phoenix*)
++ tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
++ tm_file="${tm_file} newlib-stdint.h phoenix.h"
++ tm_file="${tm_file} arm/aout.h arm/arm.h"
++ tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
++ ;;
+ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+ case ${target} in
+ arm*eb-*-eabi*)
Index: gcc/Makefile.in
===================================================================
--- a/src/gcc/Makefile.in (.../tags/gcc_6_2_0_release)
@@ -567208,6 +568355,92 @@ Index: gcc/Makefile.in
s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
build/gcov-iov$(build_exeext) '$(BASEVER_c)' '$(DEVPHASE_c)' \
> tmp-gcov-iov.h
+Index: gcc/tree-cfg.c
+===================================================================
+--- a/src/gcc/tree-cfg.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/tree-cfg.c (.../branches/gcc-6-branch)
+@@ -8883,16 +8883,14 @@
+ gcov_type count_scale;
+ edge e;
+ edge_iterator ei;
++ cgraph_node *node = cgraph_node::get (current_function_decl);
+
+ count_scale
+- = GCOV_COMPUTE_SCALE (cgraph_node::get (current_function_decl)->count,
+- ENTRY_BLOCK_PTR_FOR_FN (cfun)->count);
++ = GCOV_COMPUTE_SCALE (node->count, ENTRY_BLOCK_PTR_FOR_FN (cfun)->count);
+
+- ENTRY_BLOCK_PTR_FOR_FN (cfun)->count =
+- cgraph_node::get (current_function_decl)->count;
+- EXIT_BLOCK_PTR_FOR_FN (cfun)->count =
+- apply_scale (EXIT_BLOCK_PTR_FOR_FN (cfun)->count,
+- count_scale);
++ ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = node->count;
++ EXIT_BLOCK_PTR_FOR_FN (cfun)->count
++ = apply_scale (EXIT_BLOCK_PTR_FOR_FN (cfun)->count, count_scale);
+
+ FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR_FOR_FN (cfun)->succs)
+ e->count = apply_scale (e->count, count_scale);
+@@ -8985,10 +8983,19 @@
+ {
+ if (stmt && is_gimple_call (stmt))
+ gimple_call_set_ctrl_altering (stmt, false);
+- stmt = gimple_build_call
+- (builtin_decl_implicit (BUILT_IN_UNREACHABLE), 0);
++ tree fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
++ stmt = gimple_build_call (fndecl, 0);
+ gimple_stmt_iterator gsi = gsi_last_bb (bb);
+ gsi_insert_after (&gsi, stmt, GSI_NEW_STMT);
++ if (!cfun->after_inlining)
++ {
++ gcall *call_stmt = dyn_cast <gcall *> (stmt);
++ int freq
++ = compute_call_stmt_bb_frequency (current_function_decl,
++ bb);
++ node->create_edge (cgraph_node::get_create (fndecl),
++ call_stmt, bb->count, freq);
++ }
+ }
+ }
+ }
+Index: gcc/config/phoenix.h
+===================================================================
+--- a/src/gcc/config/phoenix.h (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/phoenix.h (.../branches/gcc-6-branch)
+@@ -0,0 +1,33 @@
++/* Base configuration file for all Phoenix-RTOS targets.
++ Copyright (C) 2016 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC 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.
++
++GCC 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 GCC; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>. */
++
++#undef TARGET_OS_CPP_BUILTINS
++#define TARGET_OS_CPP_BUILTINS() \
++ do { \
++ builtin_define_std ("phoenix"); \
++ builtin_define_std ("unix"); \
++ builtin_assert ("system=phoenix"); \
++ builtin_assert ("system=unix"); \
++ } while(0);
++
++#define STD_LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
++
++/* This will prevent selecting 'unsigned long int' instead of 'unsigned int' as 'uint32_t' in stdint-newlib.h. */
++#undef STDINT_LONG32
++#define STDINT_LONG32 0
Index: gcc/config/i386/i386.md
===================================================================
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_6_2_0_release)
@@ -567541,6 +568774,24 @@ Index: gcc/config/i386/sse.md
[(set_attr "type" "sselog")
(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")
+Index: gcc/config/i386/t-i386
+===================================================================
+--- a/src/gcc/config/i386/t-i386 (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/i386/t-i386 (.../branches/gcc-6-branch)
+@@ -19,10 +19,12 @@
+ OPTIONS_H_EXTRA += $(srcdir)/config/i386/stringop.def
+ TM_H += $(srcdir)/config/i386/x86-tune.def
+
+-i386-c.o: $(srcdir)/config/i386/i386-c.c i386-builtin-types.inc
++i386-c.o: $(srcdir)/config/i386/i386-c.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
+
++i386.o: i386-builtin-types.inc
++
+ i386-builtin-types.inc: s-i386-bt ; @true
+ s-i386-bt: $(srcdir)/config/i386/i386-builtin-types.awk \
+ $(srcdir)/config/i386/i386-builtin-types.def
Index: gcc/config/i386/subst.md
===================================================================
--- a/src/gcc/config/i386/subst.md (.../tags/gcc_6_2_0_release)
@@ -567646,7 +568897,22 @@ Index: gcc/config/i386/i386.c
/* Enable popcnt instruction for -msse4.2 or -mabm. */
if (TARGET_SSE4_2_P (opts->x_ix86_isa_flags)
|| TARGET_ABM_P (opts->x_ix86_isa_flags))
-@@ -9916,6 +9912,9 @@
+@@ -5476,11 +5472,12 @@
+ if (!(opts_set->x_target_flags & MASK_STV))
+ opts->x_target_flags |= MASK_STV;
+ /* Disable STV if -mpreferred-stack-boundary={2,3} or
+- -mincoming-stack-boundary={2,3} - the needed
++ -mincoming-stack-boundary={2,3} or -mstackrealign - the needed
+ stack realignment will be extra cost the pass doesn't take into
+ account and the pass can't realign the stack. */
+ if (ix86_preferred_stack_boundary < 128
+- || ix86_incoming_stack_boundary < 128)
++ || ix86_incoming_stack_boundary < 128
++ || opts->x_ix86_force_align_arg_pointer)
+ opts->x_target_flags &= ~MASK_STV;
+ if (!ix86_tune_features[X86_TUNE_AVX256_UNALIGNED_LOAD_OPTIMAL]
+ && !(opts_set->x_target_flags & MASK_AVX256_SPLIT_UNALIGNED_LOAD))
+@@ -9916,6 +9913,9 @@
layout_type (record);
@@ -567656,7 +568922,7 @@ Index: gcc/config/i386/i386.c
/* The correct type is an array type of one element. */
return build_array_type (record, build_index_type (size_zero_node));
}
-@@ -9928,17 +9927,36 @@
+@@ -9928,17 +9928,36 @@
{
if (TARGET_64BIT)
{
@@ -567700,7 +568966,7 @@ Index: gcc/config/i386/i386.c
}
else
{
-@@ -22671,7 +22689,7 @@
+@@ -22671,7 +22690,7 @@
/* We want to check HONOR_NANS and HONOR_SIGNED_ZEROS here,
but MODE may be a vector mode and thus not appropriate. */
@@ -567709,7 +568975,7 @@ Index: gcc/config/i386/i386.c
{
int u = is_min ? UNSPEC_IEEE_MIN : UNSPEC_IEEE_MAX;
rtvec v;
-@@ -48848,6 +48866,8 @@
+@@ -48848,6 +48867,8 @@
/* ms_abi and sysv_abi calling convention function attributes. */
{ "ms_abi", 0, 0, false, true, true, ix86_handle_abi_attribute, true },
{ "sysv_abi", 0, 0, false, true, true, ix86_handle_abi_attribute, true },
@@ -567718,7 +568984,7 @@ Index: gcc/config/i386/i386.c
{ "ms_hook_prologue", 0, 0, true, false, false, ix86_handle_fndecl_attribute,
false },
{ "callee_pop_aggregate_return", 1, 1, false, true, true,
-@@ -52690,8 +52710,6 @@
+@@ -52690,8 +52711,6 @@
static tree
ix86_canonical_va_list_type (tree type)
{
@@ -567727,7 +568993,7 @@ Index: gcc/config/i386/i386.c
/* Resolve references and pointers to va_list type. */
if (TREE_CODE (type) == MEM_REF)
type = TREE_TYPE (type);
-@@ -52700,64 +52718,25 @@
+@@ -52700,64 +52719,25 @@
else if (POINTER_TYPE_P (type) && TREE_CODE (TREE_TYPE (type)) == ARRAY_TYPE)
type = TREE_TYPE (type);
@@ -567840,6 +569106,38 @@ 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/arm/arm.c
+===================================================================
+--- a/src/gcc/config/arm/arm.c (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/arm/arm.c (.../branches/gcc-6-branch)
+@@ -12386,7 +12386,6 @@
+ if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
+ {
+ rtx el0 = CONST_VECTOR_ELT (op, 0);
+- const REAL_VALUE_TYPE *r0;
+
+ if (!vfp3_const_double_rtx (el0) && el0 != CONST0_RTX (GET_MODE (el0)))
+ return -1;
+@@ -12395,15 +12394,11 @@
+ if (GET_MODE_INNER (mode) == HFmode)
+ return -1;
+
+- r0 = CONST_DOUBLE_REAL_VALUE (el0);
++ /* All elements in the vector must be the same. Note that 0.0 and -0.0
++ are distinct in this context. */
++ if (!const_vec_duplicate_p (op))
++ return -1;
+
+- for (i = 1; i < n_elts; i++)
+- {
+- rtx elt = CONST_VECTOR_ELT (op, i);
+- if (!real_equal (r0, CONST_DOUBLE_REAL_VALUE (elt)))
+- return -1;
+- }
+-
+ if (modconst)
+ *modconst = CONST_VECTOR_ELT (op, 0);
+
Index: gcc/config/arm/t-rtems
===================================================================
--- a/src/gcc/config/arm/t-rtems (.../tags/gcc_6_2_0_release)
@@ -567862,3 +569160,70 @@ Index: gcc/config/arm/t-rtems
MULTILIB_REQUIRED += mthumb/march=armv6-m
MULTILIB_REQUIRED += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv7-a
+Index: gcc/config/arm/t-phoenix
+===================================================================
+--- a/src/gcc/config/arm/t-phoenix (.../tags/gcc_6_2_0_release)
++++ b/src/gcc/config/arm/t-phoenix (.../branches/gcc-6-branch)
+@@ -0,0 +1,29 @@
++# Copyright (C) 2016 Free Software Foundation, Inc.
++#
++# This file is part of GCC.
++#
++# GCC 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.
++#
++# GCC 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 GCC; see the file COPYING3. If not see
++# <http://www.gnu.org/licenses/>.
++
++MULTILIB_OPTIONS = marm/mthumb
++MULTILIB_DIRNAMES = arm thumb
++MULTILIB_EXCEPTIONS =
++MULTILIB_MATCHES =
++
++MULTILIB_OPTIONS += mfloat-abi=hard
++MULTILIB_DIRNAMES += fpu
++MULTILIB_MATCHES += mfloat-abi?hard=mhard-float
++
++MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
++MULTILIB_DIRNAMES += normal interwork
+Index: gcc
+===================================================================
+--- a/src/gcc (.../tags/gcc_6_2_0_release)
++++ b/src/gcc (.../branches/gcc-6-branch)
+
+Property changes on: gcc
+___________________________________________________________________
+Added: svn:mergeinfo
+## -0,0 +0,1 ##
+ Merged /trunk/gcc:r239173,239656,239797
+Index: config.sub
+===================================================================
+--- a/src/config.sub (.../tags/gcc_6_2_0_release)
++++ b/src/config.sub (.../branches/gcc-6-branch)
+@@ -1399,7 +1399,7 @@
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+- | -onefs* | -tirtos*)
++ | -onefs* | -tirtos* | -phoenix*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+Index: .
+===================================================================
+--- a/src/. (.../tags/gcc_6_2_0_release)
++++ b/src/. (.../branches/gcc-6-branch)
+
+Property changes on: .
+___________________________________________________________________
+Modified: svn:mergeinfo
+## -0,0 +0,1 ##
+ Merged /trunk:r239656
--
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