[gcc-7] 334/354: * Update to SVN 20171102 (r254339) from the gcc-7-branch.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:51:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository gcc-7.

commit a35d8d7e271f55153e76a00d2e91c008d5b30c8e
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Thu Nov 2 16:13:18 2017 +0000

      * Update to SVN 20171102 (r254339) from the gcc-7-branch.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9804 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                |   7 +-
 debian/patches/svn-updates.diff | 471 ++++++++++++++++++++++++++++++++++++++--
 2 files changed, 457 insertions(+), 21 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 703583c..f7167ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,14 +1,15 @@
 gcc-7 (7.2.0-13) UNRELEASED; urgency=medium
 
-  * Update to SVN 20171031 (r254249) from the gcc-7-branch.
+  * Update to SVN 20171102 (r254339) from the gcc-7-branch.
     - Fix PR c++/82159, PR sanitizer/81715, PR rtl-optimization/82192,
       PR c/82234, PR target/82703 (x86), PR c++/82085, PR c++/82373,
-      PR fortran/81758, PR libgfortran/81938.
+      PR fortran/81758, PR libgfortran/81938, PR c++/81702, PR target/82772,
+      PR fortran/80554, PR fortran/80850.
     - Fix subminor version number. Closes: #879823.
   * Bump libunwind (build-)dependency for ia64. Closes: #879959.
   * libgcc and libstdc++ symbols files updates for mipsn32.
 
- -- Matthias Klose <doko at debian.org>  Tue, 31 Oct 2017 06:10:36 +0100
+ -- Matthias Klose <doko at debian.org>  Thu, 02 Nov 2017 11:45:49 +0100
 
 gcc-7 (7.2.0-12) unstable; urgency=medium
 
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index f0eee49..635cd76 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 7 branch upto 20171031 (r254249).
+# DP: updates from the 7 branch upto 20171102 (r254339).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Tue Oct 31 06:10:22 CET 2017
-Tue Oct 31 05:10:22 UTC 2017 (revision 254249)
+Thu Nov  2 11:44:14 CET 2017
+Thu Nov  2 10:44:14 UTC 2017 (revision 254339)
 EOF
 }
 
@@ -10155,7 +10155,7 @@ Index: gcc/DATESTAMP
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-7-branch)
 @@ -1 +1 @@
 -20170814
-+20171031
++20171102
 Index: gcc/tree.c
 ===================================================================
 --- a/src/gcc/tree.c	(.../tags/gcc_7_2_0_release)
@@ -10729,7 +10729,17 @@ Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,732 @@
+@@ -1,3 +1,742 @@
++2017-11-01  Martin Jambor  <mjambor at suse.cz>
++
++	PR c++/81702
++	* gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
++
++2017-10-31  Uros Bizjak  <ubizjak at gmail.com>
++
++	PR target/82772
++	* config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
++
 +2017-10-27  Jakub Jelinek  <jakub at redhat.com>
 +
 +	Backported from mainline
@@ -12673,6 +12683,58 @@ Index: gcc/testsuite/lib/target-supports.exp
  proc check_effective_target_arm_crc_ok_nocache { } {
      global et_arm_crc_flags
      set et_arm_crc_flags "-march=armv8-a+crc"
+@@ -5764,7 +5798,7 @@
+ 	  set et_vect_hw_misalign_saved($et_index) 1
+ 	}
+ 	if { [istarget arm*-*-*] } {
+-	    set et_vect_hw_misalign_saved($et_index) [check_effective_target_arm_vect_no_misalign]
++	    set et_vect_hw_misalign_saved($et_index) [expr ![check_effective_target_arm_vect_no_misalign]]
+ 	}
+     }
+     verbose "check_effective_target_vect_hw_misalign:\
+Index: gcc/testsuite/gfortran.dg/class_64.f90
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/class_64.f90	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/class_64.f90	(.../branches/gcc-7-branch)
+@@ -0,0 +1,38 @@
++! { dg-do compile }
++! { dg-options "-fdump-tree-original" }
++!
++! Test the fix for PR80850 in which the _len field was not being
++! set for 'arg' in the call to 'foo'.
++!
++  type :: mytype
++    integer :: i
++  end type
++  class (mytype), pointer :: c
++
++  allocate (c, source = mytype (99_8))
++
++  call foo(c)
++  call bar(c)
++
++  deallocate (c)
++
++contains
++
++  subroutine foo (arg)
++    class(*) :: arg
++    select type (arg)
++      type is (mytype)
++        if (arg%i .ne. 99_8) call abort
++    end select
++  end subroutine
++
++  subroutine bar (arg)
++    class(mytype) :: arg
++    select type (arg)
++      type is (mytype)
++        if (arg%i .ne. 99_8) call abort
++    end select
++  end subroutine
++
++end
++! { dg-final { scan-tree-dump-times "arg.*._len" 1 "original" } }
 Index: gcc/testsuite/gfortran.dg/dtio_12.f90
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/dtio_12.f90	(.../tags/gcc_7_2_0_release)
@@ -12915,6 +12977,67 @@ Index: gcc/testsuite/gfortran.dg/array_temporaries_4.f90
 +  x = (/a (0, "one"),a (0, "two"),a (0, "three"),a (0, "four")/) ! { dg-warning "Creating array temporary" }
 +  y = x
 +end program test 
+Index: gcc/testsuite/gfortran.dg/submodule_29.f08
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/submodule_29.f08	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/submodule_29.f08	(.../branches/gcc-7-branch)
+@@ -0,0 +1,56 @@
++! { dg-do run }
++!
++! Test the fix for PR80554 in which it was not recognised that the symbol 'i'
++! is host associated in the submodule 's' so that the new declaration in the
++! submodule was rejected.
++!
++! Contributed by Tamas Bela Feher  <tamas.bela.feher at ipp.mpg.de>
++!
++module M
++  implicit none
++  integer :: i = 0
++  character (100) :: buffer
++  interface
++    module subroutine write_i()
++    end subroutine
++  end interface
++  interface
++    module subroutine write_i_2()
++    end subroutine
++  end interface
++contains
++  subroutine foo
++    integer :: i
++  end
++end module
++
++submodule (M) S
++    integer :: i = 137
++  contains
++    module subroutine write_i()
++       write (buffer,*) i
++    end subroutine
++end submodule
++
++submodule (M:S) S2
++    integer :: i = 1037
++  contains
++    module subroutine write_i_2()
++       write (buffer,*) i
++    end subroutine
++end submodule
++
++program test_submod_variable
++  use M
++  implicit none
++  integer :: j
++  i = 42
++  call write_i
++  read (buffer, *) j
++  if (i .ne. 42) call abort
++  if (j .ne. 137) call abort
++  call write_i_2
++  read (buffer, *) j
++  if (i .ne. 42) call abort
++  if (j .ne. 1037) call abort
++end program
 Index: gcc/testsuite/gfortran.dg/associate_9.f03
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/associate_9.f03	(.../tags/gcc_7_2_0_release)
@@ -14555,6 +14678,30 @@ Index: gcc/testsuite/gcc.dg/ipa/ipcp-cstagg-7.c
  
 -/* { dg-final { scan-ipa-dump-times "Discovered an indirect call to a known target" 3 "cp" } } */
 +/* { dg-final { scan-ipa-dump-times "Discovered an indirect call to a known target" 3 "cp" { xfail { hppa*-*-* && { ! lp64 } } } } } */
+Index: gcc/testsuite/gcc.dg/vect/vect-align-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/vect-align-1.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/vect-align-1.c	(.../branches/gcc-7-branch)
+@@ -47,6 +47,6 @@
+   return 0;
+ }
+ 
+-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_hw_misalign } } } */
+-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { xfail vect_hw_misalign} } } */
++/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_hw_misalign && { arm_vect_no_misalign } } } } } */
++/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_hw_misalign && arm_vect_no_misalign } } } } */
+ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+Index: gcc/testsuite/gcc.dg/vect/vect-align-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/vect-align-2.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/vect-align-2.c	(.../branches/gcc-7-branch)
+@@ -43,5 +43,5 @@
+ 
+ 
+ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
+-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { xfail vect_hw_misalign} } } */
++/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_hw_misalign && arm_vect_no_misalign } } } } */
+ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 Index: gcc/testsuite/gcc.dg/vect/pr82108.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/vect/pr82108.c	(.../tags/gcc_7_2_0_release)
@@ -14607,6 +14754,17 @@ Index: gcc/testsuite/gcc.dg/vect/pr82108.c
 +}
 +
 +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+Index: gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c	(.../branches/gcc-7-branch)
+@@ -83,5 +83,5 @@
+ 
+ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+ /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
+-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
++/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_no_align && { { ! vect_hw_misalign } && vect_sizes_32B_16B } } }} } */
+ 
 Index: gcc/testsuite/gcc.dg/vect/pr82436.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.dg/vect/pr82436.c	(.../tags/gcc_7_2_0_release)
@@ -14672,7 +14830,42 @@ Index: gcc/testsuite/ChangeLog
 ===================================================================
 --- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,595 @@
+@@ -1,3 +1,630 @@
++2017-11-01  Tamar Christina  <tamar.christina at arm.com>
++
++	Backported from trunk
++	* gcc.dg/vect/vect-align-1.c: Fix vect_hw_misalign condition.
++	* gcc.dg/vect/vect-align-2.c: Likewise.
++	* gcc.dg/vect/vect-multitypes-1.c: Likewise
++
++2017-11-01  Tamar Christina  <tamar.christina at arm.com>
++
++	Backported from trunk
++	* gcc.dg/vect/vect-multitypes-1.c: Correct target selector.
++
++2017-11-01  Christophe Lyon  <christophe.lyon at linaro.org>
++
++	Backported from trunk
++	* lib/target-supports.exp (check_effective_target_vect_hw_misalign):
++	Fix arm check.
++
++2017-11-01  Paul Thomas  <pault at gcc.gnu.org>
++
++	Backported from trunk
++	PR fortran/80554
++	* gfortran.dg/submodule_29.f08: New test.
++
++2017-11-01  Martin Jambor  <mjambor at suse.cz>
++
++	PR c++/81702
++	* g++.dg/tree-ssa/pr81702.C: New test.
++
++2017-11-01  Paul Thomas  <pault at gcc.gnu.org>
++
++	Backported from trunk
++	PR fortran/80850
++	* gfortran.dg/class_64_f90 : New test.
++
 +2017-10-30  Paolo Carlini  <paolo.carlini at oracle.com>
 +
 +	PR c++/82085
@@ -15268,7 +15461,7 @@ Index: gcc/testsuite/ChangeLog
  2017-08-14  Release Manager
  
  	* GCC 7.2.0 released.
-@@ -150,7 +742,7 @@
+@@ -150,7 +777,7 @@
  	* gfortran.dg/pr81175.f: New testcase.
  
  	2017-06-21  Marc Glisse  <marc.glisse at inria.fr>
@@ -15277,7 +15470,7 @@ Index: gcc/testsuite/ChangeLog
   	* gcc.dg/tree-ssa/addadd.c: Un-XFAIL.
   	* gcc.dg/tree-ssa/addadd-2.c: New file.
  
-@@ -358,7 +950,7 @@
+@@ -358,7 +985,7 @@
  	* c-c++-common/ubsan/sanitize-recover-7.c (dg-options): Add -w.
  
  2017-06-24  Marek Polacek  <polacek at redhat.com>
@@ -15286,7 +15479,7 @@ Index: gcc/testsuite/ChangeLog
  	Backport from mainline
  	2017-05-04  Marek Polacek  <polacek at redhat.com>
  
-@@ -2273,7 +2865,7 @@
+@@ -2273,7 +2900,7 @@
  
  	PR fortran/80156
  	PR fortran/79382
@@ -15295,7 +15488,7 @@ Index: gcc/testsuite/ChangeLog
  	testcase for PR80156. Add a main programme that tests that
  	the typebound generic is accessible.
  
-@@ -2609,13 +3201,13 @@
+@@ -2609,13 +3236,13 @@
  2017-03-18  Paul Thomas  <pault at gcc.gnu.org>
  
  	PR fortran/79676
@@ -16203,6 +16396,121 @@ Index: gcc/testsuite/g++.dg/other/bitfield6.C
 +} d;
 +
 +char f = (903092 ? int(d.c) : 0) << a;
+Index: gcc/testsuite/g++.dg/tree-ssa/pr81702.C
+===================================================================
+--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr81702.C	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr81702.C	(.../branches/gcc-7-branch)
+@@ -0,0 +1,110 @@
++// { dg-do compile }
++// { dg-options "-O2" }
++
++namespace std {
++  struct type_info
++  {
++    virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
++       unsigned __outer) const;
++  };
++}
++
++template< typename VALUE_T, typename TYPE >
++struct List_policy
++{
++  typedef VALUE_T *Value_type;
++  typedef TYPE **Type;
++  typedef TYPE *Head_type;
++  typedef TYPE Item_type;
++};
++
++template< typename POLICY >
++class List
++{
++public:
++  typedef typename POLICY::Value_type Value_type;
++  class Iterator
++  {
++    typedef typename POLICY::Type Internal_type;
++  public:
++    typedef typename POLICY::Value_type value_type;
++    typedef typename POLICY::Value_type Value_type;
++    Value_type operator -> () const { return static_cast<Value_type>(*_c); }
++    Internal_type _c;
++  };
++  Iterator begin() { return Iterator(); }
++  Iterator end() { return Iterator(); }
++  typename POLICY::Head_type _f;
++};
++
++template<typename ELEM_TYPE> class H_list_item_t { };
++
++template< typename T, typename POLICY >
++class H_list : public List<POLICY>
++{
++public:
++  typedef typename POLICY::Item_type Item;
++  typedef List<POLICY> Base;
++  typedef typename Base::Iterator Iterator;
++  Iterator insert(T *e, Iterator const &pred)
++  {
++    Item **x = &this->_f;
++    *x = static_cast<Item*>(e);
++    return Iterator();
++  }
++};
++
++template< typename T >
++struct H_list_t : H_list<T, List_policy< T, H_list_item_t<T> > >
++{
++  H_list_t(bool b) : H_list<T, List_policy< T, H_list_item_t<T> > >(b) {}
++};
++
++template< typename BASE, typename MATCH_RESULT >
++struct Type_matcher : H_list_item_t<BASE>
++{
++  explicit Type_matcher(std::type_info const *type);
++  typedef MATCH_RESULT Match_result;
++
++private:
++  std::type_info *_type;
++  typedef H_list_t<BASE> List;
++  typedef typename List::Iterator Iterator;
++  static List _for_type;
++};
++
++template< typename BASE, typename MR >
++Type_matcher<BASE, MR>::Type_matcher(std::type_info const *t)
++{
++  Iterator c = _for_type.begin();
++  t->__do_catch(c->_type, 0, 0);
++  _for_type.insert(static_cast<BASE*>(this), _for_type.begin());
++}
++
++template< typename VI, typename HW >
++class Fa : public Type_matcher<Fa<VI, HW>, VI*>
++{
++public:
++  typedef Fa<VI, HW> Self;
++  virtual VI *do_match(HW *f) = 0;
++  explicit Fa(std::type_info const *type) : Type_matcher<Self, VI*>(type) {}
++};
++
++class Res {};
++typedef Fa<Res, Res> R_fac;
++
++template< typename VI, typename HW_BASE, typename HW, typename BASE >
++class Fa_t : public BASE
++{
++public:
++  Fa_t() : BASE(&typeid(HW)) {}
++  VI *do_match(HW_BASE *) { return 0; }
++};
++
++template< typename VI, typename HW >
++class Resource_factory_t : public Fa_t<VI, Res, HW, R_fac > {};
++
++class Foo {};
++class Foo2;
++class Foo3 : public Res {};
++Resource_factory_t<Foo3, Foo> _x;
 Index: gcc/testsuite/g++.dg/lto/pr70029_0.C
 ===================================================================
 --- a/src/gcc/testsuite/g++.dg/lto/pr70029_0.C	(.../tags/gcc_7_2_0_release)
@@ -18526,7 +18834,51 @@ Index: gcc/fortran/trans-expr.c
 ===================================================================
 --- a/src/gcc/fortran/trans-expr.c	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/fortran/trans-expr.c	(.../branches/gcc-7-branch)
-@@ -8051,7 +8051,7 @@
+@@ -5173,10 +5173,39 @@
+ 			}
+ 		      else
+ 			{
+-			  gfc_add_modify (&parmse.pre, var,
+-					  fold_build1_loc (input_location,
+-							   VIEW_CONVERT_EXPR,
+-							   type, parmse.expr));
++			  /* Since the internal representation of unlimited
++			     polymorphic expressions includes an extra field
++			     that other class objects do not, a cast to the
++			     formal type does not work.  */
++			  if (!UNLIMITED_POLY (e) && UNLIMITED_POLY (fsym))
++			    {
++			      tree efield;
++
++			      /* Set the _data field.  */
++			      tmp = gfc_class_data_get (var);
++			      efield = fold_convert (TREE_TYPE (tmp),
++					gfc_class_data_get (parmse.expr));
++			      gfc_add_modify (&parmse.pre, tmp, efield);
++
++			      /* Set the _vptr field.  */
++			      tmp = gfc_class_vptr_get (var);
++			      efield = fold_convert (TREE_TYPE (tmp),
++					gfc_class_vptr_get (parmse.expr));
++			      gfc_add_modify (&parmse.pre, tmp, efield);
++
++			      /* Set the _len field.  */
++			      tmp = gfc_class_len_get (var);
++			      gfc_add_modify (&parmse.pre, tmp,
++					      build_int_cst (TREE_TYPE (tmp), 0));
++			    }
++			  else
++			    {
++			      tmp = fold_build1_loc (input_location,
++						     VIEW_CONVERT_EXPR,
++						     type, parmse.expr);
++			      gfc_add_modify (&parmse.pre, var, tmp);
++					      ;
++			    }
+ 			  parmse.expr = gfc_build_addr_expr (NULL_TREE, var);
+ 			}
+ 		    }
+@@ -8051,7 +8080,7 @@
      {
        /* Get the vptr from the rhs expression only, when it is variable.
  	 Functions are expected to be assigned to a temporary beforehand.  */
@@ -18535,7 +18887,7 @@ Index: gcc/fortran/trans-expr.c
  	  ? gfc_find_and_cut_at_last_class_ref (re)
  	  : NULL;
        if (vptr_expr != NULL && vptr_expr->ts.type == BT_CLASS)
-@@ -8205,6 +8205,39 @@
+@@ -8205,6 +8234,39 @@
  }
  
  
@@ -18575,7 +18927,7 @@ Index: gcc/fortran/trans-expr.c
  tree
  gfc_trans_pointer_assign (gfc_code * code)
  {
-@@ -8223,6 +8256,7 @@
+@@ -8223,6 +8285,7 @@
    tree desc;
    tree tmp;
    tree decl;
@@ -18583,7 +18935,7 @@ Index: gcc/fortran/trans-expr.c
    bool scalar, non_proc_pointer_assign;
    gfc_ss *ss;
  
-@@ -8256,7 +8290,10 @@
+@@ -8256,7 +8319,10 @@
        gfc_conv_expr (&lse, expr1);
        gfc_init_se (&rse, NULL);
        rse.want_pointer = 1;
@@ -18595,7 +18947,7 @@ Index: gcc/fortran/trans-expr.c
  
        if (non_proc_pointer_assign && expr1->ts.type == BT_CLASS)
  	{
-@@ -8268,12 +8305,12 @@
+@@ -8268,12 +8334,12 @@
        if (expr1->symtree->n.sym->attr.proc_pointer
  	  && expr1->symtree->n.sym->attr.dummy)
  	lse.expr = build_fold_indirect_ref_loc (input_location,
@@ -18610,7 +18962,7 @@ Index: gcc/fortran/trans-expr.c
  
        gfc_add_block_to_block (&block, &lse.pre);
        gfc_add_block_to_block (&block, &rse.pre);
-@@ -8319,7 +8356,6 @@
+@@ -8319,7 +8385,6 @@
      {
        gfc_ref* remap;
        bool rank_remap;
@@ -18618,7 +18970,7 @@ Index: gcc/fortran/trans-expr.c
        tree strlen_lhs;
        tree strlen_rhs = NULL_TREE;
  
-@@ -8354,26 +8390,8 @@
+@@ -8354,26 +8419,8 @@
  	  rse.byref_noassign = 1;
  
  	  if (expr2->expr_type == EXPR_FUNCTION && expr2->ts.type == BT_CLASS)
@@ -18647,11 +18999,63 @@ Index: gcc/fortran/trans-expr.c
  	  else if (expr2->expr_type == EXPR_FUNCTION)
  	    {
  	      tree bound[GFC_MAX_DIMENSIONS];
+Index: gcc/fortran/decl.c
+===================================================================
+--- a/src/gcc/fortran/decl.c	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/fortran/decl.c	(.../branches/gcc-7-branch)
+@@ -1383,8 +1383,28 @@
+   symbol_attribute attr;
+   gfc_symbol *sym;
+   int upper;
++  gfc_symtree *st;
+ 
+-  if (gfc_get_symbol (name, NULL, &sym))
++  /* Symbols in a submodule are host associated from the parent module or
++     submodules. Therefore, they can be overridden by declarations in the
++     submodule scope. Deal with this by attaching the existing symbol to
++     a new symtree and recycling the old symtree with a new symbol...  */
++  st = gfc_find_symtree (gfc_current_ns->sym_root, name);
++  if (st != NULL && gfc_state_stack->state == COMP_SUBMODULE
++      && st->n.sym != NULL
++      && st->n.sym->attr.host_assoc && st->n.sym->attr.used_in_submodule)
++    {
++      gfc_symtree *s = gfc_get_unique_symtree (gfc_current_ns);
++      s->n.sym = st->n.sym;
++      sym = gfc_new_symbol (name, gfc_current_ns);
++
++
++      st->n.sym = sym;
++      sym->refs++;
++      gfc_set_sym_referenced (sym);
++    }
++  /* ...Otherwise generate a new symtree and new symbol.  */
++  else if (gfc_get_symbol (name, NULL, &sym))
+     return false;
+ 
+   /* Check if the name has already been defined as a type.  The
 Index: gcc/fortran/ChangeLog
 ===================================================================
 --- a/src/gcc/fortran/ChangeLog	(.../tags/gcc_7_2_0_release)
 +++ b/src/gcc/fortran/ChangeLog	(.../branches/gcc-7-branch)
-@@ -1,3 +1,96 @@
+@@ -1,3 +1,114 @@
++2017-11-01  Paul Thomas  <pault at gcc.gnu.org>
++
++	Backported from trunk
++	PR fortran/80554
++	* decl.c (build_sym): In a submodule allow overriding of host
++	associated symbols from the ancestor module with a new
++	declaration.
++
++2017-11-01  Paul Thomas  <pault at gcc.gnu.org>
++
++	Backport from trunk
++	PR fortran/80850
++	* trans_expr.c (gfc_conv_procedure_call): When passing a class
++	argument to an unlimited polymorphic dummy, it is wrong to cast
++	the passed expression as unlimited, unless it is unlimited. The
++	correct way is to assign to each of the fields and set the _len
++	field to zero.
++
 +2017-10-28  Andre Vehreschild  <vehre at gcc.gnu.org>
 +
 +	* check.c (gfc_check_co_reduce): Clarify error message.
@@ -19437,6 +19841,14 @@ Index: gcc/gimple-fold.c
  		*flexp = true;
  
  	      arg = TREE_OPERAND (arg, 1);
+@@ -6439,7 +6439,6 @@
+   gcc_assert (init);
+   if (init == error_mark_node)
+     {
+-      gcc_assert (in_lto_p);
+       /* Pass down that we lost track of the target.  */
+       if (can_refer)
+ 	*can_refer = false;
 Index: gcc/tree-ssa-pre.c
 ===================================================================
 --- a/src/gcc/tree-ssa-pre.c	(.../tags/gcc_7_2_0_release)
@@ -321931,6 +322343,19 @@ Index: gcc/config/t-netbsd
 +netbsd.o: $(srcdir)/config/netbsd.c
 +	$(COMPILE) $<
 +	$(POSTCOMPILE)
+Index: gcc/config/alpha/sync.md
+===================================================================
+--- a/src/gcc/config/alpha/sync.md	(.../tags/gcc_7_2_0_release)
++++ b/src/gcc/config/alpha/sync.md	(.../branches/gcc-7-branch)
+@@ -24,7 +24,7 @@
+   [(plus "add_operand") (minus "reg_or_8bit_operand")
+    (ior "or_operand") (xor "or_operand") (and "and_operand")])
+ (define_code_attr fetchop_constr
+-  [(plus "rKL") (minus "rI") (ior "rIN") (xor "rIN") (and "riNM")])
++  [(plus "rKL") (minus "rI") (ior "rIN") (xor "rIN") (and "rINM")])
+ 
+ 
+ (define_expand "memory_barrier"
 Index: gcc/config/sparc/sparc.md
 ===================================================================
 --- a/src/gcc/config/sparc/sparc.md	(.../tags/gcc_7_2_0_release)
@@ -324904,3 +325329,13 @@ Index: libgfortran/io/write.c
  		  /* Call the user defined formatted WRITE procedure.  */
  		  dtp->u.p.current_unit->child_dtio++;
  		  if (obj->type == BT_DERIVED)
+Index: .
+===================================================================
+--- a/src/.	(.../tags/gcc_7_2_0_release)
++++ b/src/.	(.../branches/gcc-7-branch)
+
+Property changes on: .
+___________________________________________________________________
+Modified: svn:mergeinfo
+## -0,0 +0,1 ##
+   Merged /trunk:r253187,253451,254099

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-7.git



More information about the Reproducible-commits mailing list