This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor)


cc1plus crashes for the testcase I'll attach later.  There is a PLUS_EXPR, the
second operand of which is NULL. setting a breakpoint cgraph_lower_function
shows that the crash happens after cgraph_lower_function is called a second time;
moreover, the by probing the different addresses where the PLUS_EXPR ended up
during multiple runs, the offending PLUS_EXPR can be found at the start of
the second cgraph_lower_function call:

(gdb) p ((tree)0xb595ff9c)->common.code
$7 = PLUS_EXPR
(gdb) call debug_tree((tree)0xb595ff9c)
 <plus_expr 0xb595ff9c
    type <pointer_type 0xb595eb24
        type <pointer_type 0xb593205c type <pointer_type 0xb5927f74 __vtbl_ptr_type>
            sizes-gimplified unsigned SI
            size <integer_cst 0xb58ab3f0 constant invariant 32>
            unit size <integer_cst 0xb58ab180 constant invariant 4>
            align 32 symtab 0 alias set -1
            pointer_to_this <pointer_type 0xb595eb24>>
        unsigned SI size <integer_cst 0xb58ab3f0 32> unit size <integer_cst
0xb58ab180 4>
        align 32 symtab 0 alias set -1>
    readonly
    arg 0 <var_decl 0xb5961b00 __vtt_parm.7 type <pointer_type 0xb595eb24>
        used unsigned ignored SI file foo.ii line 30 size <integer_cst
0xb58ab3f0 32> unit size <integer_cst 0xb58ab180 4>
        align 32 context <function_decl 0xb5955580 __comp_ctor > abstract_origin
 <var_decl 0xb595a9f8 __vtt_parm.7>
        chain <var_decl 0xb5961b58 D.1949 type <pointer_type 0xb595eb24>
            used unsigned ignored SI file foo.ii line 30 size <integer_cst
0xb58ab3f0 32> unit size <integer_cst 0xb58ab180 4>
            align 32 context <function_decl 0xb5955580 __comp_ctor >
abstract_origin <var_decl 0xb595aa50 D.1901> chain <var_decl 0xb5961bb0 D.1950>>>>

Strangely enough, the this PLUS_EXPRESSION appears not to have been made by
make_node_stat.

-- 
           Summary: second operand of PLUS_EXPR is NULL (in constructor)
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]