rpms/compat-gcc-34/devel gcc34-pr24975.patch, NONE, 1.1 gcc34-rh233941.patch, NONE, 1.1 gcc34-rh234515.patch, NONE, 1.1 gcc34-rh235008.patch, NONE, 1.1 gcc34-rh235255.patch, NONE, 1.1 gcc34-rh242685.patch, NONE, 1.1 compat-gcc-34.spec, 1.6, 1.7
Jakub Jelinek (jakub)
fedora-extras-commits at redhat.com
Tue Oct 16 16:17:53 UTC 2007
- Previous message (by thread): rpms/kacst-fonts/devel kacst-fonts.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Term-UI/devel .cvsignore, 1.3, 1.4 perl-Term-UI.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/pkgs/rpms/compat-gcc-34/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31592
Modified Files:
compat-gcc-34.spec
Added Files:
gcc34-pr24975.patch gcc34-rh233941.patch gcc34-rh234515.patch
gcc34-rh235008.patch gcc34-rh235255.patch gcc34-rh242685.patch
Log Message:
3.4.6-8
gcc34-pr24975.patch:
--- NEW FILE gcc34-pr24975.patch ---
2005-11-23 Paolo Carlini <pcarlini at suse.de>
PR libstdc++/24975 (basic_string)
* include/bits/basic_string.h (_Rep::_S_empty_rep): Avoid
strict-aliasing warnings.
2005-11-22 Paolo Carlini <pcarlini at suse.de>
PR libstdc++/24975
* include/bits/stl_set.h (insert(iterator, const value_type&),
erase(iterator), erase(iterator, iterator)): Don't break aliasing
rules casting to _Rep_iterator&, forward to _Rb_tree facilities.
* include/bits/stl_multiset.h (insert(iterator, const value_type&),
erase(iterator), erase(iterator, iterator)): Likewise.
* include/bits/stl_tree.h (_Rb_tree<>::_M_insert(_Const_Base_ptr,
_Const_Base_ptr, const value_type&), insert_unique(const_iterator,
const value_type&), insert_equal(const_iterator, const value_type&),
erase(const_iterator), erase(const_iterator, const_iterator)): New,
_Rb_tree<>::const_iterator counterparts of existing facilities.
--- libstdc++-v3/include/bits/basic_string.h.jj 2007-02-23 21:29:15.000000000 +0100
+++ libstdc++-v3/include/bits/basic_string.h 2007-07-19 12:11:40.000000000 +0200
@@ -175,7 +175,16 @@ namespace std
static _Rep&
_S_empty_rep()
- { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
+ {
+#if __GNUC__ >= 4
+ // Work around type-punning warning in g++4. _S_empty_rep_storage
+ // is never modified, so type-punning is ok.
+ void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
+ return *reinterpret_cast<_Rep*>(__p);
+#else
+ return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage);
+#endif
+ }
bool
_M_is_leaked() const
--- libstdc++-v3/include/bits/stl_tree.h.jj 2007-02-23 21:29:15.000000000 +0100
+++ libstdc++-v3/include/bits/stl_tree.h 2007-07-19 13:18:28.000000000 +0200
@@ -532,6 +532,12 @@ namespace std
iterator
_M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+#if __GNUC__ >= 4
+ const_iterator
+ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __y,
+ const value_type& __v);
+#endif
+
_Link_type
_M_copy(_Const_Link_type __x, _Link_type __p);
@@ -631,9 +637,19 @@ namespace std
iterator
insert_unique(iterator __position, const value_type& __x);
+#if __GNUC__ >= 4
+ const_iterator
+ insert_unique(const_iterator __position, const value_type& __x);
+#endif
+
iterator
insert_equal(iterator __position, const value_type& __x);
+#if __GNUC__ >= 4
+ const_iterator
+ insert_equal(const_iterator __position, const value_type& __x);
+#endif
+
template<typename _InputIterator>
void
insert_unique(_InputIterator __first, _InputIterator __last);
@@ -645,12 +661,22 @@ namespace std
void
erase(iterator __position);
+#if __GNUC__ >= 4
+ void
+ erase(const_iterator __position);
+#endif
+
size_type
erase(const key_type& __x);
void
erase(iterator __first, iterator __last);
+#if __GNUC__ >= 4
+ void
+ erase(const_iterator __first, const_iterator __last);
+#endif
+
void
erase(const key_type* __first, const key_type* __last);
@@ -793,6 +819,28 @@ namespace std
return iterator(__z);
}
+#if __GNUC__ >= 4
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v)
+ {
+ _Link_type __z = _M_create_node(__v);
+ bool __insert_left;
+
+ __insert_left = __x != 0 || __p == _M_end()
+ || _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__p));
+
+ _Rb_tree_insert_and_rebalance(__insert_left, __z,
+ const_cast<_Base_ptr>(__p),
+ this->_M_impl._M_header);
+ ++_M_impl._M_node_count;
+ return const_iterator(__z);
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
@@ -928,6 +976,54 @@ namespace std
}
}
+#if __GNUC__ >= 4
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ insert_unique(const_iterator __position, const _Val& __v)
+ {
+ if (__position._M_node == _M_leftmost())
+ {
+ // begin()
+ if (size() > 0
+ && _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
+ return _M_insert(__position._M_node, __position._M_node, __v);
+ // First argument just needs to be non-null.
+ else
+ return const_iterator(insert_unique(__v).first);
+ }
+ else if (__position._M_node == _M_end())
+ {
+ // end()
+ if (_M_impl._M_key_compare(_S_key(_M_rightmost()),
+ _KeyOfValue()(__v)))
+ return _M_insert(0, _M_rightmost(), __v);
+ else
+ return const_iterator(insert_unique(__v).first);
+ }
+ else
+ {
+ const_iterator __before = __position;
+ --__before;
+ if (_M_impl._M_key_compare(_S_key(__before._M_node),
+ _KeyOfValue()(__v))
+ && _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert(0, __before._M_node, __v);
+ else
+ return _M_insert(__position._M_node, __position._M_node, __v);
+ // First argument just needs to be non-null.
+ }
+ else
+ return const_iterator(insert_unique(__v).first);
+ }
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
@@ -974,6 +1070,54 @@ namespace std
}
}
+#if __GNUC__ >= 4
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+ insert_equal(const_iterator __position, const _Val& __v)
+ {
+ if (__position._M_node == _M_leftmost())
+ {
+ // begin()
+ if (size() > 0
+ && !_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ return _M_insert(__position._M_node, __position._M_node, __v);
+ // first argument just needs to be non-null
+ else
+ return const_iterator(insert_equal(__v));
+ }
+ else if (__position._M_node == _M_end())
+ {
+ // end()
+ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(_M_rightmost())))
+ return _M_insert(0, _M_rightmost(), __v);
+ else
+ return const_iterator(insert_equal(__v));
+ }
+ else
+ {
+ const_iterator __before = __position;
+ --__before;
+ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__before._M_node))
+ && !_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert(0, __before._M_node, __v);
+ else
+ return _M_insert(__position._M_node, __position._M_node, __v);
+ // First argument just needs to be non-null.
+ }
+ else
+ return const_iterator(insert_equal(__v));
+ }
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KoV,
typename _Cmp, typename _Alloc>
template<class _II>
@@ -1008,6 +1152,20 @@ namespace std
--_M_impl._M_node_count;
}
+#if __GNUC__ >= 4
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline void
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(const_iterator __position)
+ {
+ _Link_type __y =
+ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase(const_cast<_Base_ptr>(__position._M_node),
+ this->_M_impl._M_header));
+ destroy_node(__y);
+ --_M_impl._M_node_count;
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
@@ -1082,6 +1240,20 @@ namespace std
while (__first != __last) erase(__first++);
}
+#if __GNUC__ >= 4
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+ erase(const_iterator __first, const_iterator __last)
+ {
+ if (__first == begin() && __last == end())
+ clear();
+ else
+ while (__first != __last) erase(__first++);
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
void
--- libstdc++-v3/include/bits/stl_multiset.h.jj 2007-02-23 21:29:15.000000000 +0100
+++ libstdc++-v3/include/bits/stl_multiset.h 2007-07-19 12:30:47.000000000 +0200
@@ -328,8 +328,12 @@ namespace _GLIBCXX_STD
iterator
insert(iterator __position, const value_type& __x)
{
+#if __GNUC__ >= 4
+ return _M_t.insert_equal(__position, __x);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
return _M_t.insert_equal((_Rep_iterator&)__position, __x);
+#endif
}
/**
@@ -358,8 +362,12 @@ namespace _GLIBCXX_STD
void
erase(iterator __position)
{
+#if __GNUC__ >= 4
+ _M_t.erase(__position);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
_M_t.erase((_Rep_iterator&)__position);
+#endif
}
/**
@@ -391,8 +399,12 @@ namespace _GLIBCXX_STD
void
erase(iterator __first, iterator __last)
{
+#if __GNUC__ >= 4
+ _M_t.erase(__first, __last);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
_M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
+#endif
}
/**
--- libstdc++-v3/include/bits/stl_set.h.jj 2007-02-23 21:29:15.000000000 +0100
+++ libstdc++-v3/include/bits/stl_set.h 2007-07-19 12:23:57.000000000 +0200
@@ -337,8 +337,12 @@ namespace _GLIBCXX_STD
iterator
insert(iterator __position, const value_type& __x)
{
+#if __GNUC__ >= 4
+ return _M_t.insert_unique(__position, __x);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
return _M_t.insert_unique((_Rep_iterator&)__position, __x);
+#endif
}
/**
@@ -366,8 +370,12 @@ namespace _GLIBCXX_STD
void
erase(iterator __position)
{
+#if __GNUC__ >= 4
+ _M_t.erase(__position);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
_M_t.erase((_Rep_iterator&)__position);
+#endif
}
/**
@@ -398,8 +406,12 @@ namespace _GLIBCXX_STD
void
erase(iterator __first, iterator __last)
{
+#if __GNUC__ >= 4
+ _M_t.erase(__first, __last);
+#else
typedef typename _Rep_type::iterator _Rep_iterator;
_M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
+#endif
}
/**
gcc34-rh233941.patch:
--- NEW FILE gcc34-rh233941.patch ---
2007-04-02 Jakub Jelinek <jakub at redhat.com>
* expr.c (expand_expr_real) <case COMPLEX_EXPR>: Force op1
into register if target overlaps with op1.
* g77.f-torture/execute/20070402.f: New test.
--- gcc/expr.c.jj 2006-10-05 00:37:01.000000000 +0200
+++ gcc/expr.c 2007-04-02 13:28:52.000000000 +0200
@@ -8949,6 +8949,9 @@ expand_expr_real (tree exp, rtx target,
if (! target)
target = gen_reg_rtx (TYPE_MODE (TREE_TYPE (exp)));
+ else if (GET_CODE (target) == MEM
+ && reg_overlap_mentioned_p (target, op1))
+ op1 = force_reg (mode, op1);
start_sequence ();
--- gcc/testsuite/g77.f-torture/execute/20070402.f.jj 2007-04-02 13:29:51.000000000 +0200
+++ gcc/testsuite/g77.f-torture/execute/20070402.f 2007-04-02 12:11:00.000000000 +0200
@@ -0,0 +1,21 @@
+ program rh233941
+ implicit none
+ complex*16 z
+ z = dcmplx(1.0, 2.0)
+ call sub(z)
+ stop
+ end program rh233941
+
+ subroutine sub(z)
+ implicit none
+ complex*16 z
+ z = dcmplx(-dimag(z), dreal(z))
+ call sub2(z)
+ return
+ end subroutine sub
+
+ subroutine sub2(z)
+ implicit none
+ complex*16 z
+ if (dreal(z).ne.-2.0.or.dimag(z).ne.1.0) call abort
+ end subroutine sub2
gcc34-rh234515.patch:
--- NEW FILE gcc34-rh234515.patch ---
2007-01-24 Steve LoBasso <slobasso at yahoo.com>
Paolo Carlini <pcarlini at suse.de>
* include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
Fix condition.
* testsuite/23_containers/deque/modifiers/erase/3.cc: New.
--- libstdc++-v3/include/bits/deque.tcc (revision 121146)
+++ libstdc++-v3/include/bits/deque.tcc (revision 121147)
@@ -140,7 +140,7 @@ namespace _GLIBCXX_STD
{
const difference_type __n = __last - __first;
const difference_type __elems_before = __first - this->_M_impl._M_start;
- if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
+ if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
{
std::copy_backward(this->_M_impl._M_start, __first, __last);
iterator __new_start = this->_M_impl._M_start + __n;
--- libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 0)
+++ libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 121147)
@@ -0,0 +1,52 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 23.2.1.3 deque modifiers
+
+#include <deque>
+#include <testsuite_hooks.h>
+
+void erase(size_t num_elm, size_t elm_strt, size_t elm_end)
+{
+ bool test __attribute__((unused)) = true;
+ using __gnu_test::copy_tracker;
+ using __gnu_test::assignment_operator;
+
+ std::deque<copy_tracker> x(num_elm);
+ copy_tracker::reset();
+
+ x.erase(x.begin() + elm_strt, x.begin() + elm_end);
+
+ const size_t min_num_cpy = std::min(elm_strt, num_elm - elm_end);
+ VERIFY( assignment_operator::count() == min_num_cpy );
+}
+
+// http://gcc.gnu.org/ml/libstdc++/2007-01/msg00098.html
+void test01()
+{
+ for (size_t num_elm = 0; num_elm <= 10; ++num_elm)
+ for (size_t elm_strt = 0; elm_strt <= num_elm; ++elm_strt)
+ for (size_t elm_end = elm_strt; elm_end <= num_elm; ++elm_end)
+ erase(num_elm, elm_strt, elm_end);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
gcc34-rh235008.patch:
--- NEW FILE gcc34-rh235008.patch ---
2007-04-12 Jakub Jelinek <jakub at redhat.com>
* fr.po: Use %s rather than %S.
* rw.po: Comment out translations with bogus format
strings.
--- gcc/po/fr.po.jj 2006-10-05 00:33:36.000000000 +0200
+++ gcc/po/fr.po 2007-04-13 00:23:29.000000000 +0200
@@ -17100,7 +17100,7 @@ msgstr "%s liste d'expressions traitée c
#: cp/typeck.c:4490
msgid "%s from type `%T' to type `%T' casts away constness"
-msgstr "%S à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
+msgstr "%s à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
#: cp/typeck.c:4692
msgid "invalid static_cast from type `%T' to type `%T'"
--- gcc/po/rw.po.jj 2006-10-05 00:33:36.000000000 +0200
+++ gcc/po/rw.po 2007-04-13 00:22:28.000000000 +0200
@@ -2541,8 +2541,8 @@ msgstr "-Imiterere Ikiranga"
#: c-opts.c:1139
#, fuzzy, c-format
-msgid "opening output file %s: %m"
-msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
+#~ msgid "opening output file %s: %m"
+#~ msgstr "Gufungura %s%S Ibisohoka IDOSIYE"
#: c-opts.c:1144
#, fuzzy, c-format
@@ -2556,8 +2556,8 @@ msgstr "OYA"
#: c-opts.c:1269
#, fuzzy, c-format
-msgid "opening dependency file %s: %m"
-msgstr "Gufungura %s%S IDOSIYE"
+#~ msgid "opening dependency file %s: %m"
+#~ msgstr "Gufungura %s%S IDOSIYE"
#: c-opts.c:1279
#, fuzzy, c-format
gcc34-rh235255.patch:
--- NEW FILE gcc34-rh235255.patch ---
2007-04-21 Alexandre Oliva <aoliva at redhat.com>
* gcse.c (store_killed_in_insn): Handle PARALLELs.
(store_killed_in_pat): New.
* gcc.dg/movsi-sm-1.c: New.
--- gcc/gcse.c.jj 2007-02-23 21:29:12.000000000 +0100
+++ gcc/gcse.c 2007-07-18 20:41:08.000000000 +0200
@@ -7427,6 +7427,40 @@ find_loads (rtx x, rtx store_pattern, in
return ret;
}
+static inline bool
+store_killed_in_pat (rtx x, rtx pat, int after)
+{
+ if (GET_CODE (pat) == SET)
+ {
+ rtx dest = SET_DEST (pat);
+
+ if (GET_CODE (dest) == SIGN_EXTRACT
+ || GET_CODE (dest) == ZERO_EXTRACT)
+ dest = XEXP (dest, 0);
+
+ /* Check for memory stores to aliased objects. */
+ if (GET_CODE (dest) == MEM
+ && !expr_equiv_p (dest, x))
+ {
+ if (after)
+ {
+ if (output_dependence (dest, x))
+ return true;
+ }
+ else
+ {
+ if (output_dependence (x, dest))
+ return true;
+ }
+ }
+ }
+
+ if (find_loads (pat, x, after))
+ return true;
+
+ return false;
+}
+
/* Check if INSN kills the store pattern X (is aliased with it).
AFTER is true if we are checking the case when store X occurs
after the insn. Return true if it it does. */
@@ -7434,7 +7468,7 @@ find_loads (rtx x, rtx store_pattern, in
static bool
store_killed_in_insn (rtx x, rtx x_regs, rtx insn, int after)
{
- rtx reg, base, note;
+ rtx reg, base, note, pat;
if (!INSN_P (insn))
return false;
@@ -7461,33 +7495,20 @@ store_killed_in_insn (rtx x, rtx x_regs,
return false;
}
- if (GET_CODE (PATTERN (insn)) == SET)
+ pat = PATTERN (insn);
+ if (GET_CODE (pat) == SET)
{
- rtx pat = PATTERN (insn);
- rtx dest = SET_DEST (pat);
-
- if (GET_CODE (dest) == SIGN_EXTRACT
- || GET_CODE (dest) == ZERO_EXTRACT)
- dest = XEXP (dest, 0);
-
- /* Check for memory stores to aliased objects. */
- if (GET_CODE (dest) == MEM
- && !expr_equiv_p (dest, x))
- {
- if (after)
- {
- if (output_dependence (dest, x))
- return true;
- }
- else
- {
- if (output_dependence (x, dest))
- return true;
- }
- }
- if (find_loads (SET_SRC (pat), x, after))
+ if (store_killed_in_pat (x, pat, after))
return true;
}
+ else if (GET_CODE (pat) == PARALLEL)
+ {
+ int i;
+
+ for (i = 0; i < XVECLEN (pat, 0); i++)
+ if (store_killed_in_pat (x, XVECEXP (pat, 0, i), after))
+ return true;
+ }
else if (find_loads (PATTERN (insn), x, after))
return true;
--- gcc/testsuite/gcc.dg/movsi-sm-1.c.jj 2007-07-18 20:58:08.000000000 +0200
+++ gcc/testsuite/gcc.dg/movsi-sm-1.c 2007-07-18 21:01:52.000000000 +0200
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+int ret = 1;
+char buf[128];
+
+void
+__attribute__((noinline))
+bug (int arg)
+{
+ char str[28];
+
+ __builtin_memcpy (str, "Bugged!", 8);
+
+ if (arg & 0200)
+ {
+ __builtin_memcpy (str, "This is what we should get!", 28);
+ ret = 0;
+ }
+
+ if (arg & 0100)
+ __builtin_memcpy (str, "Broken!", 8);
+
+ __builtin_sprintf (buf, "%s\n", str);
+}
+
+int
+main ()
+{
+ bug (0200);
+ if (ret)
+ return ret;
+ return __builtin_strcmp (buf, "This is what we should get!\n") != 0;
+}
gcc34-rh242685.patch:
--- NEW FILE gcc34-rh242685.patch ---
2007-06-08 Jatin Nansi <jnansi at redhat.com>
* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Make sure
_M_int_enc and _M_ext_enc are '\0' terminated.
--- libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.jj 2007-02-23 21:29:34.000000000 +0100
+++ libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h 2007-07-19 14:20:20.000000000 +0200
@@ -83,8 +83,10 @@
int __ibom = 0, int __ebom = 0)
: _M_in_desc(0), _M_out_desc(0), _M_ext_bom(__ebom), _M_int_bom(__ibom)
{
- strncpy(_M_int_enc, __int, _S_max_size);
- strncpy(_M_ext_enc, __ext, _S_max_size);
+ strncpy(_M_int_enc, __int, _S_max_size - 1);
+ strncpy(_M_ext_enc, __ext, _S_max_size - 1);
+ _M_int_enc[_S_max_size - 1] = '\0';
+ _M_ext_enc[_S_max_size - 1] = '\0';
_M_init();
}
@@ -98,8 +100,10 @@
// information.
__enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
{
- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
+ _M_int_enc[_S_max_size - 1] = '\0';
+ _M_ext_enc[_S_max_size - 1] = '\0';
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
_M_destroy();
@@ -110,8 +114,10 @@
__enc_traits&
operator=(const __enc_traits& __obj)
{
- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
+ _M_int_enc[_S_max_size - 1] = '\0';
+ _M_ext_enc[_S_max_size - 1] = '\0';
_M_ext_bom = __obj._M_ext_bom;
_M_int_bom = __obj._M_int_bom;
_M_destroy();
Index: compat-gcc-34.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compat-gcc-34/devel/compat-gcc-34.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- compat-gcc-34.spec 3 Mar 2007 13:29:46 -0000 1.6
+++ compat-gcc-34.spec 16 Oct 2007 16:17:20 -0000 1.7
@@ -16,8 +16,11 @@
Summary: Compatibility GNU Compiler Collection
Name: compat-gcc-34
Version: 3.4.6
-Release: 7
-License: GPL
+Release: 8
+# libgcc and crtstuff have an exception which allows
+# linking it into any kind of programs or shared libraries without
+# restrictions.
+License: GPLv2+ and GPLv2+ with exceptions
Group: Development/Languages
Source0: gcc-%{version}-%{DATE}.tar.bz2
Source1: dummylib.sh
@@ -103,6 +106,12 @@
Patch45: gcc34-var-tracking-coalesce.patch
Patch46: gcc34-java-zoneinfo.patch
Patch47: gcc34-libgcc-additions.patch
+Patch48: gcc34-pr24975.patch
+Patch49: gcc34-rh233941.patch
+Patch50: gcc34-rh234515.patch
+Patch51: gcc34-rh235008.patch
+Patch52: gcc34-rh235255.patch
+Patch53: gcc34-rh242685.patch
Patch100: gcc34-ldbl-hack.patch
@@ -214,6 +223,12 @@
%patch45 -p0 -b .var-tracking-coalesce~
%patch46 -p0 -b .java-zoneinfo~
%patch47 -p0 -b .libgcc-additions~
+%patch48 -p0 -b .pr24975~
+%patch49 -p0 -b .rh233941~
+%patch50 -p0 -b .rh234515~
+%patch51 -p0 -b .rh235008~
+%patch52 -p0 -b .rh235255~
+%patch53 -p0 -b .rh242685~
%patch100 -p0 -b .ldbl-hack~
@@ -232,6 +247,15 @@
mkdir obj-%{gcc_target_platform}
cd obj-%{gcc_target_platform}
+mkdir -p ld_hack
+cat > ld_hack/ld <<\EOF
+#!/bin/sh
+case " $* " in *\ -r\ *) exec /usr/bin/ld "$@";; esac
+exec /usr/bin/ld --build-id "$@"
+EOF
+chmod 755 ld_hack/ld
+export PATH=`pwd`/ld_hack/${PATH:+:$PATH}
+
if [ ! -f /usr/lib/locale/de_DE/LC_CTYPE ]; then
mkdir locale
localedef -f ISO-8859-1 -i de_DE locale/de_DE
@@ -321,6 +345,8 @@
%install
rm -fr $RPM_BUILD_ROOT
+export PATH=`pwd`/obj-%{gcc_target_platform}/ld_hack/${PATH:+:$PATH}
+
perl -pi -e \
's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
libstdc++-v3/docs/html/documentation.html
@@ -638,6 +664,19 @@
%{_prefix}/%{_lib}/libg2c.so.0*
%changelog
+* Tue Oct 16 2007 Jakub Jelinek <jakub at redhat.com> 3.4.6-8
+- update License tag
+- build with ld --build-id
+- avoid aliasing warnings in libstdc++-v3 headers when compiled
+ with g++ 4.x (Paolo Carlini, PR libstdc++/24975, #240020)
+- fix RTL expansion of COMPLEX_EXPR (#233941)
+- fix deque<>::erase(iterator, iterator) (Steve LoBasso,
+ Paolo Carlini, #234515)
+- fix french and kinyarwanda translations (#235008)
+- handle PARALLELs in GCSE store motion (Alexandre Oliva, #235255)
+- ensure zero termination for invalid, overly long, std::__enc_traits
+ internal or external character set names (Jatin Nansi, #242685)
+
* Sat Mar 3 2007 Jakub Jelinek <jakub at redhat.com> 3.4.6-7
- ignore install-info failures in scriptlets (#223680)
- don't include cpp.debug in compat-gcc-34-debuginfo (#227021)
- Previous message (by thread): rpms/kacst-fonts/devel kacst-fonts.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Term-UI/devel .cvsignore, 1.3, 1.4 perl-Term-UI.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list