https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67312

            Bug ID: 67312
           Summary: [6 Regression] ICE: SIGSEGV in expand_expr_real_1
                    (expr.c:9561) with -ftree-coalesce-vars
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---

Created attachment 36235
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36235&action=edit
reduced testcase

Compiler output:
$ gcc -ftree-coalesce-vars testcase.c -wrapper valgrind,-q
==23677== Invalid read of size 2
==23677==    at 0x81C88A: expand_expr_real_1(tree_node*, rtx_def*,
machine_mode, expand_modifier, rtx_def**, bool) (expr.c:9561)
==23677==    by 0x82FA16: expand_expr (expr.h:255)
==23677==    by 0x82FA16: expand_assignment(tree_node*, tree_node*, bool)
(expr.c:5101)
==23677==    by 0x706988: expand_gimple_stmt_1 (cfgexpand.c:3599)
==23677==    by 0x706988: expand_gimple_stmt(gimple_statement_base*)
(cfgexpand.c:3695)
==23677==    by 0x708C88: expand_gimple_basic_block(basic_block_def*, bool)
(cfgexpand.c:5698)
==23677==    by 0x70F5A6: (anonymous
namespace)::pass_expand::execute(function*) (cfgexpand.c:6284)
==23677==    by 0xA3D491: execute_one_pass(opt_pass*) (passes.c:2319)
==23677==    by 0xA3D955: execute_pass_list_1(opt_pass*) [clone .constprop.79]
(passes.c:2372)
==23677==    by 0xA3D9A8: execute_pass_list(function*, opt_pass*)
(passes.c:2383)
==23677==    by 0x743AC7: cgraph_node::expand() (cgraphunit.c:1920)
==23677==    by 0x7449F2: output_in_order(bool) (cgraphunit.c:2158)
==23677==    by 0x744DDB: symbol_table::compile() [clone .part.50]
(cgraphunit.c:2403)
==23677==    by 0x747597: compile (cgraphunit.c:2473)
==23677==    by 0x747597: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2496)
==23677==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==23677== 
testcase.c: In function 'foo':
testcase.c:3:7: internal compiler error: Segmentation fault
     y = x;
       ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r227052 - ICE
5 branch r225803 - OK

Reply via email to