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)
24065
// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
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.
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) { }
24076
- unordered_map(const unordered_map& __x)
24078
+ unordered_map(const unordered_map& __x) = default;
24080
unordered_map(const _Base& __x)
24083
- unordered_map(unordered_map&& __x)
24084
- : _Base(std::move(__x)) { }
24085
+ unordered_map(unordered_map&& __x) = default;
24087
unordered_map(initializer_list<value_type> __l,
24089
@@ -511,14 +509,12 @@
24090
__gnu_debug::__base(__last), __n,
24091
__hf, __eql, __a) { }
24093
- unordered_multimap(const unordered_multimap& __x)
24095
+ unordered_multimap(const unordered_multimap& __x) = default;
24097
unordered_multimap(const _Base& __x)
24100
- unordered_multimap(unordered_multimap&& __x)
24101
- : _Base(std::move(__x)) { }
24102
+ unordered_multimap(unordered_multimap&& __x) = default;
24104
unordered_multimap(initializer_list<value_type> __l,
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)
24111
// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
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.
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) { }
24122
- unordered_set(const unordered_set& __x)
24124
+ unordered_set(const unordered_set& __x) = default;
24126
unordered_set(const _Base& __x)
24129
- unordered_set(unordered_set&& __x)
24130
- : _Base(std::move(__x)) { }
24131
+ unordered_set(unordered_set&& __x) = default;
24133
unordered_set(initializer_list<value_type> __l,
24135
@@ -506,14 +504,12 @@
24136
__gnu_debug::__base(__last), __n,
24137
__hf, __eql, __a) { }
24139
- unordered_multiset(const unordered_multiset& __x)
24141
+ unordered_multiset(const unordered_multiset& __x) = default;
24143
unordered_multiset(const _Base& __x)
24146
- unordered_multiset(unordered_multiset&& __x)
24147
- : _Base(std::move(__x)) { }
24148
+ unordered_multiset(unordered_multiset&& __x) = default;
24150
unordered_multiset(initializer_list<value_type> __l,
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;
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)
24171
// <unordered_map> -*- C++ -*-
24173
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
24174
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
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
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)
24191
// Stream buffer classes -*- C++ -*-
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.
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);
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
24209
* - get == input == read
24210
* - put == output == write
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.
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)
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.
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 @@
24257
__invoke(_Functor& __f, _Args&&... __args)
24259
- return mem_fn(__f)(std::forward<_Args>(__args)...);
24260
+ return std::mem_fn(__f)(std::forward<_Args>(__args)...);
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); }
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); }
24277
template<typename _Signature>
24053
24279
@@ -1872,8 +1872,7 @@
24055
24281
_M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
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)
24323
// <unordered_set> -*- C++ -*-
24325
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
24326
+// Copyright (C) 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
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
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)
24186
24450
// hashtable.h header -*- C++ -*-
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.
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
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
24465
- * - size_t _M_code if cache_hash_code is true
24466
+ * - size_t _M_hash_code if cache_hash_code is true
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
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.
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.
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.
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.
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
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.
24523
template<typename _Key, typename _Value, typename _Allocator,
24524
@@ -982,7 +983,7 @@
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.
24531
if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n)
24533
@@ -1104,7 +1105,7 @@
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
24540
__new_node->_M_nxt = _M_before_begin._M_nxt;
24541
_M_before_begin._M_nxt = __new_node;
24542
@@ -1252,7 +1253,7 @@
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);
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 @@
24196
24562
_M_rehash_policy._M_prev_resize = 0;
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)
24633
// unordered_map implementation -*- C++ -*-
24635
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
24636
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
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
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>
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>
24658
typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
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)
24665
// unordered_set implementation -*- C++ -*-
24667
-// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
24668
+// Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
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
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>
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>
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.
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)
25417
// Allocator traits -*- C++ -*-
25419
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
25420
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
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
25426
_GLIBCXX_BEGIN_NAMESPACE_VERSION
25428
+ template<typename _Tp>
25431
template<typename _Alloc, typename _Tp>
25432
class __alloctr_rebind_helper
25434
@@ -254,7 +257,8 @@
25436
template<typename _Tp, typename... _Args>
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)...); }
25444
@@ -386,7 +390,8 @@
25445
* arguments @a __args...
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)...); }
25454
@@ -506,6 +511,56 @@
25455
__do_alloc_on_swap(__one, __two, __pocs());
25458
+ template<typename _Alloc>
25459
+ class __is_copy_insertable_impl
25461
+ typedef allocator_traits<_Alloc> _Traits;
25463
+ template<typename _Up, typename
25464
+ = decltype(_Traits::construct(std::declval<_Alloc&>(),
25465
+ std::declval<_Up*>(),
25466
+ std::declval<const _Up&>()))>
25470
+ template<typename _Up>
25471
+ static false_type
25475
+ typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
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
25484
+ // std::allocator<_Tp> just requires CopyConstructible
25485
+ template<typename _Tp>
25486
+ struct __is_copy_insertable<allocator<_Tp>>
25487
+ : is_copy_constructible<_Tp>
25490
+ // Used to allow copy construction of unordered containers
25491
+ template<bool> struct __allow_copy_cons { };
25493
+ // Used to delete copy constructor of unordered containers
25495
+ struct __allow_copy_cons<false>
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;
25504
+ template<typename _Alloc>
25505
+ using __check_copy_constructible
25506
+ = __allow_copy_cons<__is_copy_insertable<_Alloc>::value>;
25508
_GLIBCXX_END_NAMESPACE_VERSION
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)
25547
+2013-02-20 Jonathan Wakely <jwakely.gcc@gmail.com>
25549
+ * include/std/streambuf (basic_streambuf): Fix unclosed Doxygen group.
25551
+2013-02-20 Jonathan Wakely <jwakely.gcc@gmail.com>
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:
25572
+ * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
25573
+ dg-error line number.
25575
+2013-02-18 Jonathan Wakely <jwakely.gcc@gmail.com>
25577
+ * include/std/functional (mem_fn): Qualify to prevent ADL.
25578
+ * testsuite/20_util/function_objects/mem_fn/adl.cc: New.
25580
+2013-02-18 Jonathan Wakely <jwakely.gcc@gmail.com>
25582
+ * include/bits/hashtable.h: Improve comments.
25583
+ * include/bits/hashtable_policy.h: Likewise.
25004
25585
+2013-01-24 Paolo Carlini <paolo.carlini@oracle.com>
25006
25587
+ PR libstdc++/56085
26965
27533
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26966
27534
// GNU General Public License for more details.
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)
27541
+// XFAIL because of PR libstdc++/55043 fix
27542
+// { dg-do compile { xfail *-*-* } }
27543
+// { dg-excess-errors "" }
27544
+// { dg-options "-std=gnu++11" }
27546
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
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.
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.
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/>.
27563
+#include <unordered_map>
27565
+struct LinkedHashMap
27569
+ typedef std::unordered_map<int, Entry> Storage;
27570
+ typedef Storage::iterator EntryPtr;
27574
+ EntryPtr prev, next;
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.
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)
27595
// any later version.
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.
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)
27608
+// { dg-options "-std=gnu++0x" }
27609
+// { dg-do compile }
27611
+// Copyright (C) 2013 Free Software Foundation, Inc.
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.
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.
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/>.
27628
+// libstdc++/55043
27630
+#include <unordered_map>
27635
+ MoveOnly() = default;
27636
+ MoveOnly(MoveOnly&&) = default;
27639
+using hash = std::hash<int>;
27640
+using equal = std::equal_to<int>;
27642
+template<typename Alloc>
27643
+ using test_type = std::unordered_map<int, MoveOnly, hash, equal, Alloc>;
27647
+ typedef test_type<std::allocator<MoveOnly>> uim;
27648
+ std::vector<uim> v;
27649
+ v.emplace_back(uim());
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>
27657
+ template<typename U>
27658
+ struct rebind { typedef Alloc<U, R> other; };
27660
+ Alloc() = default;
27662
+ template<typename U>
27663
+ Alloc(const Alloc<U, R>&) { }
27665
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
27667
+ void construct(T* p, arg_type) const
27668
+ { new((void*)p) T(); }
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");
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.
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)
28332
+// XFAIL because of PR libstdc++/55043 fix
28333
+// { dg-do compile { xfail *-*-* } }
28334
+// { dg-excess-errors "" }
28335
+// { dg-options "-std=gnu++11" }
28337
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
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.
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.
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/>.
28354
+#include <unordered_map>
28356
+struct LinkedHashMap
28360
+ typedef std::unordered_multimap<int, Entry> Storage;
28361
+ typedef Storage::iterator EntryPtr;
28365
+ EntryPtr prev, next;
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)
28373
+// { dg-options "-std=gnu++0x" }
28374
+// { dg-do compile }
28376
+// Copyright (C) 2013 Free Software Foundation, Inc.
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.
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.
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/>.
28393
+// libstdc++/55043
28395
+#include <unordered_map>
28400
+ MoveOnly() = default;
28401
+ MoveOnly(MoveOnly&&) = default;
28404
+using hash = std::hash<int>;
28405
+using equal = std::equal_to<int>;
28407
+template<typename Alloc>
28408
+ using test_type = std::unordered_multimap<int, MoveOnly, hash, equal, Alloc>;
28412
+ typedef test_type<std::allocator<MoveOnly>> uim;
28413
+ std::vector<uim> v;
28414
+ v.emplace_back(uim());
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>
28422
+ template<typename U>
28423
+ struct rebind { typedef Alloc<U, R> other; };
28425
+ Alloc() = default;
28427
+ template<typename U>
28428
+ Alloc(const Alloc<U, R>&) { }
28430
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
28432
+ void construct(T* p, arg_type) const
28433
+ { new((void*)p) T(); }
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");
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.
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)
27798
// any later version.
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.
27807
// with this library; see the file COPYING3. If not see
27808
// <http://www.gnu.org/licenses/>.
27810
-// { dg-error "static assertion failed" "" { target *-*-* } 186 }
27811
+// { dg-error "static assertion failed" "" { target *-*-* } 185 }
27813
#include <unordered_set>
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)
27897
28673
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27898
28674
// GNU General Public License for more details.
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)
28681
// { dg-options "-std=gnu++0x" }
28682
// { dg-require-normal-mode "" }
28684
-// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
28685
+// Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
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
28690
// any later version.
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.
28699
// with this library; see the file COPYING3. If not see
28700
// <http://www.gnu.org/licenses/>.
28702
-// { dg-error "static assertion failed" "" { target *-*-* } 186 }
28703
+// { dg-error "static assertion failed" "" { target *-*-* } 187 }
28705
#include <unordered_set>
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)
28712
// any later version.
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.
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)
28725
+// { dg-options "-std=gnu++0x" }
28726
+// { dg-do compile }
28728
+// Copyright (C) 2013 Free Software Foundation, Inc.
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.
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.
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/>.
28745
+// libstdc++/55043
28747
+#include <unordered_set>
28752
+ MoveOnly() = default;
28753
+ MoveOnly(MoveOnly&&) = default;
28757
+ bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
28760
+ std::size_t operator()(const MoveOnly&) const { return 0; }
28763
+template<typename Alloc>
28764
+ using test_type = std::unordered_set<MoveOnly, hash, equal, Alloc>;
28768
+ typedef test_type<std::allocator<MoveOnly>> uim;
28769
+ std::vector<uim> v;
28770
+ v.emplace_back(uim());
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>
28778
+ template<typename U>
28779
+ struct rebind { typedef Alloc<U, R> other; };
28781
+ Alloc() = default;
28783
+ template<typename U>
28784
+ Alloc(const Alloc<U, R>&) { }
28786
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
28788
+ void construct(T* p, arg_type) const
28789
+ { new((void*)p) T(); }
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");
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.
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)
29245
+// { dg-options "-std=gnu++0x" }
29246
+// { dg-do compile }
29248
+// Copyright (C) 2013 Free Software Foundation, Inc.
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.
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.
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/>.
29265
+// libstdc++/55043
29267
+#include <unordered_set>
29272
+ MoveOnly() = default;
29273
+ MoveOnly(MoveOnly&&) = default;
29277
+ bool operator()(const MoveOnly&, const MoveOnly) const { return true; }
29280
+ std::size_t operator()(const MoveOnly&) const { return 0; }
29283
+template<typename Alloc>
29284
+ using test_type = std::unordered_multiset<MoveOnly, hash, equal, Alloc>;
29288
+ typedef test_type<std::allocator<MoveOnly>> uim;
29289
+ std::vector<uim> v;
29290
+ v.emplace_back(uim());
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>
29298
+ template<typename U>
29299
+ struct rebind { typedef Alloc<U, R> other; };
29301
+ Alloc() = default;
29303
+ template<typename U>
29304
+ Alloc(const Alloc<U, R>&) { }
29306
+ typedef typename std::conditional<R, T&&, const T&>::type arg_type;
29308
+ void construct(T* p, arg_type) const
29309
+ { new((void*)p) T(); }
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");
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)
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)
29540
+// { dg-options "-std=gnu++0x" }
29541
+// { dg-do compile }
29543
+// Copyright (C) 2012-2013 Free Software Foundation, Inc.
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.
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.
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/>.
29560
+#include <functional>
29563
+ struct X { int i; };
29564
+ void mem_fn(int X::*);
29570
+int X::* p = &X::i;
29574
+ auto ref = std::ref(p);
29580
+ std::function<int(X)> fun(p);
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)
29257
30291
#define rol(x, n) (((x) << (n)) | ((sha1_uint32) (x) >> (32 - (n))))
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)
30299
# if defined STDC_HEADERS && !defined emacs
30300
# include <stddef.h>
30301
+# define PTR_INT_TYPE ptrdiff_t
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
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) \
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) \
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)
33862
34957
&& integer_onep (TREE_OPERAND (TREE_OPERAND (arg1, 0), 0)))
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)
33874
+ gimple use_stmt, defvar_def;
33875
imm_use_iterator ui;
33878
@@ -108,6 +108,7 @@
33879
defvar = PHI_RESULT (temp);
33881
defvar = gimple_vdef (temp);
33882
+ defvar_def = temp;
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))
34968
+ /* lower_send_shared_vars only uses copy-in, but not copy-out
34970
+ if (TREE_READONLY (decl)
34971
+ || ((TREE_CODE (decl) == RESULT_DECL
34972
+ || TREE_CODE (decl) == PARM_DECL)
34973
+ && DECL_BY_REFERENCE (decl)))
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)
33886
@@ -139,7 +140,14 @@
33888
BREAK_FROM_IMM_USE_STMT (ui);
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)))
34986
@@ -786,11 +794,10 @@
33900
/* If the statement is a use the store is not dead. */
33901
else if (ref_maybe_used_by_stmt_p (use_stmt,
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))
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)
35122
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
35124
+ PR bootstrap/56258
35125
+ * doc/invoke.texi (-fdump-rtl-pro_and_epilogue): Use @item
35126
+ instead of @itemx.
35128
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
35130
+ Backported from mainline
35131
+ 2013-02-19 Jakub Jelinek <jakub@redhat.com>
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.
35138
+ PR tree-optimization/56381
35139
+ * tree-ssa-pre.c (create_expression_by_pieces): Fix up last argument
35142
+ 2013-02-08 Jakub Jelinek <jakub@redhat.com>
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.
35148
+ 2013-02-06 Jakub Jelinek <jakub@redhat.com>
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.
35154
+ 2012-11-27 Jakub Jelinek <jakub@redhat.com>
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.
35160
+2013-02-18 Richard Biener <rguenther@suse.de>
35163
+ 2013-02-04 Richard Biener <rguenther@suse.de>
35165
+ Backport from mainline
35166
+ 2012-07-04 Richard Guenther <rguenther@suse.de>
35168
+ PR tree-optimization/53844
35169
+ * tree-ssa-dse.c (dse_possible_dead_store_p): Properly handle
35170
+ the loop virtual PHI.
34024
35172
+2013-02-13 David S. Miller <davem@davemloft.net>
34026
35174
+ * expmed.c (expand_shift_1): Only strip scalar integer subregs.
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 @@
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"
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"
36714
+ if ![check_no_compiler_messages mapfile executable {
36715
int main (void) { return 0; }
36716
- } $clearcap_ldflags ] {
36717
+ } $clearcap_ldflags ] {
36718
+ unset clearcap_ldflags
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)
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)
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" }
37383
@@ -56,13 +56,13 @@
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" }
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
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)
36480
37746
+ res = ["d", "e"]
36481
37747
+ end function
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)
37755
+! { dg-options "-fdump-tree-original" }
37757
+! PR fortran/56318
37759
+! Contributed by Alberto Luaces
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])
37768
+ DOUBLE PRECISION,DIMENSION(3,3)::MM1
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))) &
37778
+END SUBROUTINE mass_matrix
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
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],&
37798
+! { dg-final { scan-tree-dump-times "matmul" 0 "original" } }
37799
+! { dg-final { cleanup-tree-dump "original" } }
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)
37806
+! { dg-do compile }
37808
+! PR 56385: [4.6/4.7/4.8 Regression] [OOP] ICE with allocatable function result in a procedure-pointer component
37810
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
37814
+ type :: TGeometricShape
37817
+ type :: TVolumeSourceBody
37818
+ class(TGeometricShape), allocatable :: GeometricShape
37819
+ procedure(scalar_flux_interface), pointer :: get_scalar_flux
37822
+ abstract interface
37823
+ function scalar_flux_interface(self) result(res)
37825
+ real, allocatable :: res(:)
37826
+ class(TVolumeSourceBody), intent(in) :: self
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)
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)
38158
+! { dg-do compile }
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.
38164
+! Original test case from Arjen Markus <arjen.markus@deltares.nl>
38166
+module select_precision
38167
+ integer, parameter :: dp = kind(1.0)
38168
+end module select_precision
38171
+ use select_precision, only: wp => dp
38174
+ subroutine ode_derivative(x)
38177
+ end subroutine ode_derivative
38179
+end module ode_types
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)
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)
40488
+2013-02-22 Janus Weil <janus@gcc.gnu.org>
40491
+ * gfortran.dg/proc_ptr_comp_37.f90: New.
40493
+2013-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
40495
+ Backport from mainline:
40496
+ 2012-06-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
40498
+ * gcc.target/i386/clearcapv2.map: New file.
40499
+ * gcc.target/i386/i386.exp: Try it first before clearcap.map.
40501
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
40503
+ Backported from mainline
40504
+ 2013-02-19 Jakub Jelinek <jakub@redhat.com>
40506
+ PR tree-optimization/56350
40507
+ * gcc.dg/pr56350.c: New test.
40509
+ 2013-02-08 Jakub Jelinek <jakub@redhat.com>
40511
+ PR tree-optimization/56250
40512
+ * gcc.c-torture/execute/pr56250.c: New test.
40514
+ 2013-02-07 Jakub Jelinek <jakub@redhat.com>
40517
+ * g++.dg/parse/crash61.C: New test.
40520
+ * g++.dg/parse/pr56239.C: New test.
40523
+ * g++.dg/abi/mangle61.C: New test.
40525
+ 2013-02-06 Jakub Jelinek <jakub@redhat.com>
40527
+ PR middle-end/56217
40528
+ * g++.dg/gomp/pr56217.C: New test.
40530
+ 2012-11-27 Jakub Jelinek <jakub@redhat.com>
40532
+ PR tree-optimization/55110
40533
+ * gcc.dg/pr55110.c: New test.
40535
+2013-02-18 Richard Biener <rguenther@suse.de>
40538
+ 2013-02-04 Richard Biener <rguenther@suse.de>
40540
+ Backport from mainline
40541
+ 2012-07-04 Richard Guenther <rguenther@suse.de>
40543
+ PR tree-optimization/53844
40544
+ * g++.dg/tree-ssa/pr53844.C: New testcase.
40546
+2013-02-17 Tobias Burnus <burnus@net-b.de>
40547
+ Mikael Morin <mikael@gcc.gnu.org>
40549
+ Backport from trunk
40550
+ 2013-01-28 Tobias Burnus <burnus@net-b.de>
40551
+ Mikael Morin <mikael@gcc.gnu.org>
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
40560
+2013-02-15 Tobias Burnus <burnus@net-b.de>
40563
+ * gcc/testsuite/gfortran.dg/matmul_9.f90: New.
39044
40565
+2012-02-13 Tobias Burnus <burnus@net-b.de>
39046
40567
+ Backport from mainline
39900
41421
+namespace { enum E { E1 }; } void f(E e) { }
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)
41430
+// { dg-do compile }
41437
+ static union { } u;
41440
+ static union { } u;
41443
+ static union { } u;
41448
+ static union { } u;
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)
41462
+// PR middle-end/56217
41463
+// { dg-do compile }
41464
+// { dg-options "-fopenmp" }
41466
+struct S { int *p; S (); S (S &); };
41472
+ #pragma omp task shared (s)
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() {}
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)
40010
+// { dg-do compile }
40011
+// { dg-options "-O2 -fdump-tree-optimized-vops" }
40015
+//Very minimal numeric vector class where Base provides the policy
40016
+template<typename Base=VBase>
40017
+struct Vector : public Base{
40019
+ inline Vector(const Base& b)
40024
+ //Assignment from any other sort of Vector
40025
+ template<typename Base2>
40026
+ void operator= (const Vector<Base2>& from)
40028
+ for(int i=0; i<100; i++){
40029
+ (*this)[i]=from[i];
40035
+//Base class to represent pointer as a Vector
40037
+ double * const my_data;
40039
+ double& operator[](int i) {
40040
+ return my_data[i];
40043
+ const double& operator[](int i) const {
40044
+ return my_data[i];
40048
+//Base class providing very minimalistic expression template
40049
+template<class B2> struct ScalarMulExpr
40052
+ const Vector<B2>& vec;
40056
+ return vec.size();
40059
+ double operator[](int i) const
40061
+ return vec[i]*mul;
40064
+ ScalarMulExpr(const Vector<B2>& vec_, const int& m)
40065
+ :mul(m),vec(vec_)
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)
40074
+ return ScalarMulExpr<B2>(lhs, rhs);
40077
+//Test function producing suboptimal asm code
40078
+void test(const Vector<>& in, Vector<>& out, int i)
40080
+ out=in*1*1*1*1*1*1*1*1*1*1*1;
40083
+// There should be a single store remaining, inside the loops. All
40084
+// dead stores to unused temporaries should have been removed.
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)
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)
41739
+// { dg-do compile }
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)
41750
+// { dg-do compile }
41754
+ int operator () () { return 0; }
41760
+ return (S ()) ();
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)
41768
+// { dg-do link { target c++11 } }
41770
+template <class T>
41772
+ static void (*code) ();
41775
+template <class T>
41776
+void (*X<T>::code) () = []{}; // Line 7
41779
+ void (*code) () = []{} ; // Line 10
41780
+ void operator()() { code(); }
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)
40278
41822
+ updateChild(obj);
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)
41830
+// { dg-do run { target c++11 } }
41832
+#include <functional>
41835
+ template<typename T>
41836
+ std::function<void()> broken(int x) {
41837
+ return [=] { +x; print<T>(); };
41840
+ std::function<void()> works0() {
41841
+ return [=] { print<int>(); };
41844
+ template<typename T>
41845
+ std::function<void()> works1() {
41846
+ return [=] { print<int>(); };
41849
+ template<typename T>
41850
+ std::function<void()> works2() {
41851
+ return [=] { this->print<T>(); };
41854
+ template<typename T>
41855
+ void print() { if (this == 0) __builtin_abort (); }
41859
+ test().broken<int>(1)();
41860
+ test().works0()();
41861
+ test().works1<int>()();
41862
+ test().works2<int>()();
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)
41872
+// { dg-options "-std=c++11 -O" }
41877
+ const int constVal1 = B ? 100 : -100;
41878
+ const int constVal = constVal1;
41879
+ return [] { return constVal; }();
41883
+ if (func<true>() != 100)
41884
+ __builtin_abort ();
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)
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))
43260
- constructor_elt *ce;
43261
+ constructor_elt ce;
43263
- v = VEC_alloc (constructor_elt, gc, 1);
43264
- ce = VEC_quick_push (constructor_elt, v, NULL);
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;
43271
- ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
43273
+ ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
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);
43284
+ v = VEC_alloc (constructor_elt, gc, 1);
43285
+ *VEC_quick_push (constructor_elt, v, NULL) = ce;
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))
43294
- constructor_elt *ce;
43295
+ constructor_elt ce;
43297
- v = VEC_alloc (constructor_elt, gc, 1);
43298
- ce = VEC_quick_push (constructor_elt, v, NULL);
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;
43305
- ce->index = build2 (RANGE_EXPR, sizetype, size_zero_node,
43307
+ ce.index = build2 (RANGE_EXPR, sizetype, size_zero_node,
43310
- ce->value = build_value_init (TREE_TYPE (type), complain);
43311
+ ce.value = build_value_init (TREE_TYPE (type), complain);
43313
- if (ce->value == error_mark_node)
43314
- return error_mark_node;
43317
+ if (ce.value == error_mark_node)
43318
+ return error_mark_node;
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;
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);
43336
/* Build a constructor to contain the initializations. */
43337
@@ -2794,7 +2799,8 @@
41588
43339
orig_placement = make_tree_vector_copy (*placement);
41589
43340
orig_nelts = nelts;
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 @@
43690
case TYPENAME_TYPE:
43691
- result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
43692
- TYPENAME_TYPE_FULLNAME (t),
43693
- typename_type, tf_none);
43695
+ tree fullname = TYPENAME_TYPE_FULLNAME (t);
43696
+ if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
43698
+ tree args = TREE_OPERAND (fullname, 1);
43699
+ tree new_args = copy_node (args);
43700
+ bool changed = false;
43702
+ for (i = 0; i < TREE_VEC_LENGTH (args); ++i)
43704
+ tree arg = TREE_VEC_ELT (args, i);
43706
+ if (TYPE_P (arg))
43707
+ strip_arg = strip_typedefs (arg);
43709
+ strip_arg = strip_typedefs_expr (arg);
43710
+ TREE_VEC_ELT (new_args, i) = strip_arg;
43711
+ if (strip_arg != arg)
43715
+ fullname = lookup_template_function (TREE_OPERAND (fullname, 0),
43718
+ ggc_free (new_args);
43720
+ result = make_typename_type (strip_typedefs (TYPE_CONTEXT (t)),
43721
+ fullname, typename_type, tf_none);
41915
43724
+ case DECLTYPE_TYPE:
41916
43725
+ result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t));
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)
43972
+2013-02-22 Jason Merrill <jason@redhat.com>
43975
+ * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
43976
+ if we got the wrong number of template parms.
43979
+ * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
43982
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
43984
+ Backported from mainline
43985
+ 2013-02-07 Jakub Jelinek <jakub@redhat.com>
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.
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.
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).
44006
+2013-02-15 Jason Merrill <jason@redhat.com>
44009
+ * semantics.c (finish_id_expression): Also return the identifier
44010
+ for an outer local static.
44013
+ * semantics.c (finish_id_expression): In a template, return
44014
+ the identifier for a constant variable.
44017
+ * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
44021
+ * pt.c (tsubst_copy_and_build): Don't forget any new
44022
+ captures that arose from use of dependent names.
42163
44024
+2013-02-12 Jason Merrill <jason@redhat.com>
42165
44026
+ PR c++/56291
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);
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. */
45047
-outer_automatic_var_p (tree decl)
45048
+outer_var_p (tree decl)
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);
45056
+/* As above, but also checks that DECL is automatic. */
45059
+outer_automatic_var_p (tree decl)
45061
+ return (outer_var_p (decl)
45062
+ && !TREE_STATIC (decl));
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 @@
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)
45078
+ else if (TREE_STATIC (decl))
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;
45087
tree context = DECL_CONTEXT (decl);
45088
tree containing_function = current_function_decl;
45089
tree lambda_stack = NULL_TREE;
45090
@@ -2961,7 +2978,14 @@
45092
FIXME update for final resolution of core issue 696. */
45093
if (decl_constant_var_p (decl))
45094
- return integral_constant_value (decl);
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;
45101
+ return integral_constant_value (decl);
45104
/* If we are in a lambda function, we can move out until we hit
45106
@@ -5351,6 +5375,7 @@
43162
45107
else if (copy_fn_p (fn) <= 0)
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 @@
45288
-cp_parser_token_starts_cast_expression (cp_token *token)
45289
+cp_parser_tokens_start_cast_expression (cp_parser *parser)
45291
+ cp_token *token = cp_lexer_peek_token (parser->lexer);
45292
switch (token->type)
45295
@@ -7052,6 +7053,12 @@
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;
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))
45316
cp_parser_parse_definitely (parser);
45317
expr = cp_parser_cast_expression (parser,
45318
@@ -11967,8 +11973,7 @@
48512
50525
if (!sym->attr.pointer
48514
50527
&& sym->as->type != AS_ASSUMED_SHAPE
50528
@@ -7398,8 +7392,8 @@
50529
called_dealloc_with_status = false;
50530
gfc_init_block (&tmpblock);
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)
50537
comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
50538
decl, cdecl, NULL_TREE);
50539
@@ -7581,7 +7575,8 @@
50543
- if (c->attr.allocatable && !cmp_has_alloc_comps)
50544
+ if (c->attr.allocatable && !c->attr.proc_pointer
50545
+ && !cmp_has_alloc_comps)
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 @@
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)
50564
while (ns != NULL);
50565
@@ -2808,17 +2813,14 @@
50569
- if (gfc_current_ns->parent != NULL)
50570
+ i = gfc_find_sym_tree (name, gfc_current_ns, 1, &st);
50576
- i = gfc_find_sym_tree (name, gfc_current_ns->parent, 1, &st);
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 @@
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)
50662
- st = gfc_find_symtree (gfc_current_ns->sym_root, current_ts.u.derived->name);
50663
- if (!(current_ts.u.derived->attr.imported
50665
- && gfc_find_dt_in_generic (st->n.sym) == current_ts.u.derived)
50666
- && !gfc_current_ns->has_import_set)
50668
- gfc_error ("The type of '%s' at %C has not been declared within the "
50669
- "interface", name);
50675
if (check_function_name (name) == FAILURE)
50678
@@ -3160,14 +3136,14 @@
50679
return MATCH_ERROR;
50682
- if (gfc_find_symtree (gfc_current_ns->sym_root,name))
50683
+ if (gfc_find_symtree (gfc_current_ns->sym_root, name))
50685
gfc_warning ("'%s' is already IMPORTed from host scoping unit "
50690
- st = gfc_new_symtree (&gfc_current_ns->sym_root, sym->name);
50691
+ st = gfc_new_symtree (&gfc_current_ns->sym_root, name);
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]),
50701
+ (char) TOUPPER ((unsigned char) name[0]),
50705
sym->attr.imported = 1;
50706
@@ -4231,7 +4207,7 @@
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);
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;
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)
50795
+2013-02-22 Janus Weil <janus@gcc.gnu.org>
50798
+ * trans-array.c (structure_alloc_comps): Handle procedure-pointer
50799
+ components with allocatable result.
50801
+2013-02-17 Tobias Burnus <burnus@net-b.de>
50802
+ Mikael Morin <mikael@gcc.gnu.org>
50804
+ Backport from trunk
50805
+ 2013-01-28 Tobias Burnus <burnus@net-b.de>
50806
+ Mikael Morin <mikael@gcc.gnu.org>
50809
+ * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
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.
50816
+2013-02-15 Tobias Burnus <burnus@net-b.de>
50817
+ Mikael Morin <mikael@gcc.gnu.org>
50820
+ * simplify.c (gfc_simplify_matmul): Fix result shape
50821
+ and matmul result.
48652
50823
+2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
48654
50825
+ Backport from trunk
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)
52166
- result_columns = mpz_get_si (matrix_b->shape[0]);
52167
+ result_columns = mpz_get_si (matrix_b->shape[1]);
52169
stride_b = mpz_get_si (matrix_b->shape[0]);
52171
@@ -3849,7 +3849,7 @@
52173
else if (matrix_a->rank == 2 && matrix_b->rank == 1)
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]);
52180
@@ -3862,7 +3862,7 @@
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]);
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. */
50291
52489
/* Add additional cost for the peeled instructions in prologue and epilogue
52491
@@ -4450,7 +4453,6 @@
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));
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++)
52506
/* The condition of COND_EXPR is checked in vectorizable_condition(). */
52507
if (i == 0 && code == COND_EXPR)
52508
@@ -4552,11 +4554,18 @@
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)))
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);
52529
if (!found_nested_cycle_def)
52530
reduc_def_stmt = def_stmt;
50293
52532
Index: gcc/ipa.c
50294
52533
===================================================================
50295
52534
--- a/src/gcc/ipa.c (.../tags/gcc_4_7_2_release)
289209
291464
2012-09-20 Release Manager
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)
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
291478
@@ -153,8 +152,12 @@
291480
test_endfile (gfc_unit * u)
291482
- if (u->endfile == NO_ENDFILE && ssize (u->s) == stell (u->s))
291483
- u->endfile = AT_ENDFILE;
291484
+ if (u->endfile == NO_ENDFILE)
291486
+ gfc_offset sz = ssize (u->s);
291487
+ if (sz == 0 || sz == stell (u->s))
291488
+ u->endfile = AT_ENDFILE;
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 @@
289218
raw_tell (unix_stream * s)
289220
- return lseek (s->fd, 0, SEEK_CUR);
289222
+ x = lseek (s->fd, 0, SEEK_CUR);
289224
+ /* Non-seekable files should always be assumed to be at
289225
+ current position. */
289226
+ if (x == -1 && errno == ESPIPE)
291498
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
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
291505
@@ -339,7 +337,10 @@
291506
int ret = fstat (s->fd, &statbuf);
291509
- return statbuf.st_size;
291510
+ if (S_ISREG (statbuf.st_mode))
291511
+ return statbuf.st_size;
289233
291517
Index: libada/Makefile.in
289234
291518
===================================================================
289235
291519
--- a/src/libada/Makefile.in (.../tags/gcc_4_7_2_release)