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

             Bug #: 51949
           Summary: expand_call: seg fault
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: dcb...@hotmail.com


Created attachment 26413
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26413
C source code

I just tried to compile the package schismtracker-20110101-1
on latest trunk dated 20120122 on an AMD x86_64 box.

The compiler said

schism/util.c: In function 'str_dup':
schism/util.c:70:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

valgrind says
==17275== Invalid read of size 1
==17275==    at 0x5E5908: expand_call(tree_node*, rtx_def*, int) (calls.c:3146)
==17275==    by 0x6D8F09: expand_expr_real_1(tree_node*, rtx_def*,
machine_mode, expand_modifier, rtx_def**) (expr.c:9922)
==17275==    by 0x5F833E: expand_gimple_stmt(gimple_statement_d*)
(cfgexpand.c:2094)
==17275==    by 0x5F92B8: expand_gimple_basic_block(basic_block_def*)
(cfgexpand.c:4034)
==17275==    by 0x5FAF1B: gimple_expand_cfg() (cfgexpand.c:4542)
==17275==    by 0x88618C: execute_one_pass(opt_pass*) (passes.c:2081)
==17275==    by 0x8866A6: execute_pass_list(opt_pass*) (passes.c:2136)
==17275==    by 0x9C4B6D: tree_rest_of_compilation(tree_node*)
(tree-optimize.c:420)
==17275==    by 0x61EB3D: cgraph_expand_function(cgraph_node*)
(cgraphunit.c:1818)
==17275==    by 0x62276B: cgraph_optimize() (cgraphunit.c:1885)
==17275==    by 0x622E19: cgraph_finalize_compilation_unit()
(cgraphunit.c:1327)
==17275==    by 0x4F4F86: c_write_global_declarations() (c-decl.c:10030)
==17275==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==17275==

Preprocessed source code attached. Flag -O3 required.

Reply via email to