Bug ID: 77979
           Summary: ICE on valid code at -Os and above on
                    x86_64-linux-gnu: Segmentation fault
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot
          Reporter: su at cs dot
  Target Milestone: ---

This is a regression from 6.2.x.

$ gcc-trunk -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20161013 (experimental) [trunk revision 241136] (GCC)
$ gcc-trunk -O1 -c small.c
$ gcc-6.2 -Os -c small.c
$ gcc-trunk -Os -c small.c
small.c: In function ‘fn1’:
small.c:3:6: internal compiler error: Segmentation fault
 void fn1 ()
0xbe954f crash_signal
0xe7b040 tree_check
0xe7b040 get_value_range
0xe7f51c get_vr_for_comparison
0xe7f51c compare_names
0xe7f51c vrp_evaluate_conditional_warnv_with_ops
0xe7f93b vrp_evaluate_conditional
0xe90f36 simplify_stmt_for_jump_threading
0xdf169e simplify_control_stmt_condition
0xdf20e8 thread_through_normal_block
0xdf3402 thread_across_edge(gcond*, edge_def*, bool, const_and_copies*,
avail_exprs_stack*, tree_node* (*)(gimple*, gimple*, avail_exprs_stack*))
0xe88843 identify_jump_threads
0xe88843 vrp_finalize
0xe88843 execute_vrp
0xe88843 execute
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.


int a, b, c, d, e, f;

void fn1 ()
  int g = b;
  a = -~(d || a) << 4 || e;
  b = c || g ^ a;
  if (f < g)
    d = e;

Reply via email to