public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
@ 2009-07-23 2:22 hjl dot tools at gmail dot com
2009-07-23 8:47 ` [Bug c++/40834] " rguenth at gcc dot gnu dot org
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 2:22 UTC (permalink / raw)
To: gcc-bugs
+++ This bug was initially created as a clone of Bug #40799 +++
With revision 149946, on Linux/x86-64, the problem now became
Running 483.xalancbmk ref base o3 default
483.xalancbmk: copy 0 non-zero return code (exit code=0, signal=11)
It happens with both "-O3 -ffast-math" and "-O2 -ffast-math".
--
Summary: [4.5 Regression] Revision 149750 failed 483.xalancbmk in
SPEC CPU 2006
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
BugsThisDependsOn: 40799
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
@ 2009-07-23 8:47 ` rguenth at gcc dot gnu dot org
2009-07-23 14:41 ` hjl dot tools at gmail dot com
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-23 8:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-07-23 08:47 -------
Can you try with the patch for 40799 applied before gimplification
unit-at-a-time? Does the failure reproduce with the test data or only with the
ref data?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
2009-07-23 8:47 ` [Bug c++/40834] " rguenth at gcc dot gnu dot org
@ 2009-07-23 14:41 ` hjl dot tools at gmail dot com
2009-07-23 15:21 ` rguenther at suse dot de
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjl dot tools at gmail dot com 2009-07-23 14:40 -------
(In reply to comment #1)
> Can you try with the patch for 40799 applied before gimplification
> unit-at-a-time? Does the failure reproduce with the test data or only with the
> ref data?
>
I applied the patch for PR 40799 on revision 149748 and
I got the same failure with both test/ref input data.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
2009-07-23 8:47 ` [Bug c++/40834] " rguenth at gcc dot gnu dot org
2009-07-23 14:41 ` hjl dot tools at gmail dot com
@ 2009-07-23 15:21 ` rguenther at suse dot de
2009-07-23 18:15 ` hjl dot tools at gmail dot com
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenther at suse dot de @ 2009-07-23 15:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenther at suse dot de 2009-07-23 15:21 -------
Subject: Re: [4.5 Regression] Revision 149750 failed
483.xalancbmk in SPEC CPU 2006
On Thu, 23 Jul 2009, hjl dot tools at gmail dot com wrote:
> ------- Comment #2 from hjl dot tools at gmail dot com 2009-07-23 14:40 -------
> (In reply to comment #1)
> > Can you try with the patch for 40799 applied before gimplification
> > unit-at-a-time? Does the failure reproduce with the test data or only with the
> > ref data?
> >
>
> I applied the patch for PR 40799 on revision 149748 and
> I got the same failure with both test/ref input data.
Ok, I will have a look next week. If you can figure out which source
file of 483.xalancbmk has the relevant change until then you receive
extra bonus points ;) I'm really curious that dropping lang-specific
tree earlier causes problems ...
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (2 preceding siblings ...)
2009-07-23 15:21 ` rguenther at suse dot de
@ 2009-07-23 18:15 ` hjl dot tools at gmail dot com
2009-07-23 18:19 ` hjl dot tools at gmail dot com
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl dot tools at gmail dot com 2009-07-23 18:15 -------
FunctionSubstringAfter.cpp FunctionSubstringBefore.cpp FunctionSubstring.cpp
are miscompiled. I have to replace all of them to get a working binary,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (3 preceding siblings ...)
2009-07-23 18:15 ` hjl dot tools at gmail dot com
@ 2009-07-23 18:19 ` hjl dot tools at gmail dot com
2009-07-23 18:48 ` hjl dot tools at gmail dot com
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 18:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl dot tools at gmail dot com 2009-07-23 18:19 -------
(In reply to comment #4)
> FunctionSubstringAfter.cpp FunctionSubstringBefore.cpp FunctionSubstring.cpp
> are miscompiled. I have to replace all of them to get a working binary,
>
It fails even with -O0. Replace those 3 files gives me a working binary.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (4 preceding siblings ...)
2009-07-23 18:19 ` hjl dot tools at gmail dot com
@ 2009-07-23 18:48 ` hjl dot tools at gmail dot com
2009-07-23 18:56 ` hjl dot tools at gmail dot com
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 18:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl dot tools at gmail dot com 2009-07-23 18:48 -------
Created an attachment (id=18246)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18246&action=view)
A testcase
You can compare the outputs before and after change.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (5 preceding siblings ...)
2009-07-23 18:48 ` hjl dot tools at gmail dot com
@ 2009-07-23 18:56 ` hjl dot tools at gmail dot com
2009-07-23 18:57 ` hjl dot tools at gmail dot com
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 18:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl dot tools at gmail dot com 2009-07-23 18:56 -------
Here are the differences between good and bad
GOOD const struct XalanDOMString & theFirstString = (const struct
XalanDOMString &) (const struct XalanDOMString *) OBJ_TYPE_REF(*(SAVE_EXPR
<xalanc_1_8::XObjectPtr::operator->
(&arg1)>->D.20005._vptr.XalanReferenceCountedObject + 72);SAVE_EXPR
<xalanc_1_8::XObjectPtr::operator-> (&arg1)>->9) (SAVE_EXPR
<xalanc_1_8::XObjectPtr::operator-> (&arg1)>);
BAD const struct XalanDOMString & theFirstString = (const struct XalanDOMString
&) (const struct XalanDOMString *) OBJ_TYPE_REF(*(SAVE_EXPR
<xalanc_1_8::XObjectPtr::operator-> ((const struct XObjectPtr *)
arg1)>->D.20005._vptr.XalanReferenceCountedObject + 72);SAVE_EXPR
<xalanc_1_8::XObjectPtr::operator-> ((const struct XObjectPtr *) arg1)>->9)
(SAVE_EXPR <xalanc_1_8::XObjectPtr::operator-> ((const struct XObjectPtr *)
arg1)>);
That is
(&arg1)>->D.20005._vptr.XalanReferenceCountedObject + 72)
vs.
((const struct XObjectPtr *) arg1)>->D.20005._vptr.XalanReferenceCountedObject
+ 72)
The correct one is an address. The wrong one is a cast to pointer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (6 preceding siblings ...)
2009-07-23 18:56 ` hjl dot tools at gmail dot com
@ 2009-07-23 18:57 ` hjl dot tools at gmail dot com
2009-07-23 19:16 ` hjl dot tools at gmail dot com
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl dot tools at gmail dot com 2009-07-23 18:57 -------
Jason, can you take a look at this?
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (7 preceding siblings ...)
2009-07-23 18:57 ` hjl dot tools at gmail dot com
@ 2009-07-23 19:16 ` hjl dot tools at gmail dot com
2009-07-24 9:02 ` rguenther at suse dot de
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hjl dot tools at gmail dot com 2009-07-23 19:16 -------
This patch:
Index: cp-gimplify.c
===================================================================
--- cp-gimplify.c (revision 149933)
+++ cp-gimplify.c (working copy)
@@ -804,15 +804,6 @@ cp_genericize_r (tree *stmt_p, int *walk
}
}
- else if (TREE_CODE (stmt) == BIND_EXPR)
- {
- VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
- cp_walk_tree (&BIND_EXPR_BODY (stmt),
- cp_genericize_r, data, NULL);
- VEC_pop (tree, wtd->bind_expr_stack);
- *walk_subtrees = 0;
- }
-
else if (TREE_CODE (stmt) == USING_STMT)
{
tree block = NULL_TREE;
fixed the problem. Does it make any senses?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (8 preceding siblings ...)
2009-07-23 19:16 ` hjl dot tools at gmail dot com
@ 2009-07-24 9:02 ` rguenther at suse dot de
2009-07-24 14:16 ` hjl dot tools at gmail dot com
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenther at suse dot de @ 2009-07-24 9:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenther at suse dot de 2009-07-24 09:02 -------
Subject: Re: [4.5 Regression] Revision 149750 failed
483.xalancbmk in SPEC CPU 2006
On Thu, 23 Jul 2009, hjl dot tools at gmail dot com wrote:
> ------- Comment #9 from hjl dot tools at gmail dot com 2009-07-23 19:16 -------
> This patch:
>
> Index: cp-gimplify.c
> ===================================================================
> --- cp-gimplify.c (revision 149933)
> +++ cp-gimplify.c (working copy)
> @@ -804,15 +804,6 @@ cp_genericize_r (tree *stmt_p, int *walk
> }
> }
>
> - else if (TREE_CODE (stmt) == BIND_EXPR)
> - {
> - VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
> - cp_walk_tree (&BIND_EXPR_BODY (stmt),
> - cp_genericize_r, data, NULL);
> - VEC_pop (tree, wtd->bind_expr_stack);
> - *walk_subtrees = 0;
> - }
> -
> else if (TREE_CODE (stmt) == USING_STMT)
> {
> tree block = NULL_TREE;
>
> fixed the problem. Does it make any senses?
Not really. It will break debug information for using declarations.
If you add cp_walk_trees to BIND_EXPR_VARS and/or BIND_EXPR_BLOCK
does that fix it?
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (9 preceding siblings ...)
2009-07-24 9:02 ` rguenther at suse dot de
@ 2009-07-24 14:16 ` hjl dot tools at gmail dot com
2009-07-24 19:34 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-24 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from hjl dot tools at gmail dot com 2009-07-24 14:16 -------
(In reply to comment #10)
> Subject: Re: [4.5 Regression] Revision 149750 failed
> 483.xalancbmk in SPEC CPU 2006
>
> On Thu, 23 Jul 2009, hjl dot tools at gmail dot com wrote:
>
> > ------- Comment #9 from hjl dot tools at gmail dot com 2009-07-23 19:16 -------
> > This patch:
> >
> > Index: cp-gimplify.c
> > ===================================================================
> > --- cp-gimplify.c (revision 149933)
> > +++ cp-gimplify.c (working copy)
> > @@ -804,15 +804,6 @@ cp_genericize_r (tree *stmt_p, int *walk
> > }
> > }
> >
> > - else if (TREE_CODE (stmt) == BIND_EXPR)
> > - {
> > - VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
> > - cp_walk_tree (&BIND_EXPR_BODY (stmt),
> > - cp_genericize_r, data, NULL);
> > - VEC_pop (tree, wtd->bind_expr_stack);
> > - *walk_subtrees = 0;
> > - }
> > -
> > else if (TREE_CODE (stmt) == USING_STMT)
> > {
> > tree block = NULL_TREE;
> >
> > fixed the problem. Does it make any senses?
>
> Not really. It will break debug information for using declarations.
>
> If you add cp_walk_trees to BIND_EXPR_VARS and/or BIND_EXPR_BLOCK
> does that fix it?
>
> Richard.
>
I tried
Index: cp-gimplify.c
===================================================================
--- cp-gimplify.c (revision 149933)
+++ cp-gimplify.c (working copy)
@@ -807,6 +807,10 @@ cp_genericize_r (tree *stmt_p, int *walk
else if (TREE_CODE (stmt) == BIND_EXPR)
{
VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
+ cp_walk_tree (&BIND_EXPR_VARS (stmt),
+ cp_genericize_r, data, NULL);
+ cp_walk_tree (&BIND_EXPR_BLOCK (stmt),
+ cp_genericize_r, data, NULL);
cp_walk_tree (&BIND_EXPR_BODY (stmt),
cp_genericize_r, data, NULL);
VEC_pop (tree, wtd->bind_expr_stack);
It doesn't help.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (10 preceding siblings ...)
2009-07-24 14:16 ` hjl dot tools at gmail dot com
@ 2009-07-24 19:34 ` rguenth at gcc dot gnu dot org
2009-07-24 19:52 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-24 19:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2009-07-24 19:34 -------
Hm, I'm quite lost here. But at least here is a simplified testcase which
shows the same differences.
class XalanDOMString { };
class XObject {
public:
virtual const XalanDOMString& str() const;
};
class XObjectPtr {
public:
XObjectPtr(const XObjectPtr&);
const XObject* operator->() const;
};
class FunctionSubstringBefore
{
void execute(const XObjectPtr arg1) const;
};
void
FunctionSubstringBefore::execute(const XObjectPtr arg1) const
{
const XalanDOMString& theFirstString = arg1->str();
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-24 19:34:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (11 preceding siblings ...)
2009-07-24 19:34 ` rguenth at gcc dot gnu dot org
@ 2009-07-24 19:52 ` rguenth at gcc dot gnu dot org
2009-07-24 19:59 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-24 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2009-07-24 19:52 -------
I see what goes wrong. preparing a patch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-07-24 19:34:08 |2009-07-24 19:52:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (12 preceding siblings ...)
2009-07-24 19:52 ` rguenth at gcc dot gnu dot org
@ 2009-07-24 19:59 ` rguenth at gcc dot gnu dot org
2009-07-24 20:01 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-24 19:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-07-24 19:59 -------
Index: cp/cp-gimplify.c
===================================================================
--- cp/cp-gimplify.c (revision 150041)
+++ cp/cp-gimplify.c (working copy)
@@ -804,10 +804,14 @@ cp_genericize_r (tree *stmt_p, int *walk
}
}
- else if (TREE_CODE (stmt) == BIND_EXPR)
+ else if (TREE_CODE (stmt) == BIND_EXPR
+ /* We walk this twice, once to keep track of the BIND_EXPR
+ stack and once to properly walk the BIND_EXPR vars. */
+ && (VEC_empty (tree, wtd->bind_expr_stack)
+ || VEC_last (tree, wtd->bind_expr_stack) != stmt))
{
VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
- cp_walk_tree (&BIND_EXPR_BODY (stmt),
+ cp_walk_tree (stmt_p,
cp_genericize_r, data, NULL);
VEC_pop (tree, wtd->bind_expr_stack);
*walk_subtrees = 0;
in case you want to do some testing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (13 preceding siblings ...)
2009-07-24 19:59 ` rguenth at gcc dot gnu dot org
@ 2009-07-24 20:01 ` rguenth at gcc dot gnu dot org
2009-07-24 20:06 ` hjl dot tools at gmail dot com
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-24 20:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2009-07-24 20:01 -------
The short explanation is that we did not properly walk DECL_INITIAL of the
vars in the BIND_EXPR. Not with walking BIND_EXPR_VARS either because we
stop at VAR_DECLs in cp_genericize_r before walking its DECL_INITIAL.
walk_tree does not have this issue because it does not walk the VAR_DECLs
directly but only certain fields of it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (14 preceding siblings ...)
2009-07-24 20:01 ` rguenth at gcc dot gnu dot org
@ 2009-07-24 20:06 ` hjl dot tools at gmail dot com
2009-07-24 21:56 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-24 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from hjl dot tools at gmail dot com 2009-07-24 20:06 -------
(In reply to comment #14)
> Index: cp/cp-gimplify.c
> ===================================================================
> --- cp/cp-gimplify.c (revision 150041)
> +++ cp/cp-gimplify.c (working copy)
> @@ -804,10 +804,14 @@ cp_genericize_r (tree *stmt_p, int *walk
> }
> }
>
> - else if (TREE_CODE (stmt) == BIND_EXPR)
> + else if (TREE_CODE (stmt) == BIND_EXPR
> + /* We walk this twice, once to keep track of the BIND_EXPR
> + stack and once to properly walk the BIND_EXPR vars. */
> + && (VEC_empty (tree, wtd->bind_expr_stack)
> + || VEC_last (tree, wtd->bind_expr_stack) != stmt))
> {
> VEC_safe_push (tree, heap, wtd->bind_expr_stack, stmt);
> - cp_walk_tree (&BIND_EXPR_BODY (stmt),
> + cp_walk_tree (stmt_p,
> cp_genericize_r, data, NULL);
> VEC_pop (tree, wtd->bind_expr_stack);
> *walk_subtrees = 0;
>
>
> in case you want to do some testing.
>
It works. Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (15 preceding siblings ...)
2009-07-24 20:06 ` hjl dot tools at gmail dot com
@ 2009-07-24 21:56 ` hjl dot tools at gmail dot com
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-24 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from hjl dot tools at gmail dot com 2009-07-24 21:55 -------
Created an attachment (id=18251)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18251&action=view)
A testcase
[hjl@gnu-34 bad]$ make
/export/gnu/import/rrs/149748-fixed/usr/bin/g++ -S pr40834.C -o bad.s
/export/gnu/import/rrs/149748/usr/bin/g++ -S pr40834.C -o good.s
g++ -o bad bad.s
g++ -o good good.s
./good
./bad
make: *** [all] Aborted
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #18246|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (16 preceding siblings ...)
2009-07-24 21:56 ` hjl dot tools at gmail dot com
@ 2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
2009-08-05 14:45 ` hjl at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-29 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from rguenth at gcc dot gnu dot org 2009-07-29 20:16 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (17 preceding siblings ...)
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
@ 2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
2009-08-05 14:45 ` hjl at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-29 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from rguenth at gcc dot gnu dot org 2009-07-29 20:16 -------
Subject: Bug 40834
Author: rguenth
Date: Wed Jul 29 20:16:32 2009
New Revision: 150222
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150222
Log:
2009-07-29 Richard Guenther <rguenther@suse.de>
PR c++/40834
* cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
vars.
* g++.dg/torture/pr40834.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr40834.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/40834] [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
` (18 preceding siblings ...)
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
@ 2009-08-05 14:45 ` hjl at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-08-05 14:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from hjl at gcc dot gnu dot org 2009-08-05 14:45 -------
Subject: Bug 40834
Author: hjl
Date: Wed Aug 5 14:45:15 2009
New Revision: 150487
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150487
Log:
2009-07-28 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-07-30 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40570
* gcc.c-torture/compile/pr40570.c: New test.
2009-07-29 Richard Guenther <rguenther@suse.de>
PR c++/40834
* g++.dg/torture/pr40834.C: New testcase.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr40834.C
- copied unchanged from r150485,
trunk/gcc/testsuite/g++.dg/torture/pr40834.C
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40570.c
- copied unchanged from r150484,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40570.c
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40834
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2009-08-05 14:45 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 2:22 [Bug c++/40834] New: [4.5 Regression] Revision 149750 failed 483.xalancbmk in SPEC CPU 2006 hjl dot tools at gmail dot com
2009-07-23 8:47 ` [Bug c++/40834] " rguenth at gcc dot gnu dot org
2009-07-23 14:41 ` hjl dot tools at gmail dot com
2009-07-23 15:21 ` rguenther at suse dot de
2009-07-23 18:15 ` hjl dot tools at gmail dot com
2009-07-23 18:19 ` hjl dot tools at gmail dot com
2009-07-23 18:48 ` hjl dot tools at gmail dot com
2009-07-23 18:56 ` hjl dot tools at gmail dot com
2009-07-23 18:57 ` hjl dot tools at gmail dot com
2009-07-23 19:16 ` hjl dot tools at gmail dot com
2009-07-24 9:02 ` rguenther at suse dot de
2009-07-24 14:16 ` hjl dot tools at gmail dot com
2009-07-24 19:34 ` rguenth at gcc dot gnu dot org
2009-07-24 19:52 ` rguenth at gcc dot gnu dot org
2009-07-24 19:59 ` rguenth at gcc dot gnu dot org
2009-07-24 20:01 ` rguenth at gcc dot gnu dot org
2009-07-24 20:06 ` hjl dot tools at gmail dot com
2009-07-24 21:56 ` hjl dot tools at gmail dot com
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
2009-07-29 20:17 ` rguenth at gcc dot gnu dot org
2009-08-05 14:45 ` hjl at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).