* [Bug target/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
@ 2009-06-20 17:41 ` kurt at roeckx dot be
2009-06-20 18:16 ` danglin at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: kurt at roeckx dot be @ 2009-06-20 17:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kurt at roeckx dot be 2009-06-20 17:41 -------
Created an attachment (id=18033)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18033&action=view)
Preproccessed file using g++ 4.3.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
2009-06-20 17:41 ` [Bug target/40505] " kurt at roeckx dot be
@ 2009-06-20 18:16 ` danglin at gcc dot gnu dot org
2009-06-20 20:42 ` danglin at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-06-20 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from danglin at gcc dot gnu dot org 2009-06-20 18:16 -------
Also fails with head: gcc version 4.5.0 20090619 (experimental) [trunk revision
148688] (GCC).
--
danglin 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-06-20 18:16:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
2009-06-20 17:41 ` [Bug target/40505] " kurt at roeckx dot be
2009-06-20 18:16 ` danglin at gcc dot gnu dot org
@ 2009-06-20 20:42 ` danglin at gcc dot gnu dot org
2009-06-20 21:57 ` danglin at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-06-20 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from danglin at gcc dot gnu dot org 2009-06-20 20:42 -------
Breakpoint 3, expand_expr_addr_expr_1 (exp=0x40d8a300, target=0x0,
tmode=SImode, modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6887
6887 gcc_assert (MEM_P (result));
(gdb) p debug_rtx (result)
(concat:DC (reg:DF 99 [ s.1575 ])
(reg:DF 100 [ s.1575+8 ]))
$17 = void
(gdb) p debug_tree (exp)
<var_decl 0x40d8a300 s.1575
type <record_type 0x40dfcf50 Complex needs-constructing type_1 type_5
type_6 DC
size <integer_cst 0x4006e7a0 constant 128>
unit size <integer_cst 0x4006e7c0 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x40c458c0
fields <field_decl 0x40ca3c00 _M_value type <complex_type 0x40cb8cb0
_ComplexT>
used private nonlocal decl_3 DC file /usr/include/c++/4.3/complex
line 1197 col 17 size <integer_cst 0x4006e7a0 128> unit size <integer_cst
0x4006e7c0 16>
align 64 offset_align 64
offset <integer_cst 0x4006e320 constant 0>
bit offset <integer_cst 0x4006e8e0 constant 0> context <record_type
0x40c458c0 complex> chain <type_decl 0x40cb8a80 complex>> context
<namespace_decl 0x4007e770 std>
full-name "struct ngbla::Complex"
needs-constructor X() X(constX&) this=(X&) n_parents=0 use_template=2
interface-unknown
pointer_to_this <pointer_type 0x40e031c0> reference_to_this
<reference_type 0x40e03ee0> chain <type_decl 0x40c45930 complex>>
used DC file include/../linalg/basematrix.hpp line 107 col 16 size
<integer_cst 0x4006e7a0 128> unit size <integer_cst 0x4006e7c0 16>
align 64 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
(concat:DC (reg:DF 99 [ s.1575 ])
(reg:DF 100 [ s.1575+8 ])) chain <var_decl 0x40d8a360 D.49402>>
$18 = void
(gdb) bt
#0 expand_expr_addr_expr_1 (exp=0x40d8a300, target=0x0, tmode=SImode,
modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6887
#1 0x00572a70 in expand_expr_addr_expr (exp=0x4057eaa0, target=0x0,
tmode=SImode, modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6986
#2 0x005871a8 in expand_expr_real_1 (exp=0x4057eaa0, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../gcc/gcc/expr.c:9309
#3 0x00573328 in expand_expr_real (exp=0x4057eaa0, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../gcc/gcc/expr.c:7183
#4 0x004565b4 in expand_normal (exp=0x4057eaa0) at ../../gcc/gcc/expr.h:548
#5 0x00455cc0 in precompute_register_parameters (num_actuals=4,
args=0xbff03660, reg_parm_seen=0xbff03574) at ../../gcc/gcc/calls.c:677
#6 0x0045d0e0 in expand_call (exp=0x40f801c0, target=0x0, ignore=1)
at ../../gcc/gcc/calls.c:2721
#7 0x00579b54 in expand_expr_real_1 (exp=0x40f801c0, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../gcc/gcc/expr.c:8142
#8 0x005732f0 in expand_expr_real (exp=0x40f801c0, target=0x40073310,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../gcc/gcc/expr.c:7177
#9 0x008e5714 in expand_expr (exp=0x40f801c0, target=0x40073310,
mode=VOIDmode, modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.h:542
---Type <return> to continue, or q <return> to quit---
#10 0x008e7300 in expand_expr_stmt (exp=0x40f801c0)
at ../../gcc/gcc/stmt.c:1353
#11 0x00ca041c in expand_gimple_basic_block (bb=0x412d7090)
at ../../gcc/gcc/cfgexpand.c:2146
#12 0x00ca2d40 in gimple_expand_cfg () at ../../gcc/gcc/cfgexpand.c:2586
#13 0x007c23ec in execute_one_pass (pass=0xf63640)
at ../../gcc/gcc/passes.c:1289
#14 0x007c2768 in execute_pass_list (pass=0xf63640)
at ../../gcc/gcc/passes.c:1338
#15 0x009a0654 in tree_rest_of_compilation (fndecl=0x40f59180)
at ../../gcc/gcc/tree-optimize.c:394
#16 0x00be4170 in cgraph_expand_function (node=0x4118c100)
at ../../gcc/gcc/cgraphunit.c:1097
#17 0x00be1910 in cgraph_process_new_functions ()
at ../../gcc/gcc/cgraphunit.c:430
#18 0x00be43f8 in cgraph_expand_all_functions ()
at ../../gcc/gcc/cgraphunit.c:1159
#19 0x00be4c2c in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1379
#20 0x001eb250 in cp_write_global_declarations ()
at ../../gcc/gcc/cp/decl2.c:3642
#21 0x009079dc in compile_file () at ../../gcc/gcc/toplev.c:1036
#22 0x0090ab78 in do_compile () at ../../gcc/gcc/toplev.c:2345
#23 0x0090acc4 in toplev_main (argc=12, argv=0xbff01024)
---Type <return> to continue, or q <return> to quit---
at ../../gcc/gcc/toplev.c:2390
#24 0x003df0b4 in main (argc=12, argv=0xbff01024) at ../../gcc/gcc/main.c:35
(gdb) frame 1
#1 0x00572a70 in expand_expr_addr_expr (exp=0x4057eaa0, target=0x0,
tmode=SImode, modifier=EXPAND_NORMAL) at ../../gcc/gcc/expr.c:6986
6986 result = expand_expr_addr_expr_1 (TREE_OPERAND (exp, 0), target,
(gdb) p debug_tree (exp)
<addr_expr 0x4057eaa0
type <pointer_type 0x40e031c0
type <record_type 0x40dfcf50 Complex needs-constructing type_1 type_5
type_6 DC
size <integer_cst 0x4006e7a0 constant 128>
unit size <integer_cst 0x4006e7c0 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x40c458c0 fields
<field_decl 0x40ca3c00 _M_value> context <namespace_decl 0x4007e770 std>
full-name "struct ngbla::Complex"
needs-constructor X() X(constX&) this=(X&) n_parents=0
use_template=2 interface-unknown
pointer_to_this <pointer_type 0x40e031c0> reference_to_this
<reference_type 0x40e03ee0> chain <type_decl 0x40c45930 complex>>
public unsigned SI
size <integer_cst 0x4006e560 constant 32>
unit size <integer_cst 0x4006e300 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x40cb8e70>
arg 0 <var_decl 0x40d8a300 s.1575 type <record_type 0x40dfcf50 Complex>
used DC file include/../linalg/basematrix.hpp line 107 col 16 size
<integer_cst 0x4006e7a0 128> unit size <integer_cst 0x4006e7c0 16>
align 64 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
(concat:DC (reg:DF 99 [ s.1575 ])
(reg:DF 100 [ s.1575+8 ]))
chain <var_decl 0x40d8a360 D.49402 type <pointer_type 0x41218f50>
used unsigned ignored SI file linalg/basematrix.cpp line 208 col 1
size <integer_cst 0x4006e560 32> unit size <integer_cst 0x4006e300 4>
align 32 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
chain <var_decl 0x40d8a3c0 D.49403>>>>
$19 = void
(gdb)
<addr_expr 0x4057eaa0
type <pointer_type 0x40e031c0
type <record_type 0x40dfcf50 Complex needs-constructing type_1 type_5
type_6 DC
size <integer_cst 0x4006e7a0 constant 128>
unit size <integer_cst 0x4006e7c0 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x40c458c0 fields
<field_decl 0x40ca3c00 _M_value> context <namespace_decl 0x4007e770 std>
full-name "struct ngbla::Complex"
needs-constructor X() X(constX&) this=(X&) n_parents=0
use_template=2 interface-unknown
pointer_to_this <pointer_type 0x40e031c0> reference_to_this
<reference_type 0x40e03ee0> chain <type_decl 0x40c45930 complex>>
public unsigned SI
size <integer_cst 0x4006e560 constant 32>
unit size <integer_cst 0x4006e300 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x40cb8e70>
arg 0 <var_decl 0x40d8a300 s.1575 type <record_type 0x40dfcf50 Complex>
used DC file include/../linalg/basematrix.hpp line 107 col 16 size
<integer_cst 0x4006e7a0 128> unit size <integer_cst 0x4006e7c0 16>
align 64 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
(concat:DC (reg:DF 99 [ s.1575 ])
(reg:DF 100 [ s.1575+8 ]))
chain <var_decl 0x40d8a360 D.49402 type <pointer_type 0x41218f50>
used unsigned ignored SI file linalg/basematrix.cpp line 208 col 1
size <integer_cst 0x4006e560 32> unit size <integer_cst 0x4006e300 4>
align 32 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
chain <var_decl 0x40d8a3c0 D.49403>>>>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
` (2 preceding siblings ...)
2009-06-20 20:42 ` danglin at gcc dot gnu dot org
@ 2009-06-20 21:57 ` danglin at gcc dot gnu dot org
2009-06-20 22:07 ` [Bug middle-end/40505] " danglin at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-06-20 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from danglin at gcc dot gnu dot org 2009-06-20 21:57 -------
The addr_expr originates here:
/* If we're compiling a thunk, pass through invisible references
instead of making a copy. */
if (call_from_thunk_p
|| (callee_copies
&& !TREE_ADDRESSABLE (type)
&& (base = get_base_address (args[i].tree_value))
&& TREE_CODE (base) != SSA_NAME
&& (!DECL_P (base) || MEM_P (DECL_RTL (base)))))
{
/* We can't use sibcalls if a callee-copied argument is
stored in the current function's frame. */
if (!call_from_thunk_p && DECL_P (base) && !TREE_STATIC (base))
*may_tailcall = false;
args[i].tree_value = build_fold_addr_expr (args[i].tree_value);
type = TREE_TYPE (args[i].tree_value);
if (*ecf_flags & ECF_CONST)
*ecf_flags &= ~(ECF_CONST | ECF_LOOPING_CONST_OR_PURE);
}
Breakpoint 7, initialize_argument_information (num_actuals=4, args=0xbff03660,
args_size=0xbff03554, n_named_args=4, exp=0x40f801c0,
struct_value_addr_value=0x0, fndecl=0x412cc780, fntype=0x40f564d0,
args_so_far=0xbff03564, reg_parm_stack_space=16,
old_stack_level=0xbff03588, old_pending_adj=0xbff0358c,
must_preallocate=0xbff03578, ecf_flags=0xbff0357c,
may_tailcall=0xbff03550 "", call_from_thunk_p=1 '\1')
at ../../gcc/gcc/calls.c:1066
1066 type = TREE_TYPE (args[i].tree_value);
(gdb) p debug_tree (args[i].tree_value)
<addr_expr 0x4057eaa0
type <pointer_type 0x40e031c0
type <record_type 0x40dfcf50 Complex needs-constructing type_1 type_5
type_6 DC
size <integer_cst 0x4006e7a0 constant 128>
unit size <integer_cst 0x4006e7c0 constant 16>
align 64 symtab 0 alias set -1 canonical type 0x40c458c0 fields
<field_decl 0x40ca3c00 _M_value> context <namespace_decl 0x4007e770 std>
full-name "struct ngbla::Complex"
needs-constructor X() X(constX&) this=(X&) n_parents=0
use_template=2 interface-unknown
pointer_to_this <pointer_type 0x40e031c0> reference_to_this
<reference_type 0x40e03ee0> chain <type_decl 0x40c45930 complex>>
public unsigned SI
size <integer_cst 0x4006e560 constant 32>
unit size <integer_cst 0x4006e300 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x40cb8e70>
arg 0 <var_decl 0x40d8a300 s.1575 type <record_type 0x40dfcf50 Complex>
used DC file include/../linalg/basematrix.hpp line 107 col 16 size
<integer_cst 0x4006e7a0 128> unit size <integer_cst 0x4006e7c0 16>
align 64 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
(concat:DC (reg:DF 99 [ s.1575 ])
(reg:DF 100 [ s.1575+8 ]))
chain <var_decl 0x40d8a360 D.49402 type <pointer_type 0x41218f50>
used unsigned ignored SI file linalg/basematrix.cpp line 208 col 1
size <integer_cst 0x4006e560 32> unit size <integer_cst 0x4006e300 4>
align 32 context <function_decl 0x40f59180
_ZTv0_n64_NK4ngla12S_BaseMatrixISt7complexIdEE7MultAddES2_RKNS_10BaseVectorERS4_>
chain <var_decl 0x40d8a3c0 D.49403>>>>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
` (3 preceding siblings ...)
2009-06-20 21:57 ` danglin at gcc dot gnu dot org
@ 2009-06-20 22:07 ` danglin at gcc dot gnu dot org
2009-06-21 19:13 ` dave at hiauly1 dot hia dot nrc dot ca
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-06-20 22:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from danglin at gcc dot gnu dot org 2009-06-20 22:07 -------
Oh, call_from_thunk_p is 1 and the var_decl is a pair of registers. So,
there is no way to pass by reference without making a copy.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
` (4 preceding siblings ...)
2009-06-20 22:07 ` [Bug middle-end/40505] " danglin at gcc dot gnu dot org
@ 2009-06-21 19:13 ` dave at hiauly1 dot hia dot nrc dot ca
2009-11-02 19:29 ` sje at cup dot hp dot com
2009-11-02 20:11 ` dave at hiauly1 dot hia dot nrc dot ca
7 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2009-06-21 19:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca 2009-06-21 19:13 -------
Subject: Re: hppa: ICE: in expand_expr_addr_expr_1,
at expr.c:6830
Untested patch attached for comment.
Dave
------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca 2009-06-21 19:13 -------
Created an attachment (id=18042)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18042&action=view)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
` (5 preceding siblings ...)
2009-06-21 19:13 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2009-11-02 19:29 ` sje at cup dot hp dot com
2009-11-02 20:11 ` dave at hiauly1 dot hia dot nrc dot ca
7 siblings, 0 replies; 11+ messages in thread
From: sje at cup dot hp dot com @ 2009-11-02 19:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from sje at cup dot hp dot com 2009-11-02 19:29 -------
Dave, did you get any comments on your proposed patch? I just got a bug
report from a GCC user that appears to be this same problem.
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/40505] hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
2009-06-20 17:39 [Bug target/40505] New: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830 kurt at roeckx dot be
` (6 preceding siblings ...)
2009-11-02 19:29 ` sje at cup dot hp dot com
@ 2009-11-02 20:11 ` dave at hiauly1 dot hia dot nrc dot ca
7 siblings, 0 replies; 11+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2009-11-02 20:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dave at hiauly1 dot hia dot nrc dot ca 2009-11-02 20:10 -------
Subject: Re: hppa: ICE: in expand_expr_addr_expr_1, at expr.c:6830
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00374.html
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40505
^ permalink raw reply [flat|nested] 11+ messages in thread