~ubuntu-branches/ubuntu/trusty/gcc-4.7/trusty

« back to all changes in this revision

Viewing changes to debian/patches/svn-updates.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-02-23 06:43:05 UTC
  • mfrom: (15.2.12 experimental)
  • Revision ID: package-import@ubuntu.com-20130223064305-5xm3hvqwoh3mxibb
Tags: 4.7.2-22ubuntu1
* Merge with Debian; remaining changes:
  - Build from upstream source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# DP: updates from the 4.7 branch upto 20130214 (r196053).
 
1
# DP: updates from the 4.7 branch upto 20130222 (r196236).
2
2
 
3
3
last_updated()
4
4
{
5
5
        cat > ${dir}LAST_UPDATED <<EOF
6
 
Thu Feb 14 17:28:28 CET 2013
7
 
Thu Feb 14 16:28:28 UTC 2013 (revision 196053)
 
6
Sat Feb 23 06:18:40 CET 2013
 
7
Sat Feb 23 05:18:40 UTC 2013 (revision 196236)
8
8
EOF
9
9
}
10
10
 
533
533
===================================================================
534
534
--- a/src/libgomp/ChangeLog     (.../tags/gcc_4_7_2_release)
535
535
+++ b/src/libgomp/ChangeLog     (.../branches/gcc-4_7-branch)
536
 
@@ -1,3 +1,19 @@
 
536
@@ -1,3 +1,27 @@
 
537
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
538
+
 
539
+       Backported from mainline
 
540
+       2013-02-06  Jakub Jelinek  <jakub@redhat.com>
 
541
+
 
542
+       PR middle-end/56217
 
543
+       * testsuite/libgomp.c++/pr56217.C: New test.
 
544
+
537
545
+2013-01-22  Alan Modra  <amodra@gmail.com>
538
546
+
539
547
+       PR libgomp/51376
553
561
 2012-09-20  Release Manager
554
562
 
555
563
        * GCC 4.7.2 released.
 
564
Index: libgomp/testsuite/libgomp.c++/pr56217.C
 
565
===================================================================
 
566
--- a/src/libgomp/testsuite/libgomp.c++/pr56217.C       (.../tags/gcc_4_7_2_release)
 
567
+++ b/src/libgomp/testsuite/libgomp.c++/pr56217.C       (.../branches/gcc-4_7-branch)
 
568
@@ -0,0 +1,36 @@
 
569
+// PR middle-end/56217
 
570
+// { dg-do run }
 
571
+// { dg-options "-std=c++0x" }
 
572
+
 
573
+extern "C" void abort ();
 
574
+
 
575
+template <typename T>
 
576
+struct ptr {
 
577
+  T *p;
 
578
+  ptr () : p () {}
 
579
+  ptr (ptr &) = delete;
 
580
+  ptr (ptr &&o) : p(o) {}
 
581
+  operator T * () { return p; }
 
582
+};
 
583
+
 
584
+int a[6] = { 100, 101, 102, 103, 104, 105 };
 
585
+
 
586
+static ptr<int>
 
587
+f ()
 
588
+{
 
589
+  ptr<int> pt;
 
590
+  #pragma omp task shared (pt)
 
591
+    pt.p = a + 2;
 
592
+  #pragma omp taskwait
 
593
+  return pt;
 
594
+}
 
595
+
 
596
+int
 
597
+main ()
 
598
+{
 
599
+  ptr<int> pt;
 
600
+  #pragma omp parallel
 
601
+  #pragma omp single
 
602
+  if (f () != a + 2 || *f () != 102)
 
603
+    abort ();
 
604
+}
556
605
Index: libquadmath/ChangeLog
557
606
===================================================================
558
607
--- a/src/libquadmath/ChangeLog (.../tags/gcc_4_7_2_release)
24008
24057
 glibcxx_prefixdir = @glibcxx_prefixdir@
24009
24058
 glibcxx_srcdir = @glibcxx_srcdir@
24010
24059
 glibcxx_toolexecdir = @glibcxx_toolexecdir@
 
24060
Index: libstdc++-v3/include/debug/unordered_map
 
24061
===================================================================
 
24062
--- a/src/libstdc++-v3/include/debug/unordered_map      (.../tags/gcc_4_7_2_release)
 
24063
+++ b/src/libstdc++-v3/include/debug/unordered_map      (.../branches/gcc-4_7-branch)
 
24064
@@ -1,6 +1,6 @@
 
24065
 // Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
 
24066
 
 
24067
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 
24068
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
 
24069
 // Free Software Foundation, Inc.
 
24070
 //
 
24071
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24072
@@ -97,14 +97,12 @@
 
24073
                __gnu_debug::__base(__last), __n,
 
24074
                __hf, __eql, __a) { }
 
24075
 
 
24076
-      unordered_map(const unordered_map& __x) 
 
24077
-      : _Base(__x) { }
 
24078
+      unordered_map(const unordered_map& __x) = default;
 
24079
 
 
24080
       unordered_map(const _Base& __x)
 
24081
       : _Base(__x) { }
 
24082
 
 
24083
-      unordered_map(unordered_map&& __x)
 
24084
-      : _Base(std::move(__x)) { }
 
24085
+      unordered_map(unordered_map&& __x) = default;
 
24086
 
 
24087
       unordered_map(initializer_list<value_type> __l,
 
24088
                    size_type __n = 0,
 
24089
@@ -511,14 +509,12 @@
 
24090
                __gnu_debug::__base(__last), __n,
 
24091
                __hf, __eql, __a) { }
 
24092
 
 
24093
-      unordered_multimap(const unordered_multimap& __x) 
 
24094
-      : _Base(__x) { }
 
24095
+      unordered_multimap(const unordered_multimap& __x) = default;
 
24096
 
 
24097
       unordered_multimap(const _Base& __x) 
 
24098
       : _Base(__x) { }
 
24099
 
 
24100
-      unordered_multimap(unordered_multimap&& __x)
 
24101
-      : _Base(std::move(__x)) { }
 
24102
+      unordered_multimap(unordered_multimap&& __x) = default;
 
24103
 
 
24104
       unordered_multimap(initializer_list<value_type> __l,
 
24105
                         size_type __n = 0,
 
24106
Index: libstdc++-v3/include/debug/unordered_set
 
24107
===================================================================
 
24108
--- a/src/libstdc++-v3/include/debug/unordered_set      (.../tags/gcc_4_7_2_release)
 
24109
+++ b/src/libstdc++-v3/include/debug/unordered_set      (.../branches/gcc-4_7-branch)
 
24110
@@ -1,6 +1,6 @@
 
24111
 // Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
 
24112
 
 
24113
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 
24114
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
 
24115
 // Free Software Foundation, Inc.
 
24116
 //
 
24117
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24118
@@ -97,14 +97,12 @@
 
24119
                __gnu_debug::__base(__last), __n,
 
24120
                __hf, __eql, __a) { }
 
24121
 
 
24122
-      unordered_set(const unordered_set& __x) 
 
24123
-      : _Base(__x) { }
 
24124
+      unordered_set(const unordered_set& __x) = default;
 
24125
 
 
24126
       unordered_set(const _Base& __x) 
 
24127
       : _Base(__x) { }
 
24128
 
 
24129
-      unordered_set(unordered_set&& __x)
 
24130
-      : _Base(std::move(__x)) { }
 
24131
+      unordered_set(unordered_set&& __x) = default;
 
24132
 
 
24133
       unordered_set(initializer_list<value_type> __l,
 
24134
                    size_type __n = 0,
 
24135
@@ -506,14 +504,12 @@
 
24136
                __gnu_debug::__base(__last), __n,
 
24137
                __hf, __eql, __a) { }
 
24138
 
 
24139
-      unordered_multiset(const unordered_multiset& __x) 
 
24140
-      : _Base(__x) { }
 
24141
+      unordered_multiset(const unordered_multiset& __x) = default;
 
24142
 
 
24143
       unordered_multiset(const _Base& __x) 
 
24144
       : _Base(__x) { }
 
24145
 
 
24146
-      unordered_multiset(unordered_multiset&& __x)
 
24147
-      : _Base(std::move(__x)) { }
 
24148
+      unordered_multiset(unordered_multiset&& __x) = default;
 
24149
 
 
24150
       unordered_multiset(initializer_list<value_type> __l,
 
24151
                         size_type __n = 0,
24011
24152
Index: libstdc++-v3/include/std/future
24012
24153
===================================================================
24013
24154
--- a/src/libstdc++-v3/include/std/future       (.../tags/gcc_4_7_2_release)
24022
24163
   template<typename _Signature>
24023
24164
     class packaged_task;
24024
24165
 
 
24166
Index: libstdc++-v3/include/std/unordered_map
 
24167
===================================================================
 
24168
--- a/src/libstdc++-v3/include/std/unordered_map        (.../tags/gcc_4_7_2_release)
 
24169
+++ b/src/libstdc++-v3/include/std/unordered_map        (.../branches/gcc-4_7-branch)
 
24170
@@ -1,6 +1,6 @@
 
24171
 // <unordered_map> -*- C++ -*-
 
24172
 
 
24173
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
24174
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
 
24175
 //
 
24176
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24177
 // software; you can redistribute it and/or modify it under the
 
24178
@@ -40,6 +40,7 @@
 
24179
 #include <initializer_list>
 
24180
 #include <bits/stl_algobase.h>
 
24181
 #include <bits/allocator.h>
 
24182
+#include <bits/alloc_traits.h>
 
24183
 #include <bits/stl_function.h> // equal_to, _Identity, _Select1st
 
24184
 #include <bits/functional_hash.h>
 
24185
 #include <bits/hashtable.h>
 
24186
Index: libstdc++-v3/include/std/streambuf
 
24187
===================================================================
 
24188
--- a/src/libstdc++-v3/include/std/streambuf    (.../tags/gcc_4_7_2_release)
 
24189
+++ b/src/libstdc++-v3/include/std/streambuf    (.../branches/gcc-4_7-branch)
 
24190
@@ -1,7 +1,7 @@
 
24191
 // Stream buffer classes -*- C++ -*-
 
24192
 
 
24193
 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 
24194
-// 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
24195
+// 2006, 2007, 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
 
24196
 //
 
24197
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24198
 // software; you can redistribute it and/or modify it under the
 
24199
@@ -171,20 +171,19 @@
 
24200
                basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
 
24201
 
 
24202
     protected:
 
24203
-      //@{
 
24204
-      /**
 
24205
+      /*
 
24206
        *  This is based on _IO_FILE, just reordered to be more consistent,
 
24207
        *  and is intended to be the most minimal abstraction for an
 
24208
        *  internal buffer.
 
24209
        *  -  get == input == read
 
24210
        *  -  put == output == write
 
24211
       */
 
24212
-      char_type*               _M_in_beg;     // Start of get area. 
 
24213
-      char_type*               _M_in_cur;     // Current read area. 
 
24214
-      char_type*               _M_in_end;     // End of get area. 
 
24215
-      char_type*               _M_out_beg;    // Start of put area. 
 
24216
-      char_type*               _M_out_cur;    // Current put area. 
 
24217
-      char_type*               _M_out_end;    // End of put area.
 
24218
+      char_type*               _M_in_beg;     ///< Start of get area.
 
24219
+      char_type*               _M_in_cur;     ///< Current read area.
 
24220
+      char_type*               _M_in_end;     ///< End of get area.
 
24221
+      char_type*               _M_out_beg;    ///< Start of put area.
 
24222
+      char_type*               _M_out_cur;    ///< Current put area.
 
24223
+      char_type*               _M_out_end;    ///< End of put area.
 
24224
 
 
24225
       /// Current locale setting.
 
24226
       locale                   _M_buf_locale;  
24025
24227
Index: libstdc++-v3/include/std/condition_variable
24026
24228
===================================================================
24027
24229
--- a/src/libstdc++-v3/include/std/condition_variable   (.../tags/gcc_4_7_2_release)
24046
24248
 
24047
24249
 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
24048
24250
-// 2011 Free Software Foundation, Inc.
24049
 
+// 2011, 2012 Free Software Foundation, Inc.
 
24251
+// 2011, 2012, 2013 Free Software Foundation, Inc.
24050
24252
 //
24051
24253
 // This file is part of the GNU ISO C++ Library.  This library is free
24052
24254
 // software; you can redistribute it and/or modify it under the
 
24255
@@ -245,7 +245,7 @@
 
24256
            >::type
 
24257
     __invoke(_Functor& __f, _Args&&... __args)
 
24258
     {
 
24259
-      return mem_fn(__f)(std::forward<_Args>(__args)...);
 
24260
+      return std::mem_fn(__f)(std::forward<_Args>(__args)...);
 
24261
     }
 
24262
 
 
24263
   // To pick up function references (that will become function pointers)
 
24264
@@ -1709,12 +1709,12 @@
 
24265
   template<typename _Member, typename _Class>
 
24266
     inline _Mem_fn<_Member _Class::*>
 
24267
     __callable_functor(_Member _Class::* &__p)
 
24268
-    { return mem_fn(__p); }
 
24269
+    { return std::mem_fn(__p); }
 
24270
 
 
24271
   template<typename _Member, typename _Class>
 
24272
     inline _Mem_fn<_Member _Class::*>
 
24273
     __callable_functor(_Member _Class::* const &__p)
 
24274
-    { return mem_fn(__p); }
 
24275
+    { return std::mem_fn(__p); }
 
24276
 
 
24277
   template<typename _Signature>
 
24278
     class function;
24053
24279
@@ -1872,8 +1872,7 @@
24054
24280
        static void
24055
24281
        _M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
24060
24286
        }
24061
24287
       };
24062
24288
 
 
24289
@@ -1970,7 +1969,7 @@
 
24290
       static _Res
 
24291
       _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
 
24292
       {
 
24293
-       return mem_fn(_Base::_M_get_pointer(__functor)->__value)(
 
24294
+       return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
 
24295
            std::forward<_ArgTypes>(__args)...);
 
24296
       }
 
24297
     };
 
24298
@@ -2010,7 +2009,7 @@
 
24299
       static void
 
24300
       _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
 
24301
       {
 
24302
-       mem_fn(_Base::_M_get_pointer(__functor)->__value)(
 
24303
+       std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
 
24304
            std::forward<_ArgTypes>(__args)...);
 
24305
       }
 
24306
     };
24063
24307
@@ -2295,9 +2294,9 @@
24064
24308
 
24065
24309
        if (_My_handler::_M_not_empty_function(__f))
24071
24315
          }
24072
24316
       }
24073
24317
 
 
24318
Index: libstdc++-v3/include/std/unordered_set
 
24319
===================================================================
 
24320
--- a/src/libstdc++-v3/include/std/unordered_set        (.../tags/gcc_4_7_2_release)
 
24321
+++ b/src/libstdc++-v3/include/std/unordered_set        (.../branches/gcc-4_7-branch)
 
24322
@@ -1,6 +1,6 @@
 
24323
 // <unordered_set> -*- C++ -*-
 
24324
 
 
24325
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
24326
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
 
24327
 //
 
24328
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24329
 // software; you can redistribute it and/or modify it under the
 
24330
@@ -40,6 +40,7 @@
 
24331
 #include <initializer_list>
 
24332
 #include <bits/stl_algobase.h>
 
24333
 #include <bits/allocator.h>
 
24334
+#include <bits/alloc_traits.h>
 
24335
 #include <bits/stl_function.h> // equal_to, _Identity, _Select1st
 
24336
 #include <bits/functional_hash.h>
 
24337
 #include <bits/hashtable.h>
24074
24338
Index: libstdc++-v3/include/std/complex
24075
24339
===================================================================
24076
24340
--- a/src/libstdc++-v3/include/std/complex      (.../tags/gcc_4_7_2_release)
24182
24446
===================================================================
24183
24447
--- a/src/libstdc++-v3/include/bits/hashtable.h (.../tags/gcc_4_7_2_release)
24184
24448
+++ b/src/libstdc++-v3/include/bits/hashtable.h (.../branches/gcc-4_7-branch)
24185
 
@@ -1,7 +1,6 @@
 
24449
@@ -1,6 +1,6 @@
24186
24450
 // hashtable.h header -*- C++ -*-
24187
24451
 
24188
24452
-// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
24189
 
-// Free Software Foundation, Inc.
24190
 
+// Copyright (C) 2007-2012 Free Software Foundation, Inc.
 
24453
+// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013
 
24454
 // Free Software Foundation, Inc.
24191
24455
 //
24192
24456
 // This file is part of the GNU ISO C++ Library.  This library is free
24193
 
 // software; you can redistribute it and/or modify it under the
24194
 
@@ -1597,6 +1596,9 @@
 
24457
@@ -99,43 +99,44 @@
 
24458
    * - size_type       _M_bucket_count
 
24459
    * - size_type       _M_element_count
 
24460
    *
 
24461
-   * with _Bucket being _Hash_node* and _Hash_node constaining:
 
24462
+   * with _Bucket being _Hash_node* and _Hash_node containing:
 
24463
    * - _Hash_node*   _M_next
 
24464
    * - Tp            _M_value
 
24465
-   * - size_t        _M_code if cache_hash_code is true
 
24466
+   * - size_t        _M_hash_code if cache_hash_code is true
 
24467
    *
 
24468
-   * In terms of Standard containers the hastable is like the aggregation of:
 
24469
+   * In terms of Standard containers the hashtable is like the aggregation of:
 
24470
    * - std::forward_list<_Node> containing the elements
 
24471
    * - std::vector<std::forward_list<_Node>::iterator> representing the buckets
 
24472
    *
 
24473
-   * The non-empty buckets contain the node before the first bucket node. This
 
24474
-   * design allow to implement something like a std::forward_list::insert_after
 
24475
-   * on container insertion and std::forward_list::erase_after on container
 
24476
-   * erase calls. _M_before_begin is equivalent to
 
24477
-   * std::foward_list::before_begin. Empty buckets are containing nullptr.
 
24478
-   * Note that one of the non-empty bucket contains &_M_before_begin which is
 
24479
-   * not a derefenrenceable node so the node pointers in buckets shall never be
 
24480
-   * derefenrenced, only its next node can be.
 
24481
+   * The non-empty buckets contain the node before the first node in the
 
24482
+   * bucket. This design makes it possible to implement something like a
 
24483
+   * std::forward_list::insert_after on container insertion and
 
24484
+   * std::forward_list::erase_after on container erase calls.
 
24485
+   * _M_before_begin is equivalent to std::foward_list::before_begin.
 
24486
+   * Empty buckets contain nullptr.
 
24487
+   * Note that one of the non-empty buckets contains &_M_before_begin which is
 
24488
+   * not a dereferenceable node so the node pointer in a bucket shall never be
 
24489
+   * dereferenced, only its next node can be.
 
24490
    * 
 
24491
-   * Walk through a bucket nodes require a check on the hash code to see if the
 
24492
-   * node is still in the bucket. Such a design impose a quite efficient hash
 
24493
-   * functor and is one of the reasons it is highly advise to set
 
24494
-   * __cache_hash_code to true.
 
24495
+   * Walking through a bucket's nodes requires a check on the hash code to see
 
24496
+   * if each node is still in the bucket. Such a design assumes a quite
 
24497
+   * efficient hash functor and is one of the reasons it is
 
24498
+   * highly advisable to set __cache_hash_code to true.
 
24499
    *
 
24500
    * The container iterators are simply built from nodes. This way incrementing
 
24501
    * the iterator is perfectly efficient independent of how many empty buckets
 
24502
    * there are in the container.
 
24503
    *
 
24504
-   * On insert we compute element hash code and thanks to it find the bucket
 
24505
-   * index. If the element must be inserted on an empty bucket we add it at the
 
24506
-   * beginning of the singly linked list and make the bucket point to
 
24507
+   * On insert we compute the element's hash code and use it to it find the
 
24508
+   * bucket index. If the element must be inserted in an empty bucket we add
 
24509
+   * it at the beginning of the singly linked list and make the bucket point to
 
24510
    * _M_before_begin. The bucket that used to point to _M_before_begin, if any,
 
24511
    * is updated to point to its new before begin node.
 
24512
    *
 
24513
-   * On erase, the simple iterator design impose to use the hash functor to get
 
24514
-   * the index of the bucket to update. For this reason, when __cache_hash_code
 
24515
-   * is set to false, there is a static assertion that the hash functor cannot
 
24516
-   * throw.
 
24517
+   * On erase, the simple iterator design requires using the hash functor to
 
24518
+   * get the index of the bucket to update. For this reason, when
 
24519
+   * __cache_hash_code is set to false, the hash functor must not throw
 
24520
+   * and this is enforced by a statied assertion.
 
24521
    */
 
24522
 
 
24523
   template<typename _Key, typename _Value, typename _Allocator,
 
24524
@@ -982,7 +983,7 @@
 
24525
          else if (__result)
 
24526
            // All equivalent values are next to each other, if we found a not
 
24527
            // equivalent value after an equivalent one it means that we won't
 
24528
-           // find anymore an equivalent value.
 
24529
+           // find any more equivalent values.
 
24530
            break;
 
24531
          if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n)
 
24532
            break;
 
24533
@@ -1104,7 +1105,7 @@
 
24534
       else
 
24535
        {
 
24536
          // The bucket is empty, the new node is inserted at the beginning of
 
24537
-         // the singly linked list and the bucket will contain _M_before_begin
 
24538
+         // the singly-linked list and the bucket will contain _M_before_begin
 
24539
          // pointer.
 
24540
          __new_node->_M_nxt = _M_before_begin._M_nxt;
 
24541
          _M_before_begin._M_nxt = __new_node;
 
24542
@@ -1252,7 +1253,7 @@
 
24543
            else
 
24544
              // The inserted node has no equivalent in the hashtable. We must
 
24545
              // insert the new node at the beginning of the bucket to preserve
 
24546
-             // equivalent elements relative positions.
 
24547
+             // equivalent elements' relative positions.
 
24548
              _M_insert_bucket_begin(__bkt, __new_node);
 
24549
            ++_M_element_count;
 
24550
            return iterator(__new_node);
 
24551
@@ -1434,7 +1435,7 @@
 
24552
       std::size_t __bkt = _M_bucket_index(__n);
 
24553
 
 
24554
       // Look for previous node to unlink it from the erased one, this is why
 
24555
-      // we need buckets to contain the before begin to make this research fast.
 
24556
+      // we need buckets to contain the before begin to make this search fast.
 
24557
       _BaseNode* __prev_n = _M_get_previous_node(__bkt, __n);
 
24558
       if (__n == _M_bucket_begin(__bkt))
 
24559
        _M_remove_bucket_begin(__bkt, __n->_M_next(),
 
24560
@@ -1597,6 +1598,9 @@
24195
24561
          // level.
24196
24562
          _M_rehash_policy._M_prev_resize = 0;
24197
24563
        }
24201
24567
     }
24202
24568
 
24203
24569
   template<typename _Key, typename _Value,
24204
 
@@ -1634,7 +1636,7 @@
 
24570
@@ -1634,7 +1638,7 @@
24205
24571
       _Bucket* __new_buckets = _M_allocate_buckets(__n);
24206
24572
       _Node* __p = _M_begin();
24207
24573
       _M_before_begin._M_nxt = nullptr;
24210
24576
       while (__p)
24211
24577
        {
24212
24578
          _Node* __next = __p->_M_next();
24213
 
@@ -1675,8 +1677,8 @@
 
24579
@@ -1675,8 +1679,8 @@
24214
24580
 
24215
24581
       _Node* __p = _M_begin();
24216
24582
       _M_before_begin._M_nxt = nullptr;
24221
24587
       _Node* __prev_p = nullptr;
24222
24588
       bool __check_bucket = false;
24223
24589
 
24224
 
@@ -1704,8 +1706,8 @@
 
24590
@@ -1704,8 +1708,8 @@
24225
24591
            {
24226
24592
              if (__check_bucket)
24227
24593
                {
24232
24598
                  if (__prev_p->_M_nxt)
24233
24599
                    {
24234
24600
                      std::size_t __next_bkt
 
24601
Index: libstdc++-v3/include/bits/hashtable_policy.h
 
24602
===================================================================
 
24603
--- a/src/libstdc++-v3/include/bits/hashtable_policy.h  (.../tags/gcc_4_7_2_release)
 
24604
+++ b/src/libstdc++-v3/include/bits/hashtable_policy.h  (.../branches/gcc-4_7-branch)
 
24605
@@ -59,8 +59,7 @@
 
24606
       return __distance_fw(__first, __last, _Tag());
 
24607
     }
 
24608
 
 
24609
-  // Helper type used to detect when the hash functor is noexcept qualified or
 
24610
-  // not
 
24611
+  // Helper type used to detect whether the hash functor is noexcept.
 
24612
   template <typename _Key, typename _Hash>
 
24613
     struct __is_noexcept_hash : std::integral_constant<bool,
 
24614
        noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
24235
24615
Index: libstdc++-v3/include/bits/atomic_base.h
24236
24616
===================================================================
24237
24617
--- a/src/libstdc++-v3/include/bits/atomic_base.h       (.../tags/gcc_4_7_2_release)
24245
24625
 
24246
24626
   /// kill_dependency
24247
24627
   template<typename _Tp>
 
24628
Index: libstdc++-v3/include/bits/unordered_map.h
 
24629
===================================================================
 
24630
--- a/src/libstdc++-v3/include/bits/unordered_map.h     (.../tags/gcc_4_7_2_release)
 
24631
+++ b/src/libstdc++-v3/include/bits/unordered_map.h     (.../branches/gcc-4_7-branch)
 
24632
@@ -1,6 +1,6 @@
 
24633
 // unordered_map implementation -*- C++ -*-
 
24634
 
 
24635
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 
24636
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 
24637
 //
 
24638
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24639
 // software; you can redistribute it and/or modify it under the
 
24640
@@ -50,7 +50,8 @@
 
24641
                        _Hash, __detail::_Mod_range_hashing,
 
24642
                        __detail::_Default_ranged_hash,
 
24643
                        __detail::_Prime_rehash_policy,
 
24644
-                       __cache_hash_code, false, true>
 
24645
+                       __cache_hash_code, false, true>,
 
24646
+      __check_copy_constructible<_Alloc>
 
24647
     {
 
24648
       typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
 
24649
                         std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
 
24650
@@ -123,7 +124,8 @@
 
24651
                        _Hash, __detail::_Mod_range_hashing,
 
24652
                        __detail::_Default_ranged_hash,
 
24653
                        __detail::_Prime_rehash_policy,
 
24654
-                       __cache_hash_code, false, false>
 
24655
+                       __cache_hash_code, false, false>,
 
24656
+      __check_copy_constructible<_Alloc>
 
24657
     {
 
24658
       typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
 
24659
                         _Alloc,
 
24660
Index: libstdc++-v3/include/bits/unordered_set.h
 
24661
===================================================================
 
24662
--- a/src/libstdc++-v3/include/bits/unordered_set.h     (.../tags/gcc_4_7_2_release)
 
24663
+++ b/src/libstdc++-v3/include/bits/unordered_set.h     (.../branches/gcc-4_7-branch)
 
24664
@@ -1,6 +1,6 @@
 
24665
 // unordered_set implementation -*- C++ -*-
 
24666
 
 
24667
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 
24668
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 
24669
 //
 
24670
 // This file is part of the GNU ISO C++ Library.  This library is free
 
24671
 // software; you can redistribute it and/or modify it under the
 
24672
@@ -50,7 +50,8 @@
 
24673
                        _Hash, __detail::_Mod_range_hashing,
 
24674
                        __detail::_Default_ranged_hash,
 
24675
                        __detail::_Prime_rehash_policy,
 
24676
-                       __cache_hash_code, true, true>
 
24677
+                       __cache_hash_code, true, true>,
 
24678
+      __check_copy_constructible<_Alloc>
 
24679
     {
 
24680
       typedef _Hashtable<_Value, _Value, _Alloc,
 
24681
                         std::_Identity<_Value>, _Pred,
 
24682
@@ -134,7 +135,8 @@
 
24683
                        _Hash, __detail::_Mod_range_hashing,
 
24684
                        __detail::_Default_ranged_hash,
 
24685
                        __detail::_Prime_rehash_policy,
 
24686
-                       __cache_hash_code, true, false>
 
24687
+                       __cache_hash_code, true, false>,
 
24688
+      __check_copy_constructible<_Alloc>
 
24689
     {
 
24690
       typedef _Hashtable<_Value, _Value, _Alloc,
 
24691
                         std::_Identity<_Value>, _Pred,
24248
24692
Index: libstdc++-v3/include/bits/shared_ptr_base.h
24249
24693
===================================================================
24250
24694
--- a/src/libstdc++-v3/include/bits/shared_ptr_base.h   (.../tags/gcc_4_7_2_release)
24965
25409
     * @brief Return true if two piecewise linear distributions have
24966
25410
     *        different parameters.
24967
25411
    */
 
25412
Index: libstdc++-v3/include/bits/alloc_traits.h
 
25413
===================================================================
 
25414
--- a/src/libstdc++-v3/include/bits/alloc_traits.h      (.../tags/gcc_4_7_2_release)
 
25415
+++ b/src/libstdc++-v3/include/bits/alloc_traits.h      (.../branches/gcc-4_7-branch)
 
25416
@@ -1,6 +1,6 @@
 
25417
 // Allocator traits -*- C++ -*-
 
25418
 
 
25419
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
25420
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
25421
 //
 
25422
 // This file is part of the GNU ISO C++ Library.  This library is free
 
25423
 // software; you can redistribute it and/or modify it under the
 
25424
@@ -39,6 +39,9 @@
 
25425
 {
 
25426
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
25427
 
 
25428
+  template<typename _Tp>
 
25429
+    class allocator;
 
25430
+
 
25431
   template<typename _Alloc, typename _Tp>
 
25432
     class __alloctr_rebind_helper
 
25433
     {
 
25434
@@ -254,7 +257,8 @@
 
25435
 
 
25436
       template<typename _Tp, typename... _Args>
 
25437
        static typename
 
25438
-               enable_if<!__construct_helper<_Tp, _Args...>::value, void>::type
 
25439
+       enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>,
 
25440
+                        is_constructible<_Tp, _Args...>>::value, void>::type
 
25441
                _S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
 
25442
        { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
 
25443
 
 
25444
@@ -386,7 +390,8 @@
 
25445
        *  arguments @a __args...
 
25446
       */
 
25447
       template<typename _Tp, typename... _Args>
 
25448
-       static void construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
 
25449
+       static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
 
25450
+       -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
 
25451
        { _S_construct(__a, __p, std::forward<_Args>(__args)...); }
 
25452
 
 
25453
       /**
 
25454
@@ -506,6 +511,56 @@
 
25455
       __do_alloc_on_swap(__one, __two, __pocs());
 
25456
     }
 
25457
 
 
25458
+  template<typename _Alloc>
 
25459
+    class __is_copy_insertable_impl
 
25460
+    {
 
25461
+      typedef allocator_traits<_Alloc> _Traits;
 
25462
+
 
25463
+      template<typename _Up, typename
 
25464
+              = decltype(_Traits::construct(std::declval<_Alloc&>(),
 
25465
+                                            std::declval<_Up*>(),
 
25466
+                                            std::declval<const _Up&>()))>
 
25467
+       static true_type
 
25468
+       _M_select(int);
 
25469
+
 
25470
+      template<typename _Up>
 
25471
+       static false_type
 
25472
+       _M_select(...);
 
25473
+
 
25474
+    public:
 
25475
+      typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
 
25476
+    };
 
25477
+
 
25478
+  // true if _Alloc::value_type is CopyInsertable into containers using _Alloc
 
25479
+  template<typename _Alloc>
 
25480
+    struct __is_copy_insertable
 
25481
+    : __is_copy_insertable_impl<_Alloc>::type
 
25482
+    { };
 
25483
+
 
25484
+  // std::allocator<_Tp> just requires CopyConstructible
 
25485
+  template<typename _Tp>
 
25486
+    struct __is_copy_insertable<allocator<_Tp>>
 
25487
+    : is_copy_constructible<_Tp>
 
25488
+    { };
 
25489
+
 
25490
+  // Used to allow copy construction of unordered containers
 
25491
+  template<bool> struct __allow_copy_cons { };
 
25492
+
 
25493
+  // Used to delete copy constructor of unordered containers
 
25494
+  template<>
 
25495
+    struct __allow_copy_cons<false>
 
25496
+    {
 
25497
+      __allow_copy_cons() = default;
 
25498
+      __allow_copy_cons(const __allow_copy_cons&) = delete;
 
25499
+      __allow_copy_cons(__allow_copy_cons&&) = default;
 
25500
+      __allow_copy_cons& operator=(const __allow_copy_cons&) = default;
 
25501
+      __allow_copy_cons& operator=(__allow_copy_cons&&) = default;
 
25502
+    };
 
25503
+
 
25504
+  template<typename _Alloc>
 
25505
+    using __check_copy_constructible
 
25506
+      = __allow_copy_cons<__is_copy_insertable<_Alloc>::value>;
 
25507
+
 
25508
 _GLIBCXX_END_NAMESPACE_VERSION
 
25509
 } // namespace std
 
25510
 
24968
25511
Index: libstdc++-v3/include/tr1/functional
24969
25512
===================================================================
24970
25513
--- a/src/libstdc++-v3/include/tr1/functional   (.../tags/gcc_4_7_2_release)
25000
25543
===================================================================
25001
25544
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_7_2_release)
25002
25545
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_7-branch)
25003
 
@@ -1,3 +1,263 @@
 
25546
@@ -1,3 +1,301 @@
 
25547
+2013-02-20  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
25548
+
 
25549
+       * include/std/streambuf (basic_streambuf): Fix unclosed Doxygen group.
 
25550
+
 
25551
+2013-02-20  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
25552
+
 
25553
+       PR libstdc++/55043
 
25554
+       * include/bits/alloc_traits.h (allocator_traits::construct): Disable
 
25555
+       unless construction would be well-formed.
 
25556
+       (__allow_copy_cons, __check_copy_constructible): Define.
 
25557
+       * include/bits/unordered_map.h (__check_copy_constructible): Use as
 
25558
+       base class so copy constructor will be deleted if appropriate.
 
25559
+       * include/bits/unordered_set.h: Likewise.
 
25560
+       * include/std/unordered_set: Include alloc_traits.h.
 
25561
+       * include/std/unordered_set: Likewise.
 
25562
+       * include/debug/unordered_map.h: Default copy and move constructors.
 
25563
+       * include/debug/unordered_set.h: Likewise.
 
25564
+       * testsuite/23_containers/unordered_map/55043.cc: Fix test.
 
25565
+       * testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
 
25566
+       * testsuite/23_containers/unordered_multiset/55043.cc: Likewise.
 
25567
+       * testsuite/23_containers/unordered_set/55043.cc: Likewise.
 
25568
+       * testsuite/23_containers/unordered_map/requirements/53339.cc: XFAIL,
 
25569
+       cannot support incomplete types.
 
25570
+       * testsuite/23_containers/unordered_multimap/requirements/53339.cc:
 
25571
+       Likewise.
 
25572
+       * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
 
25573
+       dg-error line number.
 
25574
+
 
25575
+2013-02-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
25576
+
 
25577
+       * include/std/functional (mem_fn): Qualify to prevent ADL.
 
25578
+       * testsuite/20_util/function_objects/mem_fn/adl.cc: New.
 
25579
+
 
25580
+2013-02-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
25581
+
 
25582
+       * include/bits/hashtable.h: Improve comments.
 
25583
+       * include/bits/hashtable_policy.h: Likewise.
 
25584
+
25004
25585
+2013-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
25005
25586
+
25006
25587
+       PR libstdc++/56085
26926
27507
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26927
27508
 // GNU General Public License for more details.
26928
27509
 
26929
 
Index: libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc
26930
 
===================================================================
26931
 
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc    (.../tags/gcc_4_7_2_release)
26932
 
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc    (.../branches/gcc-4_7-branch)
26933
 
@@ -10,7 +10,7 @@
26934
 
 // any later version.
26935
 
 
26936
 
 // This library is distributed in the hope that it will be useful,
26937
 
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
26938
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
26939
 
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26940
 
 // GNU General Public License for more details.
26941
 
 
26942
27510
Index: libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc
26943
27511
===================================================================
26944
27512
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53067.cc      (.../tags/gcc_4_7_2_release)
26965
27533
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26966
27534
 // GNU General Public License for more details.
26967
27535
 
 
27536
Index: libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc
 
27537
===================================================================
 
27538
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc      (.../tags/gcc_4_7_2_release)
 
27539
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/53339.cc      (.../branches/gcc-4_7-branch)
 
27540
@@ -0,0 +1,36 @@
 
27541
+// XFAIL because of PR libstdc++/55043 fix
 
27542
+// { dg-do compile { xfail *-*-* } }
 
27543
+// { dg-excess-errors "" }
 
27544
+// { dg-options "-std=gnu++11" }
 
27545
+
 
27546
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
27547
+//
 
27548
+// This file is part of the GNU ISO C++ Library.  This library is free
 
27549
+// software; you can redistribute it and/or modify it under the
 
27550
+// terms of the GNU General Public License as published by the
 
27551
+// Free Software Foundation; either version 3, or (at your option)
 
27552
+// any later version.
 
27553
+
 
27554
+// This library is distributed in the hope that it will be useful,
 
27555
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
27556
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
27557
+// GNU General Public License for more details.
 
27558
+
 
27559
+// You should have received a copy of the GNU General Public License along
 
27560
+// with this library; see the file COPYING3.  If not see
 
27561
+// <http://www.gnu.org/licenses/>.
 
27562
+
 
27563
+#include <unordered_map>
 
27564
+
 
27565
+struct LinkedHashMap
 
27566
+{
 
27567
+  struct Entry;
 
27568
+
 
27569
+  typedef std::unordered_map<int, Entry> Storage;
 
27570
+  typedef Storage::iterator EntryPtr;
 
27571
+
 
27572
+  struct Entry
 
27573
+  {
 
27574
+    EntryPtr prev, next;
 
27575
+  };
 
27576
+};
26968
27577
Index: libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc
26969
27578
===================================================================
26970
27579
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc       (.../tags/gcc_4_7_2_release)
26978
27587
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26979
27588
 // GNU General Public License for more details.
26980
27589
 
 
27590
Index: libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc
 
27591
===================================================================
 
27592
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc    (.../tags/gcc_4_7_2_release)
 
27593
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_map/range_access.cc    (.../branches/gcc-4_7-branch)
 
27594
@@ -10,7 +10,7 @@
 
27595
 // any later version.
 
27596
 
 
27597
 // This library is distributed in the hope that it will be useful,
 
27598
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
 
27599
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
27600
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
27601
 // GNU General Public License for more details.
 
27602
 
 
27603
Index: libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc
 
27604
===================================================================
 
27605
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc   (.../tags/gcc_4_7_2_release)
 
27606
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc   (.../branches/gcc-4_7-branch)
 
27607
@@ -0,0 +1,69 @@
 
27608
+// { dg-options "-std=gnu++0x" }
 
27609
+// { dg-do compile }
 
27610
+
 
27611
+// Copyright (C) 2013 Free Software Foundation, Inc.
 
27612
+//
 
27613
+// This file is part of the GNU ISO C++ Library.  This library is free
 
27614
+// software; you can redistribute it and/or modify it under the
 
27615
+// terms of the GNU General Public License as published by the
 
27616
+// Free Software Foundation; either version 3, or (at your option)
 
27617
+// any later version.
 
27618
+
 
27619
+// This library is distributed in the hope that it will be useful,
 
27620
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
27621
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
27622
+// GNU General Public License for more details.
 
27623
+
 
27624
+// You should have received a copy of the GNU General Public License along
 
27625
+// with this library; see the file COPYING3.  If not see
 
27626
+// <http://www.gnu.org/licenses/>.
 
27627
+
 
27628
+// libstdc++/55043
 
27629
+
 
27630
+#include <unordered_map>
 
27631
+#include <vector>
 
27632
+
 
27633
+struct MoveOnly
 
27634
+{
 
27635
+  MoveOnly() = default;
 
27636
+  MoveOnly(MoveOnly&&) = default;
 
27637
+};
 
27638
+
 
27639
+using hash = std::hash<int>;
 
27640
+using equal = std::equal_to<int>;
 
27641
+
 
27642
+template<typename Alloc>
 
27643
+  using test_type = std::unordered_map<int, MoveOnly, hash, equal, Alloc>;
 
27644
+
 
27645
+void test01()
 
27646
+{
 
27647
+  typedef test_type<std::allocator<MoveOnly>> uim;
 
27648
+  std::vector<uim> v;
 
27649
+  v.emplace_back(uim());
 
27650
+}
 
27651
+
 
27652
+// Unordered containers don't use allocator_traits yet so need full
 
27653
+// Allocator interface, derive from std::allocator to get it.
 
27654
+template<typename T, bool R>
 
27655
+struct Alloc : std::allocator<T>
 
27656
+{
 
27657
+  template<typename U>
 
27658
+    struct rebind { typedef Alloc<U, R> other; };
 
27659
+
 
27660
+  Alloc() = default;
 
27661
+
 
27662
+  template<typename U>
 
27663
+    Alloc(const Alloc<U, R>&) { }
 
27664
+
 
27665
+  typedef typename std::conditional<R, T&&, const T&>::type arg_type;
 
27666
+
 
27667
+  void construct(T* p, arg_type) const
 
27668
+  { new((void*)p) T(); }
 
27669
+};
 
27670
+
 
27671
+// verify is_copy_constructible depends on allocator
 
27672
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
 
27673
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
 
27674
+
 
27675
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
 
27676
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
26981
27677
Index: libstdc++-v3/testsuite/23_containers/multimap/range_access.cc
26982
27678
===================================================================
26983
27679
--- a/src/libstdc++-v3/testsuite/23_containers/multimap/range_access.cc (.../tags/gcc_4_7_2_release)
27628
28324
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27629
28325
 // GNU General Public License for more details.
27630
28326
 
 
28327
Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc
 
28328
===================================================================
 
28329
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc (.../tags/gcc_4_7_2_release)
 
28330
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc (.../branches/gcc-4_7-branch)
 
28331
@@ -0,0 +1,36 @@
 
28332
+// XFAIL because of PR libstdc++/55043 fix
 
28333
+// { dg-do compile { xfail *-*-* } }
 
28334
+// { dg-excess-errors "" }
 
28335
+// { dg-options "-std=gnu++11" }
 
28336
+
 
28337
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
28338
+//
 
28339
+// This file is part of the GNU ISO C++ Library.  This library is free
 
28340
+// software; you can redistribute it and/or modify it under the
 
28341
+// terms of the GNU General Public License as published by the
 
28342
+// Free Software Foundation; either version 3, or (at your option)
 
28343
+// any later version.
 
28344
+
 
28345
+// This library is distributed in the hope that it will be useful,
 
28346
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
28347
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28348
+// GNU General Public License for more details.
 
28349
+
 
28350
+// You should have received a copy of the GNU General Public License along
 
28351
+// with this library; see the file COPYING3.  If not see
 
28352
+// <http://www.gnu.org/licenses/>.
 
28353
+
 
28354
+#include <unordered_map>
 
28355
+
 
28356
+struct LinkedHashMap
 
28357
+{
 
28358
+  struct Entry;
 
28359
+
 
28360
+  typedef std::unordered_multimap<int, Entry> Storage;
 
28361
+  typedef Storage::iterator EntryPtr;
 
28362
+
 
28363
+  struct Entry
 
28364
+  {
 
28365
+    EntryPtr prev, next;
 
28366
+  };
 
28367
+};
 
28368
Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc
 
28369
===================================================================
 
28370
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc      (.../tags/gcc_4_7_2_release)
 
28371
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc      (.../branches/gcc-4_7-branch)
 
28372
@@ -0,0 +1,69 @@
 
28373
+// { dg-options "-std=gnu++0x" }
 
28374
+// { dg-do compile }
 
28375
+
 
28376
+// Copyright (C) 2013 Free Software Foundation, Inc.
 
28377
+//
 
28378
+// This file is part of the GNU ISO C++ Library.  This library is free
 
28379
+// software; you can redistribute it and/or modify it under the
 
28380
+// terms of the GNU General Public License as published by the
 
28381
+// Free Software Foundation; either version 3, or (at your option)
 
28382
+// any later version.
 
28383
+
 
28384
+// This library is distributed in the hope that it will be useful,
 
28385
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
28386
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28387
+// GNU General Public License for more details.
 
28388
+
 
28389
+// You should have received a copy of the GNU General Public License along
 
28390
+// with this library; see the file COPYING3.  If not see
 
28391
+// <http://www.gnu.org/licenses/>.
 
28392
+
 
28393
+// libstdc++/55043
 
28394
+
 
28395
+#include <unordered_map>
 
28396
+#include <vector>
 
28397
+
 
28398
+struct MoveOnly
 
28399
+{
 
28400
+  MoveOnly() = default;
 
28401
+  MoveOnly(MoveOnly&&) = default;
 
28402
+};
 
28403
+
 
28404
+using hash = std::hash<int>;
 
28405
+using equal = std::equal_to<int>;
 
28406
+
 
28407
+template<typename Alloc>
 
28408
+  using test_type = std::unordered_multimap<int, MoveOnly, hash, equal, Alloc>;
 
28409
+
 
28410
+void test01()
 
28411
+{
 
28412
+  typedef test_type<std::allocator<MoveOnly>> uim;
 
28413
+  std::vector<uim> v;
 
28414
+  v.emplace_back(uim());
 
28415
+}
 
28416
+
 
28417
+// Unordered containers don't use allocator_traits yet so need full
 
28418
+// Allocator interface, derive from std::allocator to get it.
 
28419
+template<typename T, bool R>
 
28420
+struct Alloc : std::allocator<T>
 
28421
+{
 
28422
+  template<typename U>
 
28423
+    struct rebind { typedef Alloc<U, R> other; };
 
28424
+
 
28425
+  Alloc() = default;
 
28426
+
 
28427
+  template<typename U>
 
28428
+    Alloc(const Alloc<U, R>&) { }
 
28429
+
 
28430
+  typedef typename std::conditional<R, T&&, const T&>::type arg_type;
 
28431
+
 
28432
+  void construct(T* p, arg_type) const
 
28433
+  { new((void*)p) T(); }
 
28434
+};
 
28435
+
 
28436
+// verify is_copy_constructible depends on allocator
 
28437
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
 
28438
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
 
28439
+
 
28440
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
 
28441
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
27631
28442
Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc
27632
28443
===================================================================
27633
28444
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc (.../tags/gcc_4_7_2_release)
27790
28601
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27791
28602
 // GNU General Public License for more details.
27792
28603
 
27793
 
Index: libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
27794
 
===================================================================
27795
 
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc       (.../tags/gcc_4_7_2_release)
27796
 
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc       (.../branches/gcc-4_7-branch)
27797
 
@@ -11,7 +11,7 @@
27798
 
 // any later version.
27799
 
 
27800
 
 // This library is distributed in the hope that it will be useful,
27801
 
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
27802
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
27803
 
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27804
 
 // GNU General Public License for more details.
27805
 
 
27806
 
@@ -19,7 +19,7 @@
27807
 
 // with this library; see the file COPYING3.  If not see
27808
 
 // <http://www.gnu.org/licenses/>.
27809
 
 
27810
 
-// { dg-error "static assertion failed" "" { target *-*-* } 186 }
27811
 
+// { dg-error "static assertion failed" "" { target *-*-* } 185 }
27812
 
 
27813
 
 #include <unordered_set>
27814
 
 
27815
28604
Index: libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc
27816
28605
===================================================================
27817
28606
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc       (.../tags/gcc_4_7_2_release)
27845
28634
+  test02();
27846
28635
   return 0;
27847
28636
 }
27848
 
Index: libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
27849
 
===================================================================
27850
 
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc    (.../tags/gcc_4_7_2_release)
27851
 
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc    (.../branches/gcc-4_7-branch)
27852
 
@@ -10,7 +10,7 @@
27853
 
 // any later version.
27854
 
 
27855
 
 // This library is distributed in the hope that it will be useful,
27856
 
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
27857
 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
27858
 
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27859
 
 // GNU General Public License for more details.
27860
 
 
27861
28637
Index: libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
27862
28638
===================================================================
27863
28639
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc      (.../tags/gcc_4_7_2_release)
27897
28673
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27898
28674
 // GNU General Public License for more details.
27899
28675
 
 
28676
Index: libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
 
28677
===================================================================
 
28678
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc       (.../tags/gcc_4_7_2_release)
 
28679
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc       (.../branches/gcc-4_7-branch)
 
28680
@@ -2,7 +2,7 @@
 
28681
 // { dg-options "-std=gnu++0x" }
 
28682
 // { dg-require-normal-mode "" }
 
28683
 
 
28684
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
28685
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
28686
 //
 
28687
 // This file is part of the GNU ISO C++ Library.  This library is free
 
28688
 // software; you can redistribute it and/or modify it under the
 
28689
@@ -11,7 +11,7 @@
 
28690
 // any later version.
 
28691
 
 
28692
 // This library is distributed in the hope that it will be useful,
 
28693
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
 
28694
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
28695
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28696
 // GNU General Public License for more details.
 
28697
 
 
28698
@@ -19,7 +19,7 @@
 
28699
 // with this library; see the file COPYING3.  If not see
 
28700
 // <http://www.gnu.org/licenses/>.
 
28701
 
 
28702
-// { dg-error "static assertion failed" "" { target *-*-* } 186 }
 
28703
+// { dg-error "static assertion failed" "" { target *-*-* } 187 }
 
28704
 
 
28705
 #include <unordered_set>
 
28706
 
 
28707
Index: libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
 
28708
===================================================================
 
28709
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc    (.../tags/gcc_4_7_2_release)
 
28710
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc    (.../branches/gcc-4_7-branch)
 
28711
@@ -10,7 +10,7 @@
 
28712
 // any later version.
 
28713
 
 
28714
 // This library is distributed in the hope that it will be useful,
 
28715
-// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
 
28716
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
28717
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28718
 // GNU General Public License for more details.
 
28719
 
 
28720
Index: libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc
 
28721
===================================================================
 
28722
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc   (.../tags/gcc_4_7_2_release)
 
28723
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_set/55043.cc   (.../branches/gcc-4_7-branch)
 
28724
@@ -0,0 +1,73 @@
 
28725
+// { dg-options "-std=gnu++0x" }
 
28726
+// { dg-do compile }
 
28727
+
 
28728
+// Copyright (C) 2013 Free Software Foundation, Inc.
 
28729
+//
 
28730
+// This file is part of the GNU ISO C++ Library.  This library is free
 
28731
+// software; you can redistribute it and/or modify it under the
 
28732
+// terms of the GNU General Public License as published by the
 
28733
+// Free Software Foundation; either version 3, or (at your option)
 
28734
+// any later version.
 
28735
+
 
28736
+// This library is distributed in the hope that it will be useful,
 
28737
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
28738
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28739
+// GNU General Public License for more details.
 
28740
+
 
28741
+// You should have received a copy of the GNU General Public License along
 
28742
+// with this library; see the file COPYING3.  If not see
 
28743
+// <http://www.gnu.org/licenses/>.
 
28744
+
 
28745
+// libstdc++/55043
 
28746
+
 
28747
+#include <unordered_set>
 
28748
+#include <vector>
 
28749
+
 
28750
+struct MoveOnly
 
28751
+{
 
28752
+  MoveOnly() = default;
 
28753
+  MoveOnly(MoveOnly&&) = default;
 
28754
+};
 
28755
+
 
28756
+struct equal {
 
28757
+  bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
 
28758
+};
 
28759
+struct hash {
 
28760
+  std::size_t operator()(const MoveOnly&) const { return 0; }
 
28761
+};
 
28762
+
 
28763
+template<typename Alloc>
 
28764
+  using test_type = std::unordered_set<MoveOnly, hash, equal, Alloc>;
 
28765
+
 
28766
+void test01()
 
28767
+{
 
28768
+  typedef test_type<std::allocator<MoveOnly>> uim;
 
28769
+  std::vector<uim> v;
 
28770
+  v.emplace_back(uim());
 
28771
+}
 
28772
+
 
28773
+// Unordered containers don't use allocator_traits yet so need full
 
28774
+// Allocator interface, derive from std::allocator to get it.
 
28775
+template<typename T, bool R>
 
28776
+struct Alloc : std::allocator<T>
 
28777
+{
 
28778
+  template<typename U>
 
28779
+    struct rebind { typedef Alloc<U, R> other; };
 
28780
+
 
28781
+  Alloc() = default;
 
28782
+
 
28783
+  template<typename U>
 
28784
+    Alloc(const Alloc<U, R>&) { }
 
28785
+
 
28786
+  typedef typename std::conditional<R, T&&, const T&>::type arg_type;
 
28787
+
 
28788
+  void construct(T* p, arg_type) const
 
28789
+  { new((void*)p) T(); }
 
28790
+};
 
28791
+
 
28792
+// verify is_copy_constructible depends on allocator
 
28793
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
 
28794
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
 
28795
+
 
28796
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
 
28797
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
27900
28798
Index: libstdc++-v3/testsuite/23_containers/deque/range_access.cc
27901
28799
===================================================================
27902
28800
--- a/src/libstdc++-v3/testsuite/23_containers/deque/range_access.cc    (.../tags/gcc_4_7_2_release)
28339
29237
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28340
29238
 // GNU General Public License for more details.
28341
29239
 
 
29240
Index: libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc
 
29241
===================================================================
 
29242
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc      (.../tags/gcc_4_7_2_release)
 
29243
+++ b/src/libstdc++-v3/testsuite/23_containers/unordered_multiset/55043.cc      (.../branches/gcc-4_7-branch)
 
29244
@@ -0,0 +1,73 @@
 
29245
+// { dg-options "-std=gnu++0x" }
 
29246
+// { dg-do compile }
 
29247
+
 
29248
+// Copyright (C) 2013 Free Software Foundation, Inc.
 
29249
+//
 
29250
+// This file is part of the GNU ISO C++ Library.  This library is free
 
29251
+// software; you can redistribute it and/or modify it under the
 
29252
+// terms of the GNU General Public License as published by the
 
29253
+// Free Software Foundation; either version 3, or (at your option)
 
29254
+// any later version.
 
29255
+
 
29256
+// This library is distributed in the hope that it will be useful,
 
29257
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
29258
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
29259
+// GNU General Public License for more details.
 
29260
+
 
29261
+// You should have received a copy of the GNU General Public License along
 
29262
+// with this library; see the file COPYING3.  If not see
 
29263
+// <http://www.gnu.org/licenses/>.
 
29264
+
 
29265
+// libstdc++/55043
 
29266
+
 
29267
+#include <unordered_set>
 
29268
+#include <vector>
 
29269
+
 
29270
+struct MoveOnly
 
29271
+{
 
29272
+  MoveOnly() = default;
 
29273
+  MoveOnly(MoveOnly&&) = default;
 
29274
+};
 
29275
+
 
29276
+struct equal {
 
29277
+  bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
 
29278
+};
 
29279
+struct hash {
 
29280
+  std::size_t operator()(const MoveOnly&) const { return 0; }
 
29281
+};
 
29282
+
 
29283
+template<typename Alloc>
 
29284
+  using test_type = std::unordered_multiset<MoveOnly, hash, equal, Alloc>;
 
29285
+
 
29286
+void test01()
 
29287
+{
 
29288
+  typedef test_type<std::allocator<MoveOnly>> uim;
 
29289
+  std::vector<uim> v;
 
29290
+  v.emplace_back(uim());
 
29291
+}
 
29292
+
 
29293
+// Unordered containers don't use allocator_traits yet so need full
 
29294
+// Allocator interface, derive from std::allocator to get it.
 
29295
+template<typename T, bool R>
 
29296
+struct Alloc : std::allocator<T>
 
29297
+{
 
29298
+  template<typename U>
 
29299
+    struct rebind { typedef Alloc<U, R> other; };
 
29300
+
 
29301
+  Alloc() = default;
 
29302
+
 
29303
+  template<typename U>
 
29304
+    Alloc(const Alloc<U, R>&) { }
 
29305
+
 
29306
+  typedef typename std::conditional<R, T&&, const T&>::type arg_type;
 
29307
+
 
29308
+  void construct(T* p, arg_type) const
 
29309
+  { new((void*)p) T(); }
 
29310
+};
 
29311
+
 
29312
+// verify is_copy_constructible depends on allocator
 
29313
+typedef test_type<Alloc<MoveOnly, true>> uim_rval;
 
29314
+static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
 
29315
+
 
29316
+typedef test_type<Alloc<MoveOnly, false>> uim_lval;
 
29317
+static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
28342
29318
Index: libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc
28343
29319
===================================================================
28344
29320
--- a/src/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc  (.../tags/gcc_4_7_2_release)
28556
29532
+
28557
29533
+  return 0;
28558
29534
+}
 
29535
Index: libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc
 
29536
===================================================================
 
29537
--- a/src/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc (.../tags/gcc_4_7_2_release)
 
29538
+++ b/src/libstdc++-v3/testsuite/20_util/function_objects/mem_fn/adl.cc (.../branches/gcc-4_7-branch)
 
29539
@@ -0,0 +1,44 @@
 
29540
+// { dg-options "-std=gnu++0x" }
 
29541
+// { dg-do compile }
 
29542
+
 
29543
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
29544
+//
 
29545
+// This file is part of the GNU ISO C++ Library.  This library is free
 
29546
+// software; you can redistribute it and/or modify it under the
 
29547
+// terms of the GNU General Public License as published by the
 
29548
+// Free Software Foundation; either version 3, or (at your option)
 
29549
+// any later version.
 
29550
+
 
29551
+// This library is distributed in the hope that it will be useful,
 
29552
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
29553
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
29554
+// GNU General Public License for more details.
 
29555
+
 
29556
+// You should have received a copy of the GNU General Public License along
 
29557
+// with this library; see the file COPYING3.  If not see
 
29558
+// <http://www.gnu.org/licenses/>.
 
29559
+
 
29560
+#include <functional>
 
29561
+
 
29562
+namespace n {
 
29563
+  struct X { int i; };
 
29564
+  void mem_fn(int X::*);
 
29565
+}
 
29566
+
 
29567
+using n::X;
 
29568
+
 
29569
+X x{};
 
29570
+int X::* p = &X::i;
 
29571
+
 
29572
+int test01()
 
29573
+{
 
29574
+  auto ref = std::ref(p);
 
29575
+  return ref(x);
 
29576
+}
 
29577
+
 
29578
+int test02()
 
29579
+{
 
29580
+  std::function<int(X)> fun(p);
 
29581
+  return fun(x);
 
29582
+}
 
29583
+
28559
29584
Index: libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
28560
29585
===================================================================
28561
29586
--- a/src/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc        (.../tags/gcc_4_7_2_release)
29219
30244
===================================================================
29220
30245
--- a/src/libiberty/ChangeLog   (.../tags/gcc_4_7_2_release)
29221
30246
+++ b/src/libiberty/ChangeLog   (.../branches/gcc-4_7-branch)
29222
 
@@ -1,3 +1,22 @@
 
30247
@@ -1,3 +1,31 @@
 
30248
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
30249
+
 
30250
+       Backported from mainline
 
30251
+       2013-02-09  Jakub Jelinek  <jakub@redhat.com>
 
30252
+
 
30253
+       PR other/56245
 
30254
+       * regex.c (PTR_INT_TYPE): Define.
 
30255
+       (EXTEND_BUFFER): Change incr type from int to PTR_INT_TYPE.
 
30256
+
29223
30257
+2013-01-31  Kai Tietz  <ktietz@redhat.com>
29224
30258
+
29225
30259
+       Merged from trunk
29256
30290
 
29257
30291
 #define rol(x, n) (((x) << (n)) | ((sha1_uint32) (x) >> (32 - (n))))
29258
30292
 
 
30293
Index: libiberty/regex.c
 
30294
===================================================================
 
30295
--- a/src/libiberty/regex.c     (.../tags/gcc_4_7_2_release)
 
30296
+++ b/src/libiberty/regex.c     (.../branches/gcc-4_7-branch)
 
30297
@@ -46,9 +46,11 @@
 
30298
 
 
30299
 # if defined STDC_HEADERS && !defined emacs
 
30300
 #  include <stddef.h>
 
30301
+#  define PTR_INT_TYPE ptrdiff_t
 
30302
 # else
 
30303
 /* We need this for `regex.h', and perhaps for the Emacs include files.  */
 
30304
 #  include <sys/types.h>
 
30305
+#  define PTR_INT_TYPE long
 
30306
 # endif
 
30307
 
 
30308
 # define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
 
30309
@@ -2045,7 +2047,7 @@
 
30310
     /* How many characters the new buffer can have?  */                        \
 
30311
     wchar_count = bufp->allocated / sizeof(UCHAR_T);                   \
 
30312
     if (wchar_count == 0) wchar_count = 1;                             \
 
30313
-    /* Truncate the buffer to CHAR_T align.  */                        \
 
30314
+    /* Truncate the buffer to CHAR_T align.  */                                \
 
30315
     bufp->allocated = wchar_count * sizeof(UCHAR_T);                   \
 
30316
     RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T);              \
 
30317
     bufp->buffer = (char*)COMPILED_BUFFER_VAR;                         \
 
30318
@@ -2054,7 +2056,7 @@
 
30319
     /* If the buffer moved, move all the pointers into it.  */         \
 
30320
     if (old_buffer != COMPILED_BUFFER_VAR)                             \
 
30321
       {                                                                        \
 
30322
-       int incr = COMPILED_BUFFER_VAR - old_buffer;                    \
 
30323
+       PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;           \
 
30324
        MOVE_BUFFER_POINTER (b);                                        \
 
30325
        MOVE_BUFFER_POINTER (begalt);                                   \
 
30326
        if (fixup_alt_jump)                                             \
 
30327
@@ -2082,7 +2084,7 @@
 
30328
     /* If the buffer moved, move all the pointers into it.  */         \
 
30329
     if (old_buffer != COMPILED_BUFFER_VAR)                             \
 
30330
       {                                                                        \
 
30331
-       int incr = COMPILED_BUFFER_VAR - old_buffer;                    \
 
30332
+       PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer;           \
 
30333
        MOVE_BUFFER_POINTER (b);                                        \
 
30334
        MOVE_BUFFER_POINTER (begalt);                                   \
 
30335
        if (fixup_alt_jump)                                             \
29259
30336
Index: libiberty/md5.c
29260
30337
===================================================================
29261
30338
--- a/src/libiberty/md5.c       (.../tags/gcc_4_7_2_release)
32572
33649
===================================================================
32573
33650
--- a/src/libjava/classpath/ChangeLog.gcj       (.../tags/gcc_4_7_2_release)
32574
33651
+++ b/src/libjava/classpath/ChangeLog.gcj       (.../branches/gcc-4_7-branch)
32575
 
@@ -1,3 +1,42 @@
 
33652
@@ -1,3 +1,48 @@
 
33653
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
 
33654
+
 
33655
+       PR bootstrap/56258
 
33656
+       * doc/cp-tools.texinfo (Virtual Machine Options): Use just
 
33657
+       one @gccoptlist instead of 3 separate ones.
 
33658
+
32576
33659
+2012-09-20  Jakub Jelinek  <jakub@redhat.com>
32577
33660
+
32578
33661
+       PR other/43620
33293
34376
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch)
33294
34377
@@ -1 +1 @@
33295
34378
-20120920
33296
 
+20130214
 
34379
+20130223
33297
34380
Index: gcc/tree-ssa-strlen.c
33298
34381
===================================================================
33299
34382
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_7_2_release)
33808
34891
       /* (-x) IN [a,b] -> x in [-b, -a]  */
33809
34892
       n_low = range_binop (MINUS_EXPR, exp_type,
33810
34893
                           build_int_cst (exp_type, 0),
33811
 
@@ -6026,10 +6041,11 @@
 
34894
@@ -5701,6 +5716,11 @@
 
34895
         break;
 
34896
       /* FALLTHROUGH */
 
34897
     case NEGATE_EXPR:
 
34898
+      /* For division and modulus, type can't be unsigned, as e.g.
 
34899
+        (-(x / 2U)) / 2U isn't equal to -((x / 2U) / 2U) for x >= 2.
 
34900
+        For signed types, even with wrapping overflow, this is fine.  */
 
34901
+      if (code != MULT_EXPR && TYPE_UNSIGNED (type))
 
34902
+       break;
 
34903
       if ((t1 = extract_muldiv (op0, c, code, wide_type, strict_overflow_p))
 
34904
          != 0)
 
34905
        return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
 
34906
@@ -6026,10 +6046,11 @@
33812
34907
     }
33813
34908
 
33814
34909
   /* This transformation is only worthwhile if we don't have to wrap ARG
33822
34917
          || TREE_CONSTANT (true_value) || TREE_CONSTANT (false_value)))
33823
34918
     return NULL_TREE;
33824
34919
 
33825
 
@@ -6781,12 +6797,14 @@
 
34920
@@ -6781,12 +6802,14 @@
33826
34921
           && TREE_TYPE (TREE_OPERAND (arg1, 0)) == inner_type))
33827
34922
     return NULL_TREE;
33828
34923
 
33839
34934
   if (TREE_CODE (arg1) == INTEGER_CST)
33840
34935
     arg1 = force_fit_type_double (inner_type, tree_to_double_int (arg1),
33841
34936
                                  0, TREE_OVERFLOW (arg1));
33842
 
@@ -13435,10 +13453,22 @@
 
34937
@@ -13435,10 +13458,22 @@
33843
34938
                                   TREE_OPERAND (arg1, 1)),
33844
34939
                           build_int_cst (TREE_TYPE (arg0), 0));
33845
34940
 
33862
34957
          && integer_onep (TREE_OPERAND (TREE_OPERAND (arg1, 0), 0)))
33863
34958
        {
33864
34959
          tem = build2 (RSHIFT_EXPR, TREE_TYPE (arg0), arg0,
33865
 
Index: gcc/tree-ssa-dse.c
 
34960
Index: gcc/omp-low.c
33866
34961
===================================================================
33867
 
--- a/src/gcc/tree-ssa-dse.c    (.../tags/gcc_4_7_2_release)
33868
 
+++ b/src/gcc/tree-ssa-dse.c    (.../branches/gcc-4_7-branch)
33869
 
@@ -94,7 +94,7 @@
33870
 
   temp = stmt;
33871
 
   do
33872
 
     {
33873
 
-      gimple use_stmt;
33874
 
+      gimple use_stmt, defvar_def;
33875
 
       imm_use_iterator ui;
33876
 
       bool fail = false;
33877
 
       tree defvar;
33878
 
@@ -108,6 +108,7 @@
33879
 
        defvar = PHI_RESULT (temp);
33880
 
       else
33881
 
        defvar = gimple_vdef (temp);
33882
 
+      defvar_def = temp;
33883
 
       temp = NULL;
33884
 
       FOR_EACH_IMM_USE_STMT (use_stmt, ui, defvar)
 
34962
--- a/src/gcc/omp-low.c (.../tags/gcc_4_7_2_release)
 
34963
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_7-branch)
 
34964
@@ -758,12 +758,20 @@
 
34965
       if (TREE_ADDRESSABLE (decl))
 
34966
        return true;
 
34967
 
 
34968
+      /* lower_send_shared_vars only uses copy-in, but not copy-out
 
34969
+        for these.  */
 
34970
+      if (TREE_READONLY (decl)
 
34971
+         || ((TREE_CODE (decl) == RESULT_DECL
 
34972
+              || TREE_CODE (decl) == PARM_DECL)
 
34973
+             && DECL_BY_REFERENCE (decl)))
 
34974
+       return false;
 
34975
+
 
34976
       /* Disallow copy-in/out in nested parallel if
 
34977
         decl is shared in outer parallel, otherwise
 
34978
         each thread could store the shared variable
 
34979
         in its own copy-in location, making the
 
34980
         variable no longer really shared.  */
 
34981
-      if (!TREE_READONLY (decl) && shared_ctx->is_nested)
 
34982
+      if (shared_ctx->is_nested)
33885
34983
        {
33886
 
@@ -139,7 +140,14 @@
33887
 
                  fail = true;
33888
 
                  BREAK_FROM_IMM_USE_STMT (ui);
33889
 
                }
33890
 
-             temp = use_stmt;
33891
 
+             /* Do not consider the PHI as use if it dominates the 
33892
 
+                stmt defining the virtual operand we are processing,
33893
 
+                we have processed it already in this case.  */
33894
 
+             if (gimple_bb (defvar_def) != gimple_bb (use_stmt)
33895
 
+                 && !dominated_by_p (CDI_DOMINATORS,
33896
 
+                                     gimple_bb (defvar_def),
33897
 
+                                     gimple_bb (use_stmt)))
33898
 
+               temp = use_stmt;
 
34984
          omp_context *up;
 
34985
 
 
34986
@@ -786,11 +794,10 @@
33899
34987
            }
33900
 
          /* If the statement is a use the store is not dead.  */
33901
 
          else if (ref_maybe_used_by_stmt_p (use_stmt,
 
34988
        }
 
34989
 
 
34990
-      /* For tasks avoid using copy-in/out, unless they are readonly
 
34991
-        (in which case just copy-in is used).  As tasks can be
 
34992
+      /* For tasks avoid using copy-in/out.  As tasks can be
 
34993
         deferred or executed in different thread, when GOMP_task
 
34994
         returns, the task hasn't necessarily terminated.  */
 
34995
-      if (!TREE_READONLY (decl) && is_task_ctx (shared_ctx))
 
34996
+      if (is_task_ctx (shared_ctx))
 
34997
        {
 
34998
          tree outer;
 
34999
        maybe_mark_addressable_and_ret:
33902
35000
Index: gcc/ipa-inline-transform.c
33903
35001
===================================================================
33904
35002
--- a/src/gcc/ipa-inline-transform.c    (.../tags/gcc_4_7_2_release)
34020
35118
===================================================================
34021
35119
--- a/src/gcc/ChangeLog (.../tags/gcc_4_7_2_release)
34022
35120
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_7-branch)
34023
 
@@ -1,3 +1,1281 @@
 
35121
@@ -1,3 +1,1331 @@
 
35122
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
 
35123
+
 
35124
+       PR bootstrap/56258
 
35125
+       * doc/invoke.texi (-fdump-rtl-pro_and_epilogue): Use @item
 
35126
+       instead of @itemx.
 
35127
+
 
35128
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
35129
+
 
35130
+       Backported from mainline
 
35131
+       2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
35132
+
 
35133
+       PR tree-optimization/56350
 
35134
+       * tree-vect-loop.c (vectorizable_reduction): If orig_stmt, return false
 
35135
+       if haven't found reduction or nested cycle operand, rather than
 
35136
+       asserting we must find it.
 
35137
+
 
35138
+       PR tree-optimization/56381
 
35139
+       * tree-ssa-pre.c (create_expression_by_pieces): Fix up last argument
 
35140
+       to fold_build3.
 
35141
+
 
35142
+       2013-02-08  Jakub Jelinek  <jakub@redhat.com>
 
35143
+
 
35144
+       PR tree-optimization/56250
 
35145
+       * fold-const.c (extract_muldiv_1) <case NEGATE_EXPR>: Don't optimize
 
35146
+       if type is unsigned and code isn't MULT_EXPR.
 
35147
+
 
35148
+       2013-02-06  Jakub Jelinek  <jakub@redhat.com>
 
35149
+
 
35150
+       PR middle-end/56217
 
35151
+       * omp-low.c (use_pointer_for_field): Return false if
 
35152
+       lower_send_shared_vars doesn't generate any copy-out code.
 
35153
+
 
35154
+       2012-11-27  Jakub Jelinek  <jakub@redhat.com>
 
35155
+
 
35156
+       PR tree-optimization/55110
 
35157
+       * tree-vect-loop.c (vectorizable_reduction): Don't assert
 
35158
+       that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
 
35159
+
 
35160
+2013-02-18  Richard Biener  <rguenther@suse.de>
 
35161
+
 
35162
+       Revert
 
35163
+       2013-02-04  Richard Biener  <rguenther@suse.de>
 
35164
+
 
35165
+       Backport from mainline
 
35166
+       2012-07-04  Richard Guenther  <rguenther@suse.de>
 
35167
+
 
35168
+       PR tree-optimization/53844
 
35169
+       * tree-ssa-dse.c (dse_possible_dead_store_p): Properly handle
 
35170
+       the loop virtual PHI.
 
35171
+
34024
35172
+2013-02-13  David S. Miller  <davem@davemloft.net>
34025
35173
+
34026
35174
+       * expmed.c (expand_shift_1): Only strip scalar integer subregs.
35302
36450
 2012-09-20  Release Manager
35303
36451
 
35304
36452
        * GCC 4.7.2 released.
35305
 
@@ -7,12 +1290,12 @@
 
36453
@@ -7,12 +1340,12 @@
35306
36454
        Backport from mainline
35307
36455
        2012-09-07  Andi Kleen  <ak@linux.intel.com>
35308
36456
 
35321
36469
 
35322
36470
 2012-09-14  Walter Lee  <walt@tilera.com>
35323
36471
 
35324
 
@@ -78,7 +1361,7 @@
 
36472
@@ -78,7 +1411,7 @@
35325
36473
 
35326
36474
 2012-09-12  Christian Bruel  <christian.bruel@st.com>
35327
36475
 
35544
36692
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
35545
36693
 /* { dg-require-effective-target powerpc_vsx_ok } */
35546
36694
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math -mveclibabi=mass" } */
 
36695
Index: gcc/testsuite/gcc.target/i386/i386.exp
 
36696
===================================================================
 
36697
--- a/src/gcc/testsuite/gcc.target/i386/i386.exp        (.../tags/gcc_4_7_2_release)
 
36698
+++ b/src/gcc/testsuite/gcc.target/i386/i386.exp        (.../branches/gcc-4_7-branch)
 
36699
@@ -245,12 +245,23 @@
 
36700
 
 
36701
 # If the linker used understands -M <mapfile>, pass it to clear hardware
 
36702
 # capabilities set by the Sun assembler.
 
36703
-set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
 
36704
+# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
 
36705
+set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcapv2.map"
 
36706
 
 
36707
-if [check_no_compiler_messages mapfile executable {
 
36708
+if ![check_no_compiler_messages mapfilev2 executable {
 
36709
+    int main (void) { return 0; }
 
36710
+} $clearcap_ldflags ] {
 
36711
+    # If this doesn't work, fall back to the less capable v1 syntax.
 
36712
+    set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
 
36713
+
 
36714
+    if ![check_no_compiler_messages mapfile executable {
 
36715
        int main (void) { return 0; }
 
36716
-  } $clearcap_ldflags ] {
 
36717
+    } $clearcap_ldflags ] {
 
36718
+       unset clearcap_ldflags
 
36719
+    }
 
36720
+}
 
36721
 
 
36722
+if [info exists clearcap_ldflags] {
 
36723
   if { [info procs gcc_target_compile] != [list] \
 
36724
        && [info procs saved_gcc_target_compile] == [list] } {
 
36725
     rename gcc_target_compile saved_gcc_target_compile
35547
36726
Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
35548
36727
===================================================================
35549
36728
--- a/src/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c       (.../tags/gcc_4_7_2_release)
35818
36997
+/* { dg-final { scan-assembler-not "avx_storeups256" } } */
35819
36998
 /* { dg-final { scan-assembler "vmovups.*\\*movv4sf_internal/3" } } */
35820
36999
 /* { dg-final { scan-assembler "vextractf128" } } */
 
37000
Index: gcc/testsuite/gcc.target/i386/clearcapv2.map
 
37001
===================================================================
 
37002
--- a/src/gcc/testsuite/gcc.target/i386/clearcapv2.map  (.../tags/gcc_4_7_2_release)
 
37003
+++ b/src/gcc/testsuite/gcc.target/i386/clearcapv2.map  (.../branches/gcc-4_7-branch)
 
37004
@@ -0,0 +1,7 @@
 
37005
+# clear all hardware capabilities emitted by Sun as: the tests here
 
37006
+# guard against execution at runtime
 
37007
+# uses mapfile v2 syntax which is the only way to clear AT_SUN_CAP_HW2 flags
 
37008
+$mapfile_version 2
 
37009
+CAPABILITY {
 
37010
+  HW = ;
 
37011
+};
35821
37012
Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
35822
37013
===================================================================
35823
37014
--- a/src/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c       (.../tags/gcc_4_7_2_release)
36176
37367
+  case (0)
36177
37368
+  end select
36178
37369
+end
 
37370
Index: gcc/testsuite/gfortran.dg/import2.f90
 
37371
===================================================================
 
37372
--- a/src/gcc/testsuite/gfortran.dg/import2.f90 (.../tags/gcc_4_7_2_release)
 
37373
+++ b/src/gcc/testsuite/gfortran.dg/import2.f90 (.../branches/gcc-4_7-branch)
 
37374
@@ -37,7 +37,7 @@
 
37375
   interface
 
37376
     subroutine other(x,y)
 
37377
       import ! { dg-error "Fortran 2003: IMPORT statement" }
 
37378
-      type(modType) :: y ! { dg-error "not been declared within the interface" }
 
37379
+      type(modType) :: y ! { dg-error "is being used before it is defined" }
 
37380
       real(kind)    :: x ! { dg-error "has not been declared" }
 
37381
     end subroutine
 
37382
   end interface
 
37383
@@ -56,13 +56,13 @@
 
37384
   interface
 
37385
     subroutine bar(x,y)
 
37386
       import ! { dg-error "Fortran 2003: IMPORT statement" }
 
37387
-      type(myType) :: x ! { dg-error "not been declared within the interface" }
 
37388
+      type(myType) :: x ! { dg-error "is being used before it is defined" }
 
37389
       integer(dp)  :: y ! { dg-error "has not been declared" }
 
37390
     end subroutine bar
 
37391
     subroutine test(x)
 
37392
       import :: myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
 
37393
       import myType3 ! { dg-error "Fortran 2003: IMPORT statement" }
 
37394
-      type(myType3) :: x ! { dg-error "not been declared within the interface" }
 
37395
+      type(myType3) :: x ! { dg-error "is being used before it is defined" }
 
37396
     end subroutine test
 
37397
   end interface
 
37398
 
36179
37399
Index: gcc/testsuite/gfortran.dg/use_23.f90
36180
37400
===================================================================
36181
37401
--- a/src/gcc/testsuite/gfortran.dg/use_23.f90  (.../tags/gcc_4_7_2_release)
36318
37538
+end
36319
37539
+
36320
37540
+
 
37541
Index: gcc/testsuite/gfortran.dg/import11.f90
 
37542
===================================================================
 
37543
--- a/src/gcc/testsuite/gfortran.dg/import11.f90        (.../tags/gcc_4_7_2_release)
 
37544
+++ b/src/gcc/testsuite/gfortran.dg/import11.f90        (.../branches/gcc-4_7-branch)
 
37545
@@ -0,0 +1,28 @@
 
37546
+! { dg-do compile }
 
37547
+!
 
37548
+! PR fortran/53537
 
37549
+! The definition of T1 in the interface used to be rejected because T3
 
37550
+! was imported under the original name T1.
 
37551
+
 
37552
+       MODULE MOD
 
37553
+         TYPE T1
 
37554
+           SEQUENCE
 
37555
+           integer :: j
 
37556
+         END TYPE t1
 
37557
+       END
 
37558
+       PROGRAM MAIN
 
37559
+         USE MOD, T3 => T1
 
37560
+         INTERFACE SUBR
 
37561
+           SUBROUTINE SUBR1(X,y)
 
37562
+             IMPORT :: T3
 
37563
+             type t1
 
37564
+!               sequence
 
37565
+!               integer :: i
 
37566
+             end type t1
 
37567
+             TYPE(T3) X
 
37568
+!             TYPE(T1) X
 
37569
+           END SUBROUTINE
 
37570
+         END INTERFACE SUBR
 
37571
+       END PROGRAM MAIN
 
37572
+
 
37573
+
36321
37574
Index: gcc/testsuite/gfortran.dg/enum_10.f90
36322
37575
===================================================================
36323
37576
--- a/src/gcc/testsuite/gfortran.dg/enum_10.f90 (.../tags/gcc_4_7_2_release)
36439
37692
+end program main
36440
37693
+
36441
37694
+
 
37695
Index: gcc/testsuite/gfortran.dg/import8.f90
 
37696
===================================================================
 
37697
--- a/src/gcc/testsuite/gfortran.dg/import8.f90 (.../tags/gcc_4_7_2_release)
 
37698
+++ b/src/gcc/testsuite/gfortran.dg/import8.f90 (.../branches/gcc-4_7-branch)
 
37699
@@ -12,7 +12,7 @@
 
37700
 abstract interface
 
37701
     subroutine generic_desc(self)
 
37702
         ! <<< missing IMPORT 
 
37703
-        class(Connection) :: self ! { dg-error "has not been declared within the interface" }
 
37704
+        class(Connection) :: self ! { dg-error "is being used before it is defined" }
 
37705
     end subroutine generic_desc
 
37706
 end interface
 
37707
 end
36442
37708
Index: gcc/testsuite/gfortran.dg/elemental_scalar_args_2.f90
36443
37709
===================================================================
36444
37710
--- a/src/gcc/testsuite/gfortran.dg/elemental_scalar_args_2.f90 (.../tags/gcc_4_7_2_release)
36480
37746
+    res = ["d", "e"]
36481
37747
+  end function
36482
37748
+end
 
37749
Index: gcc/testsuite/gfortran.dg/matmul_9.f90
 
37750
===================================================================
 
37751
--- a/src/gcc/testsuite/gfortran.dg/matmul_9.f90        (.../tags/gcc_4_7_2_release)
 
37752
+++ b/src/gcc/testsuite/gfortran.dg/matmul_9.f90        (.../branches/gcc-4_7-branch)
 
37753
@@ -0,0 +1,47 @@
 
37754
+! { dg-do run }
 
37755
+! { dg-options "-fdump-tree-original" }
 
37756
+!
 
37757
+! PR fortran/56318
 
37758
+!
 
37759
+! Contributed by Alberto Luaces
 
37760
+!
 
37761
+SUBROUTINE mass_matrix        
 
37762
+  DOUBLE PRECISION,PARAMETER::m1=1.d0
 
37763
+  DOUBLE PRECISION,DIMENSION(3,2),PARAMETER::A1=reshape([1.d0,0.d0, 0.d0, &
 
37764
+       0.d0,1.d0, 0.d0],[3,2])
 
37765
+  DOUBLE PRECISION,DIMENSION(2,2),PARAMETER::Mel=reshape([1.d0/3.d0, 0.d0, &
 
37766
+       0.d0, 1.d0/3.d0],[2,2])
 
37767
+
 
37768
+  DOUBLE PRECISION,DIMENSION(3,3)::MM1
 
37769
+
 
37770
+  MM1=m1*matmul(A1,matmul(Mel,transpose(A1)))
 
37771
+  !print '(3f8.3)', MM1
 
37772
+  if (any (abs (MM1 &
 
37773
+                - reshape ([1.d0/3.d0, 0.d0,      0.d0,  &
 
37774
+                            0.d0,      1.d0/3.d0, 0.d0,  &
 
37775
+                            0.d0,      0.d0,      0.d0], &
 
37776
+                           [3,3])) > epsilon(1.0d0))) &
 
37777
+    call abort ()
 
37778
+END SUBROUTINE mass_matrix
 
37779
+
 
37780
+program name
 
37781
+  implicit none
 
37782
+  integer, parameter :: A(3,2) = reshape([1,2,3,4,5,6],[3,2])
 
37783
+  integer, parameter :: B(2,3) = reshape([3,17,23,31,43,71],[2,3])
 
37784
+  integer, parameter :: C(3)   = [-5,-7,-21]
 
37785
+  integer, parameter :: m1 = 1
 
37786
+
 
37787
+!  print *, matmul(B,C)
 
37788
+   if (any (matmul(B,C) /= [-1079, -1793])) call abort()
 
37789
+!  print *, matmul(C,A)
 
37790
+   if (any (matmul(C,A) /= [-82, -181])) call abort()
 
37791
+!  print '(3i5)', m1*matmul(A,B)
 
37792
+  if (any (m1*matmul(A,B) /= reshape([71,91,111, 147,201,255, 327,441,555],&
 
37793
+                                     [3,3]))) &
 
37794
+     call abort()
 
37795
+  call mass_matrix
 
37796
+end program name
 
37797
+
 
37798
+! { dg-final { scan-tree-dump-times "matmul" 0 "original" } }
 
37799
+! { dg-final { cleanup-tree-dump "original" } }
 
37800
+
 
37801
Index: gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90
 
37802
===================================================================
 
37803
--- a/src/gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90        (.../tags/gcc_4_7_2_release)
 
37804
+++ b/src/gcc/testsuite/gfortran.dg/proc_ptr_comp_37.f90        (.../branches/gcc-4_7-branch)
 
37805
@@ -0,0 +1,25 @@
 
37806
+! { dg-do compile }
 
37807
+!
 
37808
+! PR 56385: [4.6/4.7/4.8 Regression] [OOP] ICE with allocatable function result in a procedure-pointer component
 
37809
+!
 
37810
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
 
37811
+
 
37812
+  implicit none
 
37813
+  
 
37814
+  type :: TGeometricShape
 
37815
+  end type
 
37816
+
 
37817
+  type :: TVolumeSourceBody
 
37818
+    class(TGeometricShape), allocatable :: GeometricShape
 
37819
+    procedure(scalar_flux_interface), pointer :: get_scalar_flux
 
37820
+  end type
 
37821
+
 
37822
+  abstract interface
 
37823
+    function scalar_flux_interface(self) result(res)
 
37824
+      import
 
37825
+      real, allocatable :: res(:)
 
37826
+      class(TVolumeSourceBody), intent(in) :: self
 
37827
+    end function
 
37828
+  end interface
 
37829
+
 
37830
+end
36483
37831
Index: gcc/testsuite/gfortran.dg/pr56015.f90
36484
37832
===================================================================
36485
37833
--- a/src/gcc/testsuite/gfortran.dg/pr56015.f90 (.../tags/gcc_4_7_2_release)
36501
37849
+    if (any (p .ne. (-0.2d0, 0.1d0))) call abort
36502
37850
+  end subroutine
36503
37851
+end program pr56015
 
37852
Index: gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
 
37853
===================================================================
 
37854
--- a/src/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90        (.../tags/gcc_4_7_2_release)
 
37855
+++ b/src/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90        (.../branches/gcc-4_7-branch)
 
37856
@@ -13,7 +13,7 @@
 
37857
   subroutine sim_1(func1,params)
 
37858
     interface
 
37859
       function func1(fparams)
 
37860
-        type(fcnparms) :: fparams ! { dg-error "not been declared within the interface" }
 
37861
+        type(fcnparms) :: fparams ! { dg-error "is being used before it is defined" }
 
37862
         real :: func1
 
37863
       end function func1
 
37864
     end interface
36504
37865
Index: gcc/testsuite/gfortran.dg/transfer_intrinsic_4.f
36505
37866
===================================================================
36506
37867
--- a/src/gcc/testsuite/gfortran.dg/transfer_intrinsic_4.f      (.../tags/gcc_4_7_2_release)
36789
38150
+  deallocate( encode(1,1)%mask,encode(1,2)%mask)
36790
38151
+  allocate( encode(1,1)%mask(1),encode(1,1)%mask(1))  ! { dg-error "also appears at" }
36791
38152
+end program main
 
38153
Index: gcc/testsuite/gfortran.dg/import10.f90
 
38154
===================================================================
 
38155
--- a/src/gcc/testsuite/gfortran.dg/import10.f90        (.../tags/gcc_4_7_2_release)
 
38156
+++ b/src/gcc/testsuite/gfortran.dg/import10.f90        (.../branches/gcc-4_7-branch)
 
38157
@@ -0,0 +1,24 @@
 
38158
+! { dg-do compile }
 
38159
+!
 
38160
+! PR fortran/53537
 
38161
+! The use of WP in the ODE_DERIVATIVE interface used to be rejected because
 
38162
+! the symbol was imported under the original name DP.
 
38163
+!
 
38164
+! Original test case from Arjen Markus <arjen.markus@deltares.nl>
 
38165
+
 
38166
+module select_precision
 
38167
+    integer, parameter :: dp = kind(1.0)
 
38168
+end module select_precision
 
38169
+
 
38170
+module ode_types
 
38171
+    use select_precision, only: wp => dp
 
38172
+    implicit none
 
38173
+    interface
 
38174
+        subroutine ode_derivative(x)
 
38175
+            import   :: wp
 
38176
+            real(wp) :: x
 
38177
+        end subroutine ode_derivative
 
38178
+    end interface
 
38179
+end module ode_types
 
38180
+
 
38181
+
36792
38182
Index: gcc/testsuite/gfortran.dg/use_26.f90
36793
38183
===================================================================
36794
38184
--- a/src/gcc/testsuite/gfortran.dg/use_26.f90  (.../tags/gcc_4_7_2_release)
37007
38397
 
37008
38398
 foreach src [lsort [find $srcdir/$subdir *.c]] {
37009
38399
     if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} {
 
38400
Index: gcc/testsuite/gcc.c-torture/execute/pr56250.c
 
38401
===================================================================
 
38402
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr56250.c (.../tags/gcc_4_7_2_release)
 
38403
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr56250.c (.../branches/gcc-4_7-branch)
 
38404
@@ -0,0 +1,13 @@
 
38405
+/* PR tree-optimization/56250 */
 
38406
+
 
38407
+extern void abort (void);
 
38408
+
 
38409
+int
 
38410
+main ()
 
38411
+{
 
38412
+  unsigned int x = 2;
 
38413
+  unsigned int y = (0U - x / 2) / 2;
 
38414
+  if (-1U / x != y)
 
38415
+    abort ();
 
38416
+  return 0;
 
38417
+}
37010
38418
Index: gcc/testsuite/gcc.c-torture/compile/pr55921.c
37011
38419
===================================================================
37012
38420
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr55921.c (.../tags/gcc_4_7_2_release)
37954
39362
+  bar (-__INT_MAX__ - 1);
37955
39363
+  return 0;
37956
39364
+}
 
39365
Index: gcc/testsuite/gcc.dg/pr56350.c
 
39366
===================================================================
 
39367
--- a/src/gcc/testsuite/gcc.dg/pr56350.c        (.../tags/gcc_4_7_2_release)
 
39368
+++ b/src/gcc/testsuite/gcc.dg/pr56350.c        (.../branches/gcc-4_7-branch)
 
39369
@@ -0,0 +1,13 @@
 
39370
+/* PR tree-optimization/56350 */
 
39371
+/* { dg-do compile } */
 
39372
+/* { dg-options "-O -ftree-vectorize" } */
 
39373
+
 
39374
+int a, b, c;
 
39375
+
 
39376
+void
 
39377
+f (void)
 
39378
+{
 
39379
+  for (; c; c++)
 
39380
+    for (b = 0; b < 2; b++)
 
39381
+      a /= 8;
 
39382
+}
37957
39383
Index: gcc/testsuite/gcc.dg/c90-const-expr-8.c
37958
39384
===================================================================
37959
39385
--- a/src/gcc/testsuite/gcc.dg/c90-const-expr-8.c       (.../tags/gcc_4_7_2_release)
38579
40005
 /* { dg-xfail-run-if "non-conforming C99 snprintf" { *-*-hpux11.[012]* } } */
38580
40006
 
38581
40007
 /* PR middle-end/47917 */
 
40008
Index: gcc/testsuite/gcc.dg/pr55110.c
 
40009
===================================================================
 
40010
--- a/src/gcc/testsuite/gcc.dg/pr55110.c        (.../tags/gcc_4_7_2_release)
 
40011
+++ b/src/gcc/testsuite/gcc.dg/pr55110.c        (.../branches/gcc-4_7-branch)
 
40012
@@ -0,0 +1,13 @@
 
40013
+/* PR tree-optimization/55110 */
 
40014
+/* { dg-do compile } */
 
40015
+/* { dg-options "-O1 -ftree-vectorize" } */
 
40016
+
 
40017
+int
 
40018
+foo (int x)
 
40019
+{
 
40020
+  int a, b;
 
40021
+  for (b = 0; b < 8; b++)
 
40022
+    for (a = 0; a < 2; a++)
 
40023
+      x /= 3;
 
40024
+  return x;
 
40025
+}
38582
40026
Index: gcc/testsuite/gcc.dg/tree-ssa/sra-13.c
38583
40027
===================================================================
38584
40028
--- a/src/gcc/testsuite/gcc.dg/tree-ssa/sra-13.c        (.../tags/gcc_4_7_2_release)
39040
40484
===================================================================
39041
40485
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_7_2_release)
39042
40486
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_7-branch)
39043
 
@@ -1,3 +1,712 @@
 
40487
@@ -1,3 +1,789 @@
 
40488
+2013-02-22  Janus Weil  <janus@gcc.gnu.org>
 
40489
+
 
40490
+       PR fortran/56385
 
40491
+       * gfortran.dg/proc_ptr_comp_37.f90: New.
 
40492
+
 
40493
+2013-02-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
40494
+
 
40495
+       Backport from mainline:
 
40496
+       2012-06-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
40497
+
 
40498
+       * gcc.target/i386/clearcapv2.map: New file.
 
40499
+       * gcc.target/i386/i386.exp: Try it first before clearcap.map.
 
40500
+
 
40501
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
40502
+
 
40503
+       Backported from mainline
 
40504
+       2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
40505
+
 
40506
+       PR tree-optimization/56350
 
40507
+       * gcc.dg/pr56350.c: New test.
 
40508
+
 
40509
+       2013-02-08  Jakub Jelinek  <jakub@redhat.com>
 
40510
+
 
40511
+       PR tree-optimization/56250
 
40512
+       * gcc.c-torture/execute/pr56250.c: New test.
 
40513
+
 
40514
+       2013-02-07  Jakub Jelinek  <jakub@redhat.com>
 
40515
+
 
40516
+       PR c++/56241
 
40517
+       * g++.dg/parse/crash61.C: New test.
 
40518
+
 
40519
+       PR c++/56239
 
40520
+       * g++.dg/parse/pr56239.C: New test.
 
40521
+
 
40522
+       PR c++/56237
 
40523
+       * g++.dg/abi/mangle61.C: New test.
 
40524
+
 
40525
+       2013-02-06  Jakub Jelinek  <jakub@redhat.com>
 
40526
+
 
40527
+       PR middle-end/56217
 
40528
+       * g++.dg/gomp/pr56217.C: New test.
 
40529
+
 
40530
+       2012-11-27  Jakub Jelinek  <jakub@redhat.com>
 
40531
+
 
40532
+       PR tree-optimization/55110
 
40533
+       * gcc.dg/pr55110.c: New test.
 
40534
+
 
40535
+2013-02-18  Richard Biener  <rguenther@suse.de>
 
40536
+
 
40537
+       Revert
 
40538
+       2013-02-04  Richard Biener  <rguenther@suse.de>
 
40539
+
 
40540
+       Backport from mainline
 
40541
+       2012-07-04  Richard Guenther  <rguenther@suse.de>
 
40542
+
 
40543
+       PR tree-optimization/53844
 
40544
+       * g++.dg/tree-ssa/pr53844.C: New testcase.
 
40545
+
 
40546
+2013-02-17  Tobias Burnus  <burnus@net-b.de>
 
40547
+           Mikael Morin  <mikael@gcc.gnu.org>
 
40548
+
 
40549
+       Backport from trunk
 
40550
+       2013-01-28  Tobias Burnus  <burnus@net-b.de>
 
40551
+                   Mikael Morin  <mikael@gcc.gnu.org>
 
40552
+
 
40553
+       PR fortran/53537
 
40554
+       * gfortran.dg/import2.f90: Adjust undeclared type error messages.
 
40555
+       * gfortran.dg/import8.f90: Likewise.
 
40556
+       * gfortran.dg/interface_derived_type_1.f90: Likewise.
 
40557
+       * gfortran.dg/import10.f90: New test.
 
40558
+       * gfortran.dg/import11.f90: Likewise
 
40559
+
 
40560
+2013-02-15  Tobias Burnus  <burnus@net-b.de>
 
40561
+
 
40562
+       PR fortran/56318
 
40563
+       * gcc/testsuite/gfortran.dg/matmul_9.f90: New.
 
40564
+
39044
40565
+2012-02-13   Tobias Burnus  <burnus@net-b.de>
39045
40566
+
39046
40567
+       Backport from mainline
39753
41274
 2012-09-20  Release Manager
39754
41275
 
39755
41276
        * GCC 4.7.2 released.
39756
 
@@ -2176,7 +2885,7 @@
 
41277
@@ -2176,7 +2962,7 @@
39757
41278
 
39758
41279
 2012-02-06  Andrey Belevantsev  <abel@ispras.ru>
39759
41280
 
39900
41421
+namespace { enum E { E1 }; } void f(E e) { }
39901
41422
+
39902
41423
+// { dg-final { scan-assembler-not "globl" } }
 
41424
Index: gcc/testsuite/g++.dg/abi/mangle61.C
 
41425
===================================================================
 
41426
--- a/src/gcc/testsuite/g++.dg/abi/mangle61.C   (.../tags/gcc_4_7_2_release)
 
41427
+++ b/src/gcc/testsuite/g++.dg/abi/mangle61.C   (.../branches/gcc-4_7-branch)
 
41428
@@ -0,0 +1,28 @@
 
41429
+// PR c++/56237
 
41430
+// { dg-do compile }
 
41431
+
 
41432
+void *p[4];
 
41433
+
 
41434
+void
 
41435
+foo ()
 
41436
+{
 
41437
+  static union { } u;
 
41438
+  p[0] = &u;
 
41439
+  {
 
41440
+    static union { } u; 
 
41441
+    p[1] = &u;
 
41442
+    {
 
41443
+      static union { } u;
 
41444
+      p[2] = &u;
 
41445
+    }
 
41446
+  }
 
41447
+  {
 
41448
+    static union { } u;
 
41449
+    p[3] = &u;
 
41450
+  }
 
41451
+}
 
41452
+
 
41453
+// { dg-final { scan-assembler "_ZZ3foovE1u\[^_\]" } }
 
41454
+// { dg-final { scan-assembler "_ZZ3foovE1u_0" } }
 
41455
+// { dg-final { scan-assembler "_ZZ3foovE1u_1" } }
 
41456
+// { dg-final { scan-assembler "_ZZ3foovE1u_2" } }
 
41457
Index: gcc/testsuite/g++.dg/gomp/pr56217.C
 
41458
===================================================================
 
41459
--- a/src/gcc/testsuite/g++.dg/gomp/pr56217.C   (.../tags/gcc_4_7_2_release)
 
41460
+++ b/src/gcc/testsuite/g++.dg/gomp/pr56217.C   (.../branches/gcc-4_7-branch)
 
41461
@@ -0,0 +1,14 @@
 
41462
+// PR middle-end/56217
 
41463
+// { dg-do compile }
 
41464
+// { dg-options "-fopenmp" }
 
41465
+
 
41466
+struct S { int *p; S (); S (S &); };
 
41467
+
 
41468
+S
 
41469
+foo ()
 
41470
+{
 
41471
+  S s;
 
41472
+  #pragma omp task shared (s)
 
41473
+    s.p = 0;
 
41474
+  return s;
 
41475
+}
39903
41476
Index: gcc/testsuite/g++.dg/init/array34.C
39904
41477
===================================================================
39905
41478
--- a/src/gcc/testsuite/g++.dg/init/array34.C   (.../tags/gcc_4_7_2_release)
40002
41575
-  B() : a() {}   // { dg-error "abstract" }
40003
41576
+  B() : a() {}
40004
41577
 };
40005
 
Index: gcc/testsuite/g++.dg/tree-ssa/pr53844.C
40006
 
===================================================================
40007
 
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr53844.C       (.../tags/gcc_4_7_2_release)
40008
 
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr53844.C       (.../branches/gcc-4_7-branch)
40009
 
@@ -0,0 +1,78 @@
40010
 
+// { dg-do compile }
40011
 
+// { dg-options "-O2 -fdump-tree-optimized-vops" }
40012
 
+
40013
 
+struct VBase;
40014
 
+
40015
 
+//Very minimal numeric vector class where Base provides the policy
40016
 
+template<typename Base=VBase>
40017
 
+struct Vector : public Base{
40018
 
+       
40019
 
+       inline Vector(const Base& b)
40020
 
+       :Base(b)
40021
 
+       {
40022
 
+       }
40023
 
+
40024
 
+       //Assignment from any other sort of Vector
40025
 
+       template<typename Base2>
40026
 
+       void operator= (const Vector<Base2>& from)
40027
 
+       {
40028
 
+               for(int i=0; i<100; i++){
40029
 
+                       (*this)[i]=from[i];
40030
 
+               }
40031
 
+       }
40032
 
+};
40033
 
+
40034
 
+
40035
 
+//Base class to represent pointer as a Vector
40036
 
+struct VBase{
40037
 
+       double * const my_data;
40038
 
+
40039
 
+       double& operator[](int i) {
40040
 
+               return my_data[i];
40041
 
+       }
40042
 
+
40043
 
+       const double& operator[](int i) const {
40044
 
+               return my_data[i];
40045
 
+       }
40046
 
+};
40047
 
+
40048
 
+//Base class providing very minimalistic expression template
40049
 
+template<class B2> struct ScalarMulExpr
40050
 
+{
40051
 
+       const int& mul;
40052
 
+       const Vector<B2>& vec;
40053
 
+
40054
 
+       int size() const
40055
 
+       {
40056
 
+               return vec.size();
40057
 
+       }
40058
 
+
40059
 
+       double operator[](int i) const
40060
 
+       {
40061
 
+               return vec[i]*mul;
40062
 
+       }
40063
 
+
40064
 
+       ScalarMulExpr(const Vector<B2>& vec_, const int& m)
40065
 
+       :mul(m),vec(vec_)
40066
 
+       {
40067
 
+       }
40068
 
+};
40069
 
+
40070
 
+//Allow vector to be multiplied by a scalar
40071
 
+template<class B2>
40072
 
+Vector<ScalarMulExpr<B2> > operator*(const Vector<B2>& lhs, const int& rhs)
40073
 
+{
40074
 
+       return ScalarMulExpr<B2>(lhs, rhs);
40075
 
+}
40076
 
+
40077
 
+//Test function producing suboptimal asm code
40078
 
+void test(const Vector<>& in, Vector<>& out, int i)
40079
 
+{
40080
 
+       out=in*1*1*1*1*1*1*1*1*1*1*1;
40081
 
+}
40082
 
+
40083
 
+// There should be a single store remaining, inside the loops.  All
40084
 
+// dead stores to unused temporaries should have been removed.
40085
 
+
40086
 
+// { dg-final { scan-tree-dump-times "VDEF" 1 "optimized" } }
40087
 
+// { dg-final { cleanup-tree-dump "optimized" } }
40088
41578
Index: gcc/testsuite/g++.dg/warn/pmf2.C
40089
41579
===================================================================
40090
41580
--- a/src/gcc/testsuite/g++.dg/warn/pmf2.C      (.../tags/gcc_4_7_2_release)
40240
41730
+      foo ();
40241
41731
+    }
40242
41732
+}
 
41733
Index: gcc/testsuite/g++.dg/parse/crash61.C
 
41734
===================================================================
 
41735
--- a/src/gcc/testsuite/g++.dg/parse/crash61.C  (.../tags/gcc_4_7_2_release)
 
41736
+++ b/src/gcc/testsuite/g++.dg/parse/crash61.C  (.../branches/gcc-4_7-branch)
 
41737
@@ -0,0 +1,6 @@
 
41738
+// PR c++/56241
 
41739
+// { dg-do compile }
 
41740
+
 
41741
+struct pair { constexpr pair (const) : }; // { dg-error "" }
 
41742
+template <0> make_pair () {}             // { dg-error "" }
 
41743
+pair prefix[] = { 0, make_pair }         // { dg-error "" }
 
41744
Index: gcc/testsuite/g++.dg/parse/pr56239.C
 
41745
===================================================================
 
41746
--- a/src/gcc/testsuite/g++.dg/parse/pr56239.C  (.../tags/gcc_4_7_2_release)
 
41747
+++ b/src/gcc/testsuite/g++.dg/parse/pr56239.C  (.../branches/gcc-4_7-branch)
 
41748
@@ -0,0 +1,13 @@
 
41749
+// PR c++/56239
 
41750
+// { dg-do compile }
 
41751
+
 
41752
+struct S
 
41753
+{
 
41754
+  int operator () () { return 0; }
 
41755
+};
 
41756
+
 
41757
+int
 
41758
+main ()
 
41759
+{
 
41760
+  return (S ()) ();
 
41761
+}
 
41762
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C
 
41763
===================================================================
 
41764
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C      (.../tags/gcc_4_7_2_release)
 
41765
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv7.C      (.../branches/gcc-4_7-branch)
 
41766
@@ -0,0 +1,20 @@
 
41767
+// PR c++/55710
 
41768
+// { dg-do link { target c++11 } }
 
41769
+
 
41770
+template <class T>
 
41771
+struct X {
 
41772
+  static void (*code) ();
 
41773
+};
 
41774
+
 
41775
+template <class T>
 
41776
+void (*X<T>::code) () = []{};  // Line 7
 
41777
+
 
41778
+struct Y {
 
41779
+  void (*code) () = []{} ; // Line 10
 
41780
+  void operator()() { code(); }
 
41781
+};
 
41782
+
 
41783
+int main () {
 
41784
+  X<int>::code();
 
41785
+  Y()();
 
41786
+}
40243
41787
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
40244
41788
===================================================================
40245
41789
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C      (.../tags/gcc_4_7_2_release)
40277
41821
+{
40278
41822
+    updateChild(obj);
40279
41823
+}
 
41824
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
 
41825
===================================================================
 
41826
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C      (.../tags/gcc_4_7_2_release)
 
41827
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C      (.../branches/gcc-4_7-branch)
 
41828
@@ -0,0 +1,37 @@
 
41829
+// PR c++/56135
 
41830
+// { dg-do run { target c++11 } }
 
41831
+
 
41832
+#include <functional>
 
41833
+
 
41834
+struct test {
 
41835
+  template<typename T>
 
41836
+  std::function<void()> broken(int x) {
 
41837
+    return [=] { +x; print<T>(); };
 
41838
+  }
 
41839
+
 
41840
+  std::function<void()> works0() {
 
41841
+    return [=] { print<int>(); };
 
41842
+  }
 
41843
+
 
41844
+  template<typename T>
 
41845
+  std::function<void()> works1() {
 
41846
+    return [=] { print<int>(); };
 
41847
+  }
 
41848
+
 
41849
+  template<typename T>
 
41850
+  std::function<void()> works2() {
 
41851
+    return [=] { this->print<T>(); };
 
41852
+  }
 
41853
+
 
41854
+  template<typename T>
 
41855
+  void print() { if (this == 0) __builtin_abort (); }
 
41856
+};
 
41857
+
 
41858
+int main(void) {
 
41859
+  test().broken<int>(1)();
 
41860
+  test().works0()();
 
41861
+  test().works1<int>()();
 
41862
+  test().works2<int>()();
 
41863
+
 
41864
+  return 0;
 
41865
+}
 
41866
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
 
41867
===================================================================
 
41868
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C     (.../tags/gcc_4_7_2_release)
 
41869
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C     (.../branches/gcc-4_7-branch)
 
41870
@@ -0,0 +1,15 @@
 
41871
+// PR c++/52026
 
41872
+// { dg-options "-std=c++11 -O" }
 
41873
+// { dg-do run }
 
41874
+
 
41875
+template<bool B>
 
41876
+int func() {
 
41877
+  const int constVal1 = B ? 100 : -100;
 
41878
+  const int constVal = constVal1;
 
41879
+  return [] { return constVal; }();
 
41880
+}
 
41881
+
 
41882
+int main() {
 
41883
+  if (func<true>() != 100)
 
41884
+    __builtin_abort ();
 
41885
+}
40280
41886
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
40281
41887
===================================================================
40282
41888
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C  (.../tags/gcc_4_7_2_release)
40337
41943
+  E e;
40338
41944
+  void f () { auto l = [&](void)->void { if (e == F) return; }; }
40339
41945
+};
 
41946
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C
 
41947
===================================================================
 
41948
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C  (.../tags/gcc_4_7_2_release)
 
41949
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template9.C  (.../branches/gcc-4_7-branch)
 
41950
@@ -0,0 +1,15 @@
 
41951
+// PR c++/54276
 
41952
+// { dg-do link { target c++11 } }
 
41953
+
 
41954
+template <typename T>
 
41955
+void foo(T)
 
41956
+{
 
41957
+  static int x = 1;
 
41958
+  auto f = [] { return x + 1; };
 
41959
+  f();
 
41960
+}
 
41961
+
 
41962
+int main()
 
41963
+{
 
41964
+  foo(4);
 
41965
+}
40340
41966
Index: gcc/testsuite/g++.dg/cpp0x/noexcept18.C
40341
41967
===================================================================
40342
41968
--- a/src/gcc/testsuite/g++.dg/cpp0x/noexcept18.C       (.../tags/gcc_4_7_2_release)
41376
43002
+  A<0> cb; B<A<0>, &C::cb> db; // { dg-error "could not convert template argument" }
41377
43003
+};
41378
43004
+C<int> e;
 
43005
Index: gcc/testsuite/g++.dg/template/error49.C
 
43006
===================================================================
 
43007
--- a/src/gcc/testsuite/g++.dg/template/error49.C       (.../tags/gcc_4_7_2_release)
 
43008
+++ b/src/gcc/testsuite/g++.dg/template/error49.C       (.../branches/gcc-4_7-branch)
 
43009
@@ -0,0 +1,10 @@
 
43010
+// PR c++/40405
 
43011
+
 
43012
+template<int, int> struct A
 
43013
+{
 
43014
+  static int i;
 
43015
+};
 
43016
+
 
43017
+template<int> int A<0,0>::i = 0; // { dg-error "" }
 
43018
+
 
43019
+int j = A<0,0>::i;
41379
43020
Index: gcc/testsuite/g++.dg/template/new11.C
41380
43021
===================================================================
41381
43022
--- a/src/gcc/testsuite/g++.dg/template/new11.C (.../tags/gcc_4_7_2_release)
41462
43103
+  vec3 bb[2];
41463
43104
+  work(bb);
41464
43105
+}
 
43106
Index: gcc/testsuite/g++.dg/template/typename19.C
 
43107
===================================================================
 
43108
--- a/src/gcc/testsuite/g++.dg/template/typename19.C    (.../tags/gcc_4_7_2_release)
 
43109
+++ b/src/gcc/testsuite/g++.dg/template/typename19.C    (.../branches/gcc-4_7-branch)
 
43110
@@ -0,0 +1,24 @@
 
43111
+// PR c++/56395
 
43112
+
 
43113
+struct A
 
43114
+{
 
43115
+  template <class T> struct B { };
 
43116
+};
 
43117
+
 
43118
+template <class T> struct D { };
 
43119
+
 
43120
+template <class T, class U> struct C
 
43121
+{
 
43122
+  typedef T _Type;
 
43123
+  typedef typename T::template B<_Type> _BType;
 
43124
+  D<_BType> d;
 
43125
+};
 
43126
+
 
43127
+template <class T> struct C<T,T>
 
43128
+{
 
43129
+  typedef T _Type;
 
43130
+  typedef typename T::template B<_Type> _BType;
 
43131
+  D<_BType> d;
 
43132
+};
 
43133
+
 
43134
+C<A,A> c;
41465
43135
Index: gcc/testsuite/c-c++-common/pr33763.c
41466
43136
===================================================================
41467
43137
--- a/src/gcc/testsuite/c-c++-common/pr33763.c  (.../tags/gcc_4_7_2_release)
41583
43253
===================================================================
41584
43254
--- a/src/gcc/cp/init.c (.../tags/gcc_4_7_2_release)
41585
43255
+++ b/src/gcc/cp/init.c (.../branches/gcc-4_7-branch)
41586
 
@@ -2794,7 +2794,8 @@
 
43256
@@ -254,21 +254,23 @@
 
43257
         have an upper bound of -1.  */
 
43258
       if (!tree_int_cst_equal (max_index, integer_minus_one_node))
 
43259
        {
 
43260
-         constructor_elt *ce;
 
43261
+         constructor_elt ce;
 
43262
 
 
43263
-         v = VEC_alloc (constructor_elt, gc, 1);
 
43264
-         ce = VEC_quick_push (constructor_elt, v, NULL);
 
43265
-
 
43266
          /* If this is a one element array, we just use a regular init.  */
 
43267
          if (tree_int_cst_equal (size_zero_node, max_index))
 
43268
-           ce->index = size_zero_node;
 
43269
+           ce.index = size_zero_node;
 
43270
          else
 
43271
-           ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
 
43272
-                               max_index);
 
43273
+           ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
 
43274
+                              max_index);
 
43275
 
 
43276
-         ce->value = build_zero_init_1 (TREE_TYPE (type),
 
43277
-                                        /*nelts=*/NULL_TREE,
 
43278
-                                        static_storage_p, NULL_TREE);
 
43279
+         ce.value = build_zero_init_1 (TREE_TYPE (type),
 
43280
+                                       /*nelts=*/NULL_TREE,
 
43281
+                                       static_storage_p, NULL_TREE);
 
43282
+         if (ce.value)
 
43283
+           {
 
43284
+             v = VEC_alloc (constructor_elt, gc, 1);
 
43285
+             *VEC_quick_push (constructor_elt, v, NULL) = ce;
 
43286
+           }
 
43287
        }
 
43288
 
 
43289
       /* Build a constructor to contain the initializations.  */
 
43290
@@ -449,28 +451,31 @@
 
43291
         have an upper bound of -1.  */
 
43292
       if (!tree_int_cst_equal (max_index, integer_minus_one_node))
 
43293
        {
 
43294
-         constructor_elt *ce;
 
43295
+         constructor_elt ce;
 
43296
 
 
43297
-         v = VEC_alloc (constructor_elt, gc, 1);
 
43298
-         ce = VEC_quick_push (constructor_elt, v, NULL);
 
43299
-
 
43300
          /* If this is a one element array, we just use a regular init.  */
 
43301
          if (tree_int_cst_equal (size_zero_node, max_index))
 
43302
-           ce->index = size_zero_node;
 
43303
+           ce.index = size_zero_node;
 
43304
          else
 
43305
-           ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
 
43306
-                               max_index);
 
43307
+           ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
 
43308
+                              max_index);
 
43309
 
 
43310
-         ce->value = build_value_init (TREE_TYPE (type), complain);
 
43311
+         ce.value = build_value_init (TREE_TYPE (type), complain);
 
43312
 
 
43313
-         if (ce->value == error_mark_node)
 
43314
-           return error_mark_node;
 
43315
+         if (ce.value)
 
43316
+           {
 
43317
+             if (ce.value == error_mark_node)
 
43318
+               return error_mark_node;
 
43319
 
 
43320
-         /* We shouldn't have gotten here for anything that would need
 
43321
-            non-trivial initialization, and gimplify_init_ctor_preeval
 
43322
-            would need to be fixed to allow it.  */
 
43323
-         gcc_assert (TREE_CODE (ce->value) != TARGET_EXPR
 
43324
-                     && TREE_CODE (ce->value) != AGGR_INIT_EXPR);
 
43325
+             v = VEC_alloc (constructor_elt, gc, 1);
 
43326
+             *VEC_quick_push (constructor_elt, v, NULL) = ce;
 
43327
+
 
43328
+             /* We shouldn't have gotten here for anything that would need
 
43329
+                non-trivial initialization, and gimplify_init_ctor_preeval
 
43330
+                would need to be fixed to allow it.  */
 
43331
+             gcc_assert (TREE_CODE (ce.value) != TARGET_EXPR
 
43332
+                         && TREE_CODE (ce.value) != AGGR_INIT_EXPR);
 
43333
+           }
 
43334
        }
 
43335
 
 
43336
       /* Build a constructor to contain the initializations.  */
 
43337
@@ -2794,7 +2799,8 @@
41587
43338
 
41588
43339
       orig_placement = make_tree_vector_copy (*placement);
41589
43340
       orig_nelts = nelts;
41593
43344
 
41594
43345
       make_args_non_dependent (*placement);
41595
43346
       if (nelts)
41596
 
@@ -3150,8 +3151,7 @@
 
43347
@@ -3150,8 +3156,7 @@
41597
43348
   if (TREE_CODE (atype) == ARRAY_TYPE && TYPE_DOMAIN (atype))
41598
43349
     maxindex = array_type_nelts (atype);
41599
43350
 
41603
43354
     return error_mark_node;
41604
43355
 
41605
43356
   if (explicit_value_init_p)
41606
 
@@ -3501,7 +3501,9 @@
 
43357
@@ -3335,9 +3340,12 @@
 
43358
              else
 
43359
                {
 
43360
                  if (do_static_init)
 
43361
-                   CONSTRUCTOR_APPEND_ELT (new_vec, field,
 
43362
-                                           build_zero_init (TREE_TYPE (e),
 
43363
-                                                            NULL_TREE, true));
 
43364
+                   {
 
43365
+                     tree value = build_zero_init (TREE_TYPE (e), NULL_TREE,
 
43366
+                                                   true);
 
43367
+                     if (value)
 
43368
+                       CONSTRUCTOR_APPEND_ELT (new_vec, field, value);
 
43369
+                   }
 
43370
                  saw_non_const = true;
 
43371
                }
 
43372
            }
 
43373
@@ -3501,7 +3509,9 @@
41607
43374
       if (TREE_CODE (type) == ARRAY_TYPE)
41608
43375
        m = cp_build_binary_op (input_location,
41609
43376
                                MULT_EXPR, m,
41657
43424
===================================================================
41658
43425
--- a/src/gcc/cp/decl.c (.../tags/gcc_4_7_2_release)
41659
43426
+++ b/src/gcc/cp/decl.c (.../branches/gcc-4_7-branch)
 
43427
@@ -917,7 +917,7 @@
 
43428
          if (!DECL_LANG_SPECIFIC (decl))
 
43429
            retrofit_lang_decl (decl);
 
43430
          DECL_LANG_SPECIFIC (decl)->u.base.u2sel = 1;
 
43431
-         if (DECL_LANG_SPECIFIC (t))
 
43432
+         if (DECL_DISCRIMINATOR_SET_P (t))
 
43433
            DECL_DISCRIMINATOR (decl) = DECL_DISCRIMINATOR (t) + 1;
 
43434
          else
 
43435
            DECL_DISCRIMINATOR (decl) = 1;
41660
43436
@@ -5556,7 +5556,9 @@
41661
43437
       if ((type_build_ctor_call (type) || CLASS_TYPE_P (type))
41662
43438
          && !(flags & LOOKUP_ALREADY_DIGESTED)
41908
43684
 
41909
43685
 tree
41910
43686
 strip_typedefs (tree t)
41911
 
@@ -1187,6 +1211,16 @@
41912
 
                                   TYPENAME_TYPE_FULLNAME (t),
41913
 
                                   typename_type, tf_none);
 
43687
@@ -1183,10 +1207,46 @@
 
43688
       }
 
43689
       break;
 
43690
     case TYPENAME_TYPE:
 
43691
-      result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
 
43692
-                                  TYPENAME_TYPE_FULLNAME (t),
 
43693
-                                  typename_type, tf_none);
 
43694
+      {
 
43695
+       tree fullname = TYPENAME_TYPE_FULLNAME (t);
 
43696
+       if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
 
43697
+         {
 
43698
+           tree args = TREE_OPERAND (fullname, 1);
 
43699
+           tree new_args = copy_node (args);
 
43700
+           bool changed = false;
 
43701
+           int i;
 
43702
+           for (i = 0; i < TREE_VEC_LENGTH (args); ++i)
 
43703
+             {
 
43704
+               tree arg = TREE_VEC_ELT (args, i);
 
43705
+               tree strip_arg;
 
43706
+               if (TYPE_P (arg))
 
43707
+                 strip_arg = strip_typedefs (arg);
 
43708
+               else
 
43709
+                 strip_arg = strip_typedefs_expr (arg);
 
43710
+               TREE_VEC_ELT (new_args, i) = strip_arg;
 
43711
+               if (strip_arg != arg)
 
43712
+                 changed = true;
 
43713
+             }
 
43714
+           if (changed)
 
43715
+             fullname = lookup_template_function (TREE_OPERAND (fullname, 0),
 
43716
+                                                  new_args);
 
43717
+           else
 
43718
+             ggc_free (new_args);
 
43719
+         }
 
43720
+       result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
 
43721
+                                    fullname, typename_type, tf_none);
 
43722
+      }
41914
43723
       break;
41915
43724
+    case DECLTYPE_TYPE:
41916
43725
+      result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t));
41925
43734
     default:
41926
43735
       break;
41927
43736
     }
41928
 
@@ -1208,6 +1242,188 @@
 
43737
@@ -1208,6 +1268,188 @@
41929
43738
   return cp_build_qualified_type (result, cp_type_quals (t));
41930
43739
 }
41931
43740
 
42114
43923
 /* Makes a copy of BINFO and TYPE, which is to be inherited into a
42115
43924
    graph dominated by T.  If BINFO is NULL, TYPE is a dependent base,
42116
43925
    and we do a shallow copy.  If BINFO is non-NULL, we do a deep copy.
42117
 
@@ -2181,7 +2397,7 @@
 
43926
@@ -2181,7 +2423,7 @@
42118
43927
       /* Classes and namespaces inside anonymous namespaces have
42119
43928
          TREE_PUBLIC == 0, so we can shortcut the search.  */
42120
43929
       else if (TYPE_P (decl))
42123
43932
       else if (TREE_CODE (decl) == NAMESPACE_DECL)
42124
43933
        return (TREE_PUBLIC (decl) == 0);
42125
43934
       else
42126
 
@@ -2353,6 +2569,13 @@
 
43935
@@ -2353,6 +2595,13 @@
42127
43936
         with an out-of-class definition of the function, but can also come
42128
43937
         up for expressions that involve 'this' in a member function
42129
43938
         template.  */
42137
43946
       if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
42138
43947
        {
42139
43948
          if (DECL_ARTIFICIAL (t1) ^ DECL_ARTIFICIAL (t2))
42140
 
@@ -2366,6 +2589,7 @@
 
43949
@@ -2366,6 +2615,7 @@
42141
43950
 
42142
43951
     case VAR_DECL:
42143
43952
     case CONST_DECL:
42145
43954
     case FUNCTION_DECL:
42146
43955
     case TEMPLATE_DECL:
42147
43956
     case IDENTIFIER_NODE:
42148
 
@@ -2380,9 +2604,6 @@
 
43957
@@ -2380,9 +2630,6 @@
42149
43958
                                BASELINK_FUNCTIONS (t2)));
42150
43959
 
42151
43960
     case TEMPLATE_PARM_INDEX:
42159
43968
===================================================================
42160
43969
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_7_2_release)
42161
43970
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_7-branch)
42162
 
@@ -1,3 +1,252 @@
 
43971
@@ -1,3 +1,304 @@
 
43972
+2013-02-22  Jason Merrill  <jason@redhat.com>
 
43973
+
 
43974
+       PR c++/40405
 
43975
+       * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
 
43976
+       if we got the wrong number of template parms.
 
43977
+
 
43978
+       PR c++/56395
 
43979
+       * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
 
43980
+       args.
 
43981
+
 
43982
+2013-02-19  Jakub Jelinek  <jakub@redhat.com>
 
43983
+
 
43984
+       Backported from mainline
 
43985
+       2013-02-07  Jakub Jelinek  <jakub@redhat.com>
 
43986
+
 
43987
+       PR c++/56241
 
43988
+       * init.c (build_vec_init): Don't append NULL values into new_vec.
 
43989
+       (build_zero_init_1): Don't push anything into v if recursive call
 
43990
+       returned NULL_TREE.
 
43991
+       (build_value_init_noctor): Don't push anything into v if
 
43992
+       build_value_init call returned NULL_TREE.
 
43993
+
 
43994
+       PR c++/56239
 
43995
+       * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
 
43996
+       (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
 
43997
+       to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
 
43998
+       return true only if 2nd token isn't CPP_CLOSE_PAREN.
 
43999
+       (cp_parser_cast_expression): Adjust caller.
 
44000
+
 
44001
+       PR c++/56237
 
44002
+       * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
 
44003
+       only if DECL_DISCRIMINATOR_SET_P (t) rather than just
 
44004
+       DECL_LANG_SPECIFIC (t).
 
44005
+
 
44006
+2013-02-15  Jason Merrill  <jason@redhat.com>
 
44007
+
 
44008
+       PR c++/54276
 
44009
+       * semantics.c (finish_id_expression): Also return the identifier
 
44010
+       for an outer local static.
 
44011
+
 
44012
+       PR c++/52026
 
44013
+       * semantics.c (finish_id_expression): In a template, return
 
44014
+       the identifier for a constant variable.
 
44015
+
 
44016
+       PR c++/55710
 
44017
+       * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
 
44018
+       TREE_USED.
 
44019
+
 
44020
+       PR c++/56135
 
44021
+       * pt.c (tsubst_copy_and_build): Don't forget any new
 
44022
+       captures that arose from use of dependent names.
 
44023
+
42163
44024
+2013-02-12  Jason Merrill  <jason@redhat.com>
42164
44025
+
42165
44026
+       PR c++/56291
42907
44768
        return true;
42908
44769
     }
42909
44770
   return false;
42910
 
@@ -6609,7 +6289,7 @@
 
44771
@@ -5060,6 +4740,8 @@
 
44772
                  error ("got %d template parameters for %q#T",
 
44773
                         TREE_VEC_LENGTH (a), current);
 
44774
                error ("  but %d required", TREE_VEC_LENGTH (t));
 
44775
+               /* Avoid crash in import_export_decl.  */
 
44776
+               DECL_INTERFACE_KNOWN (decl) = 1;
 
44777
                return error_mark_node;
 
44778
              }
 
44779
 
 
44780
@@ -6609,7 +6291,7 @@
42911
44781
           argument specification is valid.  */
42912
44782
        val = convert_nontype_argument (t, orig_arg, complain);
42913
44783
       else
42916
44786
 
42917
44787
       if (val == NULL_TREE)
42918
44788
        val = error_mark_node;
42919
 
@@ -9195,13 +8875,8 @@
 
44789
@@ -9195,13 +8877,8 @@
42920
44790
              LAMBDA_EXPR_RETURN_TYPE (lambda) = NULL_TREE;
42921
44791
            }
42922
44792
 
42930
44800
        }
42931
44801
       else
42932
44802
        gcc_assert (errorcount);
42933
 
@@ -10498,10 +10173,9 @@
 
44803
@@ -10498,10 +10175,9 @@
42934
44804
                 /* Get the Ith type.  */
42935
44805
                 type = TREE_VEC_ELT (expanded_types, i);
42936
44806
 
42944
44814
               }
42945
44815
             else if (!type)
42946
44816
               /* We're dealing with a normal parameter.  */
42947
 
@@ -10867,11 +10541,14 @@
 
44817
@@ -10867,11 +10543,14 @@
42948
44818
   return r;
42949
44819
 }
42950
44820
 
42960
44830
                  tsubst_flags_t complain,
42961
44831
                  tree in_decl)
42962
44832
 {
42963
 
@@ -10881,11 +10558,11 @@
 
44833
@@ -10881,11 +10560,11 @@
42964
44834
   tree expanded_args = NULL_TREE;
42965
44835
   tree default_arg;
42966
44836
 
42974
44844
   if (remaining_arg_types == error_mark_node)
42975
44845
     return error_mark_node;
42976
44846
 
42977
 
@@ -11010,7 +10687,7 @@
 
44847
@@ -11010,7 +10689,7 @@
42978
44848
     }
42979
44849
 
42980
44850
   /* Substitute the argument types.  */
42983
44853
                                complain, in_decl);
42984
44854
   if (arg_types == error_mark_node)
42985
44855
     return error_mark_node;
42986
 
@@ -11067,7 +10744,7 @@
 
44856
@@ -11067,7 +10746,7 @@
42987
44857
     {
42988
44858
       /* A noexcept-specifier.  */
42989
44859
       tree expr = TREE_PURPOSE (specs);
42992
44862
        new_specs = expr;
42993
44863
       else if (defer_ok)
42994
44864
        {
42995
 
@@ -11239,8 +10916,13 @@
 
44865
@@ -11239,8 +10918,13 @@
42996
44866
          return r;
42997
44867
        }
42998
44868
       else
43008
44878
     }
43009
44879
 
43010
44880
   if (type
43011
 
@@ -12930,6 +12612,12 @@
 
44881
@@ -12930,6 +12614,12 @@
43012
44882
                else if (is_capture_proxy (DECL_EXPR_DECL (t)))
43013
44883
                  {
43014
44884
                    DECL_CONTEXT (decl) = current_function_decl;
43021
44891
                    insert_capture_proxy (decl);
43022
44892
                  }
43023
44893
                else
43024
 
@@ -14431,6 +14119,7 @@
43025
 
           wait until after we finish instantiating the type.  */
 
44894
@@ -14428,9 +14118,12 @@
 
44895
        complete_type (type);
 
44896
 
 
44897
        /* The capture list refers to closure members, so this needs to
 
44898
-          wait until after we finish instantiating the type.  */
 
44899
+          wait until after we finish instantiating the type.  Also keep
 
44900
+          any captures that may have been added during instantiation.  */
43026
44901
        LAMBDA_EXPR_CAPTURE_LIST (r)
43027
 
          = RECUR (LAMBDA_EXPR_CAPTURE_LIST (t));
 
44902
-         = RECUR (LAMBDA_EXPR_CAPTURE_LIST (t));
 
44903
+         = chainon (RECUR (LAMBDA_EXPR_CAPTURE_LIST (t)),
 
44904
+                    LAMBDA_EXPR_CAPTURE_LIST (r));
43028
44905
+       LAMBDA_EXPR_THIS_CAPTURE (r) = NULL_TREE;
43029
44906
 
43030
44907
        return build_lambda_object (r);
43031
44908
       }
43032
 
@@ -14438,10 +14127,8 @@
 
44909
@@ -14438,10 +14131,8 @@
43033
44910
     case TARGET_EXPR:
43034
44911
       /* We can get here for a constant initializer of non-dependent type.
43035
44912
          FIXME stop folding in cp_parser_initializer_clause.  */
43040
44917
        return r;
43041
44918
       }
43042
44919
 
43043
 
@@ -15388,13 +15075,19 @@
 
44920
@@ -15388,13 +15079,19 @@
43044
44921
                                 ? tf_warning_or_error
43045
44922
                                 : tf_none);
43046
44923
 
43062
44939
          if (targ || tparm == error_mark_node)
43063
44940
            continue;
43064
44941
          tparm = TREE_VALUE (tparm);
43065
 
@@ -15407,25 +15100,7 @@
 
44942
@@ -15407,25 +15104,7 @@
43066
44943
              && uses_template_parms (TREE_TYPE (tparm))
43067
44944
              && !saw_undeduced++)
43068
44945
            goto again;
43088
44965
          /* Core issue #226 (C++0x) [temp.deduct]:
43089
44966
 
43090
44967
             If a template argument has not been deduced, its
43091
 
@@ -16592,6 +16267,7 @@
 
44968
@@ -16592,6 +16271,7 @@
43092
44969
          && !TEMPLATE_PARM_PARAMETER_PACK (parm))
43093
44970
        return unify_parameter_pack_mismatch (explain_p, parm, arg);
43094
44971
 
43096
44973
       TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = arg;
43097
44974
       return unify_success (explain_p);
43098
44975
 
43099
 
@@ -17079,12 +16755,9 @@
 
44976
@@ -17079,12 +16759,9 @@
43100
44977
       }
43101
44978
   if (found)
43102
44979
     {
43112
44989
     }
43113
44990
   return false;
43114
44991
 }
43115
 
@@ -18421,12 +18094,14 @@
 
44992
@@ -18421,12 +18098,14 @@
43116
44993
       if (push_tinst_level (fn))
43117
44994
        {
43118
44995
          push_access_scope (fn);
43127
45004
          pop_access_scope (fn);
43128
45005
          pop_tinst_level ();
43129
45006
          spec = build_noexcept_spec (noex, tf_warning_or_error);
43130
 
@@ -20132,7 +19807,16 @@
 
45007
@@ -20132,7 +19811,16 @@
43131
45008
   /* If the SCOPE is itself a TYPENAME_TYPE, then we need to resolve
43132
45009
      it first before we can figure out what NAME refers to.  */
43133
45010
   if (TREE_CODE (scope) == TYPENAME_TYPE)
43145
45022
   /* If we don't know what SCOPE refers to, then we cannot resolve the
43146
45023
      TYPENAME_TYPE.  */
43147
45024
   if (TREE_CODE (scope) == TYPENAME_TYPE)
43148
 
@@ -20325,7 +20009,7 @@
 
45025
@@ -20325,7 +20013,7 @@
43149
45026
   TYPE_STUB_DECL (au) = TYPE_NAME (au);
43150
45027
   TEMPLATE_TYPE_PARM_INDEX (au) = build_template_parm_index
43151
45028
     (0, processing_template_decl + 1, processing_template_decl + 1,
43158
45035
===================================================================
43159
45036
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_7_2_release)
43160
45037
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_7-branch)
43161
 
@@ -5351,6 +5351,7 @@
 
45038
@@ -2822,18 +2822,26 @@
 
45039
   return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
 
45040
 }
 
45041
 
 
45042
-/* Returns true iff DECL is an automatic variable from a function outside
 
45043
+/* Returns true iff DECL is a variable from a function outside
 
45044
    the current one.  */
 
45045
 
 
45046
 static bool
 
45047
-outer_automatic_var_p (tree decl)
 
45048
+outer_var_p (tree decl)
 
45049
 {
 
45050
   return ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL)
 
45051
          && DECL_FUNCTION_SCOPE_P (decl)
 
45052
-         && !TREE_STATIC (decl)
 
45053
          && DECL_CONTEXT (decl) != current_function_decl);
 
45054
 }
 
45055
 
 
45056
+/* As above, but also checks that DECL is automatic.  */
 
45057
+
 
45058
+static bool
 
45059
+outer_automatic_var_p (tree decl)
 
45060
+{
 
45061
+  return (outer_var_p (decl)
 
45062
+         && !TREE_STATIC (decl));
 
45063
+}
 
45064
+
 
45065
 /* ID_EXPRESSION is a representation of parsed, but unprocessed,
 
45066
    id-expression.  (See cp_parser_id_expression for details.)  SCOPE,
 
45067
    if non-NULL, is the type or namespace used to explicitly qualify
 
45068
@@ -2940,10 +2948,19 @@
 
45069
 
 
45070
       /* Disallow uses of local variables from containing functions, except
 
45071
         within lambda-expressions.  */
 
45072
-      if (outer_automatic_var_p (decl)
 
45073
+      if (!outer_var_p (decl)
 
45074
          /* It's not a use (3.2) if we're in an unevaluated context.  */
 
45075
-         && !cp_unevaluated_operand)
 
45076
+         || cp_unevaluated_operand)
 
45077
+       /* OK.  */;
 
45078
+      else if (TREE_STATIC (decl))
 
45079
        {
 
45080
+         if (processing_template_decl)
 
45081
+           /* For a use of an outer static var, return the identifier so
 
45082
+              that we'll look it up again in the instantiation.  */
 
45083
+           return id_expression;
 
45084
+       }
 
45085
+      else
 
45086
+       {
 
45087
          tree context = DECL_CONTEXT (decl);
 
45088
          tree containing_function = current_function_decl;
 
45089
          tree lambda_stack = NULL_TREE;
 
45090
@@ -2961,7 +2978,14 @@
 
45091
 
 
45092
             FIXME update for final resolution of core issue 696.  */
 
45093
          if (decl_constant_var_p (decl))
 
45094
-           return integral_constant_value (decl);
 
45095
+           {
 
45096
+             if (processing_template_decl)
 
45097
+               /* In a template, the constant value may not be in a usable
 
45098
+                  form, so look it up again at instantiation time.  */
 
45099
+               return id_expression;
 
45100
+             else
 
45101
+               return integral_constant_value (decl);
 
45102
+           }
 
45103
 
 
45104
          /* If we are in a lambda function, we can move out until we hit
 
45105
             1. the context,
 
45106
@@ -5351,6 +5375,7 @@
43162
45107
       else if (copy_fn_p (fn) <= 0)
43163
45108
        continue;
43164
45109
 
43166
45111
       if (!TYPE_NOTHROW_P (TREE_TYPE (fn)))
43167
45112
        return false;
43168
45113
     }
43169
 
@@ -5392,7 +5393,8 @@
 
45114
@@ -5392,7 +5417,8 @@
43170
45115
       return (trait_expr_value (CPTK_HAS_TRIVIAL_CONSTRUCTOR, type1, type2) 
43171
45116
              || (CLASS_TYPE_P (type1)
43172
45117
                  && (t = locate_ctor (type1))
43176
45121
 
43177
45122
     case CPTK_HAS_TRIVIAL_CONSTRUCTOR:
43178
45123
       type1 = strip_array_types (type1);
43179
 
@@ -5785,15 +5787,19 @@
 
45124
@@ -5785,15 +5811,19 @@
43180
45125
       member = TREE_OPERAND (t, 0);
43181
45126
       init = unshare_expr (TREE_OPERAND (t, 1));
43182
45127
     }
43198
45143
   if (TREE_CODE (member) == INDIRECT_REF)
43199
45144
     member = TREE_OPERAND (member, 0);
43200
45145
   if (TREE_CODE (member) == NOP_EXPR)
43201
 
@@ -5879,31 +5885,38 @@
 
45146
@@ -5879,31 +5909,38 @@
43202
45147
 /* VEC is a vector of constructor elements built up for the base and member
43203
45148
    initializers of a constructor for TYPE.  They need to be in increasing
43204
45149
    offset order, which they might not be yet if TYPE has a primary base
43250
45195
   return vec;
43251
45196
 }
43252
45197
 
43253
 
@@ -7682,6 +7695,7 @@
 
45198
@@ -7682,6 +7719,7 @@
43254
45199
            /* Check that the LHS is constant and then discard it.  */
43255
45200
            cxx_eval_constant_expression (call, op0, allow_non_constant,
43256
45201
                                          false, non_constant_p);
43258
45203
            r = cxx_eval_constant_expression (call, op1, allow_non_constant,
43259
45204
                                              addr, non_constant_p);
43260
45205
          }
43261
 
@@ -9310,6 +9324,8 @@
 
45206
@@ -9310,6 +9348,8 @@
43262
45207
   DECL_NOT_REALLY_EXTERN (fn) = 1;
43263
45208
   DECL_DECLARED_INLINE_P (fn) = 1;
43264
45209
   DECL_ARGUMENTS (fn) = build_this_parm (fntype, TYPE_QUAL_CONST);
43267
45212
 
43268
45213
   add_method (type, fn, NULL_TREE);
43269
45214
 
43270
 
@@ -9340,6 +9356,8 @@
 
45215
@@ -9340,6 +9380,8 @@
43271
45216
   DECL_ARGUMENTS (fn) = copy_list (DECL_CHAIN (DECL_ARGUMENTS (callop)));
43272
45217
   for (arg = DECL_ARGUMENTS (fn); arg; arg = DECL_CHAIN (arg))
43273
45218
     DECL_CONTEXT (arg) = fn;
43276
45221
 
43277
45222
   add_method (type, fn, NULL_TREE);
43278
45223
 
 
45224
@@ -9392,6 +9434,8 @@
 
45225
   body = begin_function_body ();
 
45226
   compound_stmt = begin_compound_stmt (0);
 
45227
 
 
45228
+  /* decl_needed_p needs to see that it's used.  */
 
45229
+  TREE_USED (statfn) = 1;
 
45230
   finish_return_stmt (decay_conversion (statfn));
 
45231
 
 
45232
   finish_compound_stmt (compound_stmt);
43279
45233
Index: gcc/cp/decl2.c
43280
45234
===================================================================
43281
45235
--- a/src/gcc/cp/decl2.c        (.../tags/gcc_4_7_2_release)
43327
45281
===================================================================
43328
45282
--- a/src/gcc/cp/parser.c       (.../tags/gcc_4_7_2_release)
43329
45283
+++ b/src/gcc/cp/parser.c       (.../branches/gcc-4_7-branch)
43330
 
@@ -11967,8 +11967,7 @@
 
45284
@@ -7010,8 +7010,9 @@
 
45285
    otherwise.  */
 
45286
 
 
45287
 static bool
 
45288
-cp_parser_token_starts_cast_expression (cp_token *token)
 
45289
+cp_parser_tokens_start_cast_expression (cp_parser *parser)
 
45290
 {
 
45291
+  cp_token *token = cp_lexer_peek_token (parser->lexer);
 
45292
   switch (token->type)
 
45293
     {
 
45294
     case CPP_COMMA:
 
45295
@@ -7052,6 +7053,12 @@
 
45296
     case CPP_EOF:
 
45297
       return false;
 
45298
 
 
45299
+    case CPP_OPEN_PAREN:
 
45300
+      /* In ((type ()) () the last () isn't a valid cast-expression,
 
45301
+        so the whole must be parsed as postfix-expression.  */
 
45302
+      return cp_lexer_peek_nth_token (parser->lexer, 2)->type
 
45303
+            != CPP_CLOSE_PAREN;
 
45304
+
 
45305
       /* '[' may start a primary-expression in obj-c++.  */
 
45306
     case CPP_OPEN_SQUARE:
 
45307
       return c_dialect_objc ();
 
45308
@@ -7144,8 +7151,7 @@
 
45309
         parenthesized ctor such as `(T ())' that looks like a cast to
 
45310
         function returning T.  */
 
45311
       if (!cp_parser_error_occurred (parser)
 
45312
-         && cp_parser_token_starts_cast_expression (cp_lexer_peek_token
 
45313
-                                                    (parser->lexer)))
 
45314
+         && cp_parser_tokens_start_cast_expression (parser))
 
45315
        {
 
45316
          cp_parser_parse_definitely (parser);
 
45317
          expr = cp_parser_cast_expression (parser,
 
45318
@@ -11967,8 +11973,7 @@
43331
45319
                                                parm_loc,
43332
45320
                                                parameter,
43333
45321
                                                is_non_type,
43337
45325
       else
43338
45326
        {
43339
45327
          tree err_parm = build_tree_list (parameter, parameter);
43340
 
@@ -17665,13 +17664,17 @@
 
45328
@@ -17665,13 +17670,17 @@
43341
45329
               && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE))
43342
45330
        {
43343
45331
          /* In C++11, [ could start a lambda-introducer.  */
43356
45344
        }
43357
45345
       else
43358
45346
        designator = NULL_TREE;
43359
 
@@ -21134,7 +21137,6 @@
 
45347
@@ -21134,7 +21143,6 @@
43360
45348
     {
43361
45349
       /* Parse the template parameters.  */
43362
45350
       parameter_list = cp_parser_template_parameter_list (parser);
47317
49305
===================================================================
47318
49306
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_7_2_release)
47319
49307
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_7-branch)
47320
 
@@ -1,3 +1,126 @@
 
49308
@@ -1,3 +1,142 @@
 
49309
+2013-02-21  Jakub Jelinek  <jakub@redhat.com>
 
49310
+
 
49311
+       PR bootstrap/56258
 
49312
+       * gnat-style.texi (@title): Remove @hfill.
 
49313
+       * projects.texi: Avoid line wrapping inside of @pxref or
 
49314
+       @xref.
 
49315
+
 
49316
+2013-02-20  Eric Botcazou  <ebotcazou@adacore.com>
 
49317
+
 
49318
+       PR ada/56271
 
49319
+       Backport from mainline
 
49320
+       2012-05-15  Olivier Hainque  <hainque@adacore.com>
 
49321
+
 
49322
+       * gcc-interface/Make-lang.in (COMMON_FLAGS_TO_PASS): Use WARN_CFLAGS
 
49323
+       instead of trying to mimic it.
 
49324
+
47321
49325
+2013-02-14  Rainer Emrich  <rainer@emrich-ebersheim.de>
47322
49326
+
47323
49327
+       Back-port from mainline.
47758
49762
===================================================================
47759
49763
--- a/src/gcc/ada/gcc-interface/Make-lang.in    (.../tags/gcc_4_7_2_release)
47760
49764
+++ b/src/gcc/ada/gcc-interface/Make-lang.in    (.../branches/gcc-4_7-branch)
 
49765
@@ -68,7 +68,7 @@
 
49766
 THREAD_KIND=native
 
49767
 TRACE=no
 
49768
 # We do not want the WARN_CFLAGS of the compiler in Ada as it is for C/C++.
 
49769
-COMMON_FLAGS_TO_PASS = $(filter-out -pedantic -W%, $(FLAGS_TO_PASS))
 
49770
+COMMON_FLAGS_TO_PASS = $(filter-out $(WARN_CFLAGS), $(FLAGS_TO_PASS))
 
49771
 ADA_FLAGS_TO_PASS = \
 
49772
        "ADA_FOR_BUILD=$(ADA_FOR_BUILD)"        \
 
49773
        "ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)"    \
47761
49774
@@ -1225,33 +1225,20 @@
47762
49775
 ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads
47763
49776
        $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
48512
50525
       if (!sym->attr.pointer
48513
50526
            && sym->as
48514
50527
            && sym->as->type != AS_ASSUMED_SHAPE 
 
50528
@@ -7398,8 +7392,8 @@
 
50529
          called_dealloc_with_status = false;
 
50530
          gfc_init_block (&tmpblock);
 
50531
 
 
50532
-         if (c->attr.allocatable
 
50533
-             && (c->attr.dimension || c->attr.codimension))
 
50534
+         if (c->attr.allocatable && (c->attr.dimension || c->attr.codimension)
 
50535
+             && !c->attr.proc_pointer)
 
50536
            {
 
50537
              comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
 
50538
                                      decl, cdecl, NULL_TREE);
 
50539
@@ -7581,7 +7575,8 @@
 
50540
              continue;
 
50541
            }
 
50542
 
 
50543
-         if (c->attr.allocatable && !cmp_has_alloc_comps)
 
50544
+         if (c->attr.allocatable && !c->attr.proc_pointer
 
50545
+             && !cmp_has_alloc_comps)
 
50546
            {
 
50547
              rank = c->as ? c->as->rank : 0;
 
50548
              tmp = gfc_duplicate_allocatable (dcmp, comp, ctype, rank);
 
50549
Index: gcc/fortran/symbol.c
 
50550
===================================================================
 
50551
--- a/src/gcc/fortran/symbol.c  (.../tags/gcc_4_7_2_release)
 
50552
+++ b/src/gcc/fortran/symbol.c  (.../branches/gcc-4_7-branch)
 
50553
@@ -2650,6 +2650,11 @@
 
50554
       if (!parent_flag)
 
50555
        break;
 
50556
 
 
50557
+      /* Don't escape an interface block.  */
 
50558
+      if (ns && !ns->has_import_set
 
50559
+          && ns->proc_name && ns->proc_name->attr.if_source == IFSRC_IFBODY)
 
50560
+       break;
 
50561
+
 
50562
       ns = ns->parent;
 
50563
     }
 
50564
   while (ns != NULL);
 
50565
@@ -2808,17 +2813,14 @@
 
50566
       return i;
 
50567
     }
 
50568
 
 
50569
-  if (gfc_current_ns->parent != NULL)
 
50570
+  i = gfc_find_sym_tree (name, gfc_current_ns, 1, &st);
 
50571
+  if (i)
 
50572
+    return i;
 
50573
+
 
50574
+  if (st != NULL)
 
50575
     {
 
50576
-      i = gfc_find_sym_tree (name, gfc_current_ns->parent, 1, &st);
 
50577
-      if (i)
 
50578
-       return i;
 
50579
-
 
50580
-      if (st != NULL)
 
50581
-       {
 
50582
-         *result = st;
 
50583
-         return 0;
 
50584
-       }
 
50585
+      *result = st;
 
50586
+      return 0;
 
50587
     }
 
50588
 
 
50589
   return gfc_get_sym_tree (name, gfc_current_ns, result, false);
48515
50590
Index: gcc/fortran/class.c
48516
50591
===================================================================
48517
50592
--- a/src/gcc/fortran/class.c   (.../tags/gcc_4_7_2_release)
48569
50644
===================================================================
48570
50645
--- a/src/gcc/fortran/decl.c    (.../tags/gcc_4_7_2_release)
48571
50646
+++ b/src/gcc/fortran/decl.c    (.../branches/gcc-4_7-branch)
48572
 
@@ -5896,6 +5896,8 @@
 
50647
@@ -1949,30 +1949,6 @@
 
50648
       goto cleanup;
 
50649
     }
 
50650
 
 
50651
-  /* An interface body specifies all of the procedure's
 
50652
-     characteristics and these shall be consistent with those
 
50653
-     specified in the procedure definition, except that the interface
 
50654
-     may specify a procedure that is not pure if the procedure is
 
50655
-     defined to be pure(12.3.2).  */
 
50656
-  if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
 
50657
-      && gfc_current_ns->proc_name
 
50658
-      && gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
 
50659
-      && current_ts.u.derived->ns != gfc_current_ns)
 
50660
-    {
 
50661
-      gfc_symtree *st;
 
50662
-      st = gfc_find_symtree (gfc_current_ns->sym_root, current_ts.u.derived->name);
 
50663
-      if (!(current_ts.u.derived->attr.imported
 
50664
-               && st != NULL
 
50665
-               && gfc_find_dt_in_generic (st->n.sym) == current_ts.u.derived)
 
50666
-           && !gfc_current_ns->has_import_set)
 
50667
-       {
 
50668
-           gfc_error ("The type of '%s' at %C has not been declared within the "
 
50669
-                      "interface", name);
 
50670
-           m = MATCH_ERROR;
 
50671
-           goto cleanup;
 
50672
-       }
 
50673
-    }
 
50674
-    
 
50675
   if (check_function_name (name) == FAILURE)
 
50676
     {
 
50677
       m = MATCH_ERROR;
 
50678
@@ -3160,14 +3136,14 @@
 
50679
              return MATCH_ERROR;
 
50680
            }
 
50681
 
 
50682
-         if (gfc_find_symtree (gfc_current_ns->sym_root,name))
 
50683
+         if (gfc_find_symtree (gfc_current_ns->sym_root, name))
 
50684
            {
 
50685
              gfc_warning ("'%s' is already IMPORTed from host scoping unit "
 
50686
                           "at %C.", name);
 
50687
              goto next_item;
 
50688
            }
 
50689
 
 
50690
-         st = gfc_new_symtree (&gfc_current_ns->sym_root, sym->name);
 
50691
+         st = gfc_new_symtree (&gfc_current_ns->sym_root, name);
 
50692
          st->n.sym = sym;
 
50693
          sym->refs++;
 
50694
          sym->attr.imported = 1;
 
50695
@@ -3179,8 +3155,8 @@
 
50696
                 lower-case name contains the associated generic function. */
 
50697
              st = gfc_new_symtree (&gfc_current_ns->sym_root,
 
50698
                        gfc_get_string ("%c%s",
 
50699
-                               (char) TOUPPER ((unsigned char) sym->name[0]),
 
50700
-                               &sym->name[1]));
 
50701
+                               (char) TOUPPER ((unsigned char) name[0]),
 
50702
+                               &name[1]));
 
50703
              st->n.sym = sym;
 
50704
              sym->refs++;
 
50705
              sym->attr.imported = 1;
 
50706
@@ -4231,7 +4207,7 @@
 
50707
        goto ok;
 
50708
 
 
50709
       gfc_find_symbol (current_ts.u.derived->name,
 
50710
-                      current_ts.u.derived->ns->parent, 1, &sym);
 
50711
+                      current_ts.u.derived->ns, 1, &sym);
 
50712
 
 
50713
       /* Any symbol that we find had better be a type definition
 
50714
         which has its components defined.  */
 
50715
@@ -5896,6 +5872,8 @@
48573
50716
   const char *target;
48574
50717
   int eos_ok;
48575
50718
   match m;
48578
50721
 
48579
50722
   old_loc = gfc_current_locus;
48580
50723
   if (gfc_match ("end") != MATCH_YES)
48581
 
@@ -6121,6 +6123,35 @@
 
50724
@@ -6121,6 +6099,35 @@
48582
50725
 
48583
50726
 cleanup:
48584
50727
   gfc_current_locus = old_loc;
48648
50791
===================================================================
48649
50792
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_7_2_release)
48650
50793
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch)
48651
 
@@ -1,3 +1,112 @@
 
50794
@@ -1,3 +1,140 @@
 
50795
+2013-02-22  Janus Weil  <janus@gcc.gnu.org>
 
50796
+
 
50797
+       PR fortran/56385
 
50798
+       * trans-array.c (structure_alloc_comps): Handle procedure-pointer
 
50799
+       components with allocatable result.
 
50800
+
 
50801
+2013-02-17  Tobias Burnus  <burnus@net-b.de>
 
50802
+           Mikael Morin  <mikael@gcc.gnu.org>
 
50803
+
 
50804
+       Backport from trunk
 
50805
+       2013-01-28  Tobias Burnus  <burnus@net-b.de>
 
50806
+                   Mikael Morin  <mikael@gcc.gnu.org>
 
50807
+
 
50808
+       PR fortran/53537
 
50809
+       * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
 
50810
+       interface block.
 
50811
+       (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
 
50812
+       * decl.c (gfc_match_data_decl): Ditto.
 
50813
+       (variable_decl): Remove undeclared type error.
 
50814
+       (gfc_match_import): Use renamed instead of original name.
 
50815
+
 
50816
+2013-02-15  Tobias Burnus  <burnus@net-b.de>
 
50817
+           Mikael Morin  <mikael@gcc.gnu.org>
 
50818
+
 
50819
+       PR fortran/56318
 
50820
+       * simplify.c (gfc_simplify_matmul): Fix result shape
 
50821
+       and matmul result.
 
50822
+
48652
50823
+2013-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
48653
50824
+
48654
50825
+       Backport from trunk
48761
50932
 2012-09-20  Release Manager
48762
50933
 
48763
50934
        * GCC 4.7.2 released.
48764
 
@@ -547,7 +656,7 @@
 
50935
@@ -547,7 +684,7 @@
48765
50936
 
48766
50937
        PR fortran/50981
48767
50938
        * trans-array.c (gfc_walk_elemental_function_args): Fix
48770
50941
 
48771
50942
 2012-01-16  Tobias Burnus  <burnus@net-b.de>
48772
50943
 
48773
 
@@ -583,7 +692,7 @@
 
50944
@@ -583,7 +720,7 @@
48774
50945
 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
48775
50946
 
48776
50947
        * trans-array.c (gfc_trans_create_temp_array): In the case of a
49988
52159
===================================================================
49989
52160
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_7_2_release)
49990
52161
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_7-branch)
 
52162
@@ -3839,7 +3839,7 @@
 
52163
   if (matrix_a->rank == 1 && matrix_b->rank == 2)
 
52164
     {
 
52165
       result_rows = 1;
 
52166
-      result_columns = mpz_get_si (matrix_b->shape[0]);
 
52167
+      result_columns = mpz_get_si (matrix_b->shape[1]);
 
52168
       stride_a = 1;
 
52169
       stride_b = mpz_get_si (matrix_b->shape[0]);
 
52170
 
 
52171
@@ -3849,7 +3849,7 @@
 
52172
     }
 
52173
   else if (matrix_a->rank == 2 && matrix_b->rank == 1)
 
52174
     {
 
52175
-      result_rows = mpz_get_si (matrix_b->shape[0]);
 
52176
+      result_rows = mpz_get_si (matrix_a->shape[0]);
 
52177
       result_columns = 1;
 
52178
       stride_a = mpz_get_si (matrix_a->shape[0]);
 
52179
       stride_b = 1;
 
52180
@@ -3862,7 +3862,7 @@
 
52181
     {
 
52182
       result_rows = mpz_get_si (matrix_a->shape[0]);
 
52183
       result_columns = mpz_get_si (matrix_b->shape[1]);
 
52184
-      stride_a = mpz_get_si (matrix_a->shape[1]);
 
52185
+      stride_a = mpz_get_si (matrix_a->shape[0]);
 
52186
       stride_b = mpz_get_si (matrix_b->shape[0]);
 
52187
 
 
52188
       result->rank = 2;
49991
52189
@@ -5573,7 +5573,9 @@
49992
52190
       /* Otherwise, we build a new SIZE call.  This is hopefully at least
49993
52191
         simpler than the original one.  */
50290
52488
 
50291
52489
   /* Add additional cost for the peeled instructions in prologue and epilogue
50292
52490
      loop.
 
52491
@@ -4450,7 +4453,6 @@
 
52492
   if (orig_stmt)
 
52493
     {
 
52494
       orig_stmt_info = vinfo_for_stmt (orig_stmt);
 
52495
-      gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
 
52496
       gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
 
52497
       gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
 
52498
     }
 
52499
@@ -4520,7 +4522,7 @@
 
52500
      The last use is the reduction variable.  In case of nested cycle this
 
52501
      assumption is not true: we use reduc_index to record the index of the
 
52502
      reduction variable.  */
 
52503
-  for (i = 0; i < op_type-1; i++)
 
52504
+  for (i = 0; i < op_type - 1; i++)
 
52505
     {
 
52506
       /* The condition of COND_EXPR is checked in vectorizable_condition().  */
 
52507
       if (i == 0 && code == COND_EXPR)
 
52508
@@ -4552,11 +4554,18 @@
 
52509
   if (!vectype_in)
 
52510
     vectype_in = tem;
 
52511
   gcc_assert (is_simple_use);
 
52512
-  gcc_assert (dt == vect_reduction_def
 
52513
-              || dt == vect_nested_cycle
 
52514
-              || ((dt == vect_internal_def || dt == vect_external_def
 
52515
-                   || dt == vect_constant_def || dt == vect_induction_def)
 
52516
-                   && nested_cycle && found_nested_cycle_def));
 
52517
+  if (!(dt == vect_reduction_def
 
52518
+       || dt == vect_nested_cycle
 
52519
+       || ((dt == vect_internal_def || dt == vect_external_def
 
52520
+            || dt == vect_constant_def || dt == vect_induction_def)
 
52521
+           && nested_cycle && found_nested_cycle_def)))
 
52522
+    {
 
52523
+      /* For pattern recognized stmts, orig_stmt might be a reduction,
 
52524
+        but some helper statements for the pattern might not, or
 
52525
+        might be COND_EXPRs with reduction uses in the condition.  */
 
52526
+      gcc_assert (orig_stmt);
 
52527
+      return false;
 
52528
+    }
 
52529
   if (!found_nested_cycle_def)
 
52530
     reduc_def_stmt = def_stmt;
 
52531
 
50293
52532
Index: gcc/ipa.c
50294
52533
===================================================================
50295
52534
--- a/src/gcc/ipa.c     (.../tags/gcc_4_7_2_release)
50611
52850
        unsigned i;
50612
52851
        for (i = 0; i < nary->length; ++i)
50613
52852
          {
 
52853
@@ -3105,7 +3103,7 @@
 
52854
                break;
 
52855
              case 3:
 
52856
                folded = fold_build3 (nary->opcode, nary->type,
 
52857
-                                     genop[0], genop[1], genop[3]);
 
52858
+                                     genop[0], genop[1], genop[2]);
 
52859
                break;
 
52860
              default:
 
52861
                gcc_unreachable ();
50614
52862
@@ -3511,7 +3509,8 @@
50615
52863
 
50616
52864
   FOR_EACH_VEC_ELT (pre_expr, exprs, i, expr)
289190
291438
===================================================================
289191
291439
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_7_2_release)
289192
291440
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_7-branch)
289193
 
@@ -1,3 +1,18 @@
 
291441
@@ -1,3 +1,25 @@
 
291442
+2013-02-21  Janne Blomqvist  <jb@gcc.gnu.org>
 
291443
+
 
291444
+       PR libfortran/30162
 
291445
+       * io/open.c (test_endfile): Call stell only if size != 0.
 
291446
+       * io/unix.c (raw_tell): Revert r194694.
 
291447
+       (raw_size): Return size field only for regular files, otherwise 0.
 
291448
+
289194
291449
+2012-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
289195
291450
+
289196
291451
+       PR libfortran/30162
289209
291464
 2012-09-20  Release Manager
289210
291465
 
289211
291466
        * GCC 4.7.2 released.
 
291467
Index: libgfortran/io/open.c
 
291468
===================================================================
 
291469
--- a/src/libgfortran/io/open.c (.../tags/gcc_4_7_2_release)
 
291470
+++ b/src/libgfortran/io/open.c (.../branches/gcc-4_7-branch)
 
291471
@@ -1,5 +1,4 @@
 
291472
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
 
291473
-   Free Software Foundation, Inc.
 
291474
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
 
291475
    Contributed by Andy Vaught
 
291476
    F2003 I/O support contributed by Jerry DeLisle
 
291477
 
 
291478
@@ -153,8 +152,12 @@
 
291479
 static void
 
291480
 test_endfile (gfc_unit * u)
 
291481
 {
 
291482
-  if (u->endfile == NO_ENDFILE && ssize (u->s) == stell (u->s))
 
291483
-    u->endfile = AT_ENDFILE;
 
291484
+  if (u->endfile == NO_ENDFILE)
 
291485
+    { 
 
291486
+      gfc_offset sz = ssize (u->s);
 
291487
+      if (sz == 0 || sz == stell (u->s))
 
291488
+       u->endfile = AT_ENDFILE;
 
291489
+    }
 
291490
 }
 
291491
 
 
291492
 
289212
291493
Index: libgfortran/io/unix.c
289213
291494
===================================================================
289214
291495
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_7_2_release)
289215
291496
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_7-branch)
289216
 
@@ -329,7 +329,15 @@
289217
 
 static gfc_offset
289218
 
 raw_tell (unix_stream * s)
289219
 
 {
289220
 
-  return lseek (s->fd, 0, SEEK_CUR);
289221
 
+  gfc_offset x;
289222
 
+  x = lseek (s->fd, 0, SEEK_CUR);
289223
 
+
289224
 
+  /* Non-seekable files should always be assumed to be at
289225
 
+     current position.  */
289226
 
+  if (x == -1 && errno == ESPIPE)
289227
 
+    x = 0;
289228
 
+
289229
 
+  return x;
 
291497
@@ -1,6 +1,4 @@
 
291498
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 
291499
-   2011
 
291500
-   Free Software Foundation, Inc.
 
291501
+/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
 
291502
    Contributed by Andy Vaught
 
291503
    F2003 I/O support contributed by Jerry DeLisle
 
291504
 
 
291505
@@ -339,7 +337,10 @@
 
291506
   int ret = fstat (s->fd, &statbuf);
 
291507
   if (ret == -1)
 
291508
     return ret;
 
291509
-  return statbuf.st_size;
 
291510
+  if (S_ISREG (statbuf.st_mode))
 
291511
+    return statbuf.st_size;
 
291512
+  else
 
291513
+    return 0;
289230
291514
 }
289231
291515
 
289232
 
 static gfc_offset
 
291516
 static int
289233
291517
Index: libada/Makefile.in
289234
291518
===================================================================
289235
291519
--- a/src/libada/Makefile.in    (.../tags/gcc_4_7_2_release)