This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Ping: Re: [patch middle-end]: Fix PR/48814 - [4.4/4.5/4.6/4.7 Regression] Incorrect scalar increment result
- From: Benjamin De Kosnik <bkoz at redhat dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, Kai Tietz <ktietz70 at googlemail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 19 Mar 2012 14:42:41 -0700
- Subject: Re: Ping: Re: [patch middle-end]: Fix PR/48814 - [4.4/4.5/4.6/4.7 Regression] Incorrect scalar increment result
- References: <CAEwic4a8P-xbjDfiYNyj6jJXW07c1asE8xC6JBRvbX56kM63Mg@mail.gmail.com> <CAFiYyc0m-AqL2pRpaqALxAKiJNPJoH2qFRO-22OJKZLxTAFGQA@mail.gmail.com> <CAFiYyc22oS_yEypAaVtObDWeu5EdHRRB6p1=rOT0Z9Lcppsqaw@mail.gmail.com> <CAFiYyc16fCxOZAyaruwMSj81o-efZ=2LO_Wksac_sjKOP2Ox+g@mail.gmail.com> <CAEwic4ZO=1HtNSg=zn7Bheu9QcmbZMFa5a3x8pedQNN85E6Qcw@mail.gmail.com> <CAFiYyc08Pf8QgENy9yd8rZ_R61WwFFcTRHyYp3MO3dvUpqLRJg@mail.gmail.com> <CAFiYyc0x26_YsG4F9y+8u5tw3HaRFdZTO=2cze2-dCRkqSjFEw@mail.gmail.com> <CAEwic4bJ=! Hj8Jj0+oTcnyVaFqipDBXDatWOU1=f4ah=LnuDLeQ@mail.gmail.com> <CAFiYyc0sm5UxEEBu_W64ZcHqX9BFpDrR=1Y3iDq1WvmGvEy9Tg@mail.gmail.com> <CAEwic4bQE5Pd27waG_xnYnCzyM3RX8r82JxCD3r471hbHrcYtg@mail.gmail.com> <CAEwic4ZG6SvFPTbjpd4Kj5azFNPTVGVANx0NYwmAXvEYT6H4Uw@mail.gmail.com> <CAFiYyc3mcSmKqq6mTvHKvTG6BQomR=ypiu4NA10qTW1HHfAS5w@mail.gmail.com> <CAH6eHdRXOTq+LnV4pJK5gGy8kRbGc1R3GE6tfSYRYoLe6_DEfA@mail.gmail.com> <CAFiYyc3naS+-irk5CBUANwnQQzU2qeULT4gqJjbbPUm31HuTPw@mail.gmail.com>
On Fri, 16 Mar 2012 11:10:48 +0100
Richard Guenther <richard.guenther@gmail.com> wrote:
> On Fri, Mar 16, 2012 at 1:29 AM, Jonathan Wakely
> <jwakely.gcc@gmail.com> wrote:
> > On 15 March 2012 15:40, Richard Guenther wrote:
> >> On Thu, Mar 15, 2012 at 4:22 PM, Kai Tietz
> >> <ktietz70@googlemail.com> wrote:
> >>> Richard,
> >>>
> >>> ping. ÂI think now could be a good time for applying the patch you
> >>> have for this issue as we are in stage 1.
> >>
> >> It will still regress the two libstdc++ testcases (well, I guess
> >> so at least).
> >>
> >> Jonathan - you didn't answer my reply to your question? ÂWould it
> >> be ok to apply this patch with leaving the regressions in-place,
> >> to be investigated by libstdc++ folks?
> >
> > Sorry, I've either forgotten or missed the reply - but if you think
> > the problem is in libstdc++ then certainly go ahead and apply it,
> > I'll investigate the libstdc++ problems (and ask for help if they
> > defeat me!)
>
> Ok. I'll do so after re-testing the patch.
FYI, here is the patch for the new libstdc++ fails.
-benjamin
2012-03-19 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pb_ds/detail/pat_trie_/
constructors_destructor_fn_imps.hpp: Increment after recursion.
* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Convert
node_type markup from brief.
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
index 8370a2e..c5748ec 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
+// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -188,7 +188,11 @@ recursive_copy_node(node_const_pointer p_ncp)
__try
{
while (child_it != p_icp->end())
- a_p_children[child_i++] = recursive_copy_node(*(child_it++));
+ {
+ a_p_children[child_i] = recursive_copy_node(*(child_it));
+ child_i++;
+ child_it++;
+ }
p_ret = s_inode_allocator.allocate(1);
}
__catch(...)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp
index b7eb024..0a763b5 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2009, 2011, 2012 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
@@ -50,7 +50,11 @@ namespace __gnu_pbds
/// Base type for PATRICIA trees.
struct pat_trie_base
{
- /// Three types of nodes.
+ /**
+ * @brief Three types of nodes.
+ *
+ * i_node is used by _Inode, leaf_node by _Leaf, and head_node by _Head.
+ */
enum node_type
{
i_node,