* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
@ 2006-04-19 14:08 ` tbm at cyrius dot com
2006-04-19 14:10 ` tbm at cyrius dot com
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tbm at cyrius dot com @ 2006-04-19 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tbm at cyrius dot com 2006-04-19 14:07 -------
Created an attachment (id=11298)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11298&action=view)
test case, reduced with delta
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
2006-04-19 14:08 ` [Bug tree-optimization/27218] " tbm at cyrius dot com
@ 2006-04-19 14:10 ` tbm at cyrius dot com
2006-04-19 15:53 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tbm at cyrius dot com @ 2006-04-19 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tbm at cyrius dot com 2006-04-19 14:10 -------
Created an attachment (id=11299)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11299&action=view)
smaller test case
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #11298|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
2006-04-19 14:08 ` [Bug tree-optimization/27218] " tbm at cyrius dot com
2006-04-19 14:10 ` tbm at cyrius dot com
@ 2006-04-19 15:53 ` pinskia at gcc dot gnu dot org
2006-04-19 16:03 ` tbm at cyrius dot com
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-19 15:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-19 15:53 -------
Reduced testcase at least for PPC:
struct Vector
{
double _x, _y;
};
typedef Vector Point;
Vector d;
static inline Vector f(void)
{
return d;
}
void add_duck (void)
{
new Point (f());
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2006-04-19 15:53:29
date| |
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (2 preceding siblings ...)
2006-04-19 15:53 ` pinskia at gcc dot gnu dot org
@ 2006-04-19 16:03 ` tbm at cyrius dot com
2006-04-20 8:45 ` [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tbm at cyrius dot com @ 2006-04-19 16:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tbm at cyrius dot com 2006-04-19 16:03 -------
Yep, also on i386, thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (3 preceding siblings ...)
2006-04-19 16:03 ` tbm at cyrius dot com
@ 2006-04-20 8:45 ` rguenth at gcc dot gnu dot org
2006-04-22 18:13 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-20 8:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2006-04-20 08:44 -------
(gdb) call debug_generic_expr(stmt)
*(struct VectorD.1984 *) D.2012 = dD.1989
that's not gimple. We trip over that in into-ssa.
(gdb) call debug_bb_n(2)
;; basic block 2, loop depth 0, count 0
;; prev block 0, next block 1
;; pred: ENTRY (fallthru)
;; succ: EXIT
<bb 2>:
D.2013 = operator new (16);
D.2012 = (struct Point *) D.2013;
*(struct Vector *) D.2012 = d;
return;
We gimplified that to
void add_duck() ()
{
struct Point * D.2012;
void * D.2013;
D.2013 = operator new (16);
D.2012 = (struct Point *) D.2013;
try
{
*D.2012 = f () [return slot optimization];
}
catch
{
operator delete (D.2012);
}
}
but after inlining we get
void add_duck() ()
{
void * D.2013;
struct Point * D.2012;
<bb 2>:
D.2013 = operator new (16);
D.2012 = (struct Point *) D.2013;
*(struct Vector *) D.2012 = d;
return;
}
So inlining produces the non-gimple trees.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
GCC build triplet|i486-linux-gnu |
GCC host triplet|i486-linux-gnu |
GCC target triplet|i486-linux-gnu |
Summary|[4.1/4.2 regression] ICE in |[4.1/4.2 regression] ICE in
|get_indirect_ref_operands, |get_indirect_ref_operands,
|at tree-ssa-operands.c:1515 |at tree-ssa-operands.c:1515,
| |inlining produces non-gimple
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (4 preceding siblings ...)
2006-04-20 8:45 ` [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple rguenth at gcc dot gnu dot org
@ 2006-04-22 18:13 ` pinskia at gcc dot gnu dot org
2006-04-22 18:30 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-22 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-04-22 18:13 -------
The inliner is not producing the NOP_EXPR at all
but instead if comes from build_fold_addr_expr_with_type
And:
if (TREE_TYPE (t) != ptrtype)
t = build1 (NOP_EXPR, ptrtype, t);
Here the types don't match but they are compatible.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (5 preceding siblings ...)
2006-04-22 18:13 ` pinskia at gcc dot gnu dot org
@ 2006-04-22 18:30 ` pinskia at gcc dot gnu dot org
2006-04-22 20:05 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-22 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-04-22 18:29 -------
This patch fixes it for me (but I don't have time right now to test it):
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 112997)
+++ tree-inline.c (working copy)
@@ -2073,6 +2077,7 @@ expand_call_inline (basic_block bb, tree
if (CALL_EXPR_RETURN_SLOT_OPT (t))
{
return_slot_addr = build_fold_addr_expr (modify_dest);
+ STRIP_USELESS_TYPE_CONVERSION (return_slot_addr);
modify_dest = NULL;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (6 preceding siblings ...)
2006-04-22 18:30 ` pinskia at gcc dot gnu dot org
@ 2006-04-22 20:05 ` rguenth at gcc dot gnu dot org
2006-04-23 11:25 ` patchapp at dberlin dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-22 20:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2006-04-22 20:05 -------
Bootstrapped and tested on x86_64-unknown-linux-gnu.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (7 preceding siblings ...)
2006-04-22 20:05 ` rguenth at gcc dot gnu dot org
@ 2006-04-23 11:25 ` patchapp at dberlin dot org
2006-04-24 8:17 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: patchapp at dberlin dot org @ 2006-04-23 11:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from patchapp at dberlin dot org 2006-04-23 11:25 -------
Subject: Bug number PR27218
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00872.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (8 preceding siblings ...)
2006-04-23 11:25 ` patchapp at dberlin dot org
@ 2006-04-24 8:17 ` rguenth at gcc dot gnu dot org
2006-04-27 9:58 ` [Bug tree-optimization/27218] [4.1 " rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-24 8:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2006-04-24 08:17 -------
Subject: Bug 27218
Author: rguenth
Date: Mon Apr 24 08:17:42 2006
New Revision: 113218
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113218
Log:
2006-04-24 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>
PR tree-optimization/27218
* tree-inline.c (expand_call_inline): Strip useless type
conversions for the return slot address.
* g++.dg/tree-ssa/pr27218.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/pr27218.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (9 preceding siblings ...)
2006-04-24 8:17 ` rguenth at gcc dot gnu dot org
@ 2006-04-27 9:58 ` rguenth at gcc dot gnu dot org
2006-04-28 11:44 ` rguenth at gcc dot gnu dot org
2006-04-28 12:12 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-27 9:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-04-27 09:58 -------
Fixed on the mainline.
--
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
Keywords| |patch
Known to fail|4.2.0 |4.1.1
Known to work| |4.2.0
Last reconfirmed|2006-04-19 15:53:29 |2006-04-27 09:58:43
date| |
Summary|[4.1/4.2 regression] ICE in |[4.1 regression] ICE in
|get_indirect_ref_operands, |get_indirect_ref_operands,
|at tree-ssa-operands.c:1515,|at tree-ssa-operands.c:1515,
|inlining produces non-gimple|inlining produces non-gimple
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (10 preceding siblings ...)
2006-04-27 9:58 ` [Bug tree-optimization/27218] [4.1 " rguenth at gcc dot gnu dot org
@ 2006-04-28 11:44 ` rguenth at gcc dot gnu dot org
2006-04-28 12:12 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-28 11:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-04-28 11:43 -------
Subject: Bug 27218
Author: rguenth
Date: Fri Apr 28 11:43:43 2006
New Revision: 113343
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113343
Log:
2006-04-28 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>
PR middle-end/26869
* tree-complex.c (update_parameter_components): Don't handle
unused parameters which have no default def.
* gcc.dg/torture/pr26869.c: New testcase.
PR tree-optimization/27236
* tree-inline.c (copy_body_r): Make sure to copy
TREE_THIS_VOLATILE flag.
* gcc.dg/tree-ssa/pr27236.c: New testcase.
PR tree-optimization/27218
* tree-inline.c (expand_call_inline): Strip useless type
conversions for the return slot address.
* g++.dg/tree-ssa/pr27218.C: New testcase.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr27218.C
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr26869.c
- copied unchanged from r113219,
trunk/gcc/testsuite/gcc.dg/torture/pr26869.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr27236.c
- copied unchanged from r113221,
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr27236.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/tree-complex.c
branches/gcc-4_1-branch/gcc/tree-inline.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27218
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/27218] [4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515, inlining produces non-gimple
2006-04-19 14:07 [Bug tree-optimization/27218] New: [4.1/4.2 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1515 tbm at cyrius dot com
` (11 preceding siblings ...)
2006-04-28 11:44 ` rguenth at gcc dot gnu dot org
@ 2006-04-28 12:12 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-28 12:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2006-04-28 12:12 -------
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=27218
^ permalink raw reply [flat|nested] 14+ messages in thread