Bug ID: 84739
           Summary: [6/7/8 Regression] ICE in get_value_for_expr, at
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot
  Target Milestone: ---

Affects versions 6/7/8 at -O[s23] :

$ cat z1.c
static void baz (void) __attribute__((weakref("bar")));
foo (int x, int y)
  if (x)
    y = 0;
  if (y)
    goto L1;
  y = 0;
  return y;
bar (int x, int y)
  y = foo (x, y);
  if (y != 0)
    baz ();

$ gcc-5 -O2 -c z1.c
$ gcc-8-20180304 -O2 -c z1.c
z1.c:1:13: warning: 'baz' alias between functions of incompatible types
'void(void)' and 'void(int,  int)' [-Wattribute-alias]
 static void baz (void) __attribute__((weakref("bar")));
z1.c:14:1: note: aliased declaration here
 bar (int x, int y)
during GIMPLE pass: ccp
z1.c: In function 'bar':
z1.c:14:1: internal compiler error: Segmentation fault
0xaed10f crash_signal
0xbc5401 get_value_for_expr
0xbc7ea8 ccp_propagate::visit_phi(gphi*)
0xc42778 ssa_propagation_engine::simulate_stmt(gimple*)
0xc42992 ssa_propagation_engine::simulate_block(basic_block_def*)
0xc43669 ssa_propagation_engine::ssa_propagate()
0xbc4697 do_ssa_ccp
0xbc4697 execute

Reply via email to