------- 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

Reply via email to