[Bug c/97578] ice during IPA pass: inline

2020-10-31 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97578

Zhendong Su  changed:

   What|Removed |Added

 CC||su at cs dot ucdavis.edu

--- Comment #4 from Zhendong Su  ---
Another test for the same crash (at -Os and -O2 w/o -g, but not at -O3):

[533] % gcctk -O2 -c small.c
during IPA pass: inline
small.c: In function ‘e’:
small.c:10:3: internal compiler error: Segmentation fault
   10 |   b(d);
  |   ^~~~
0xcf71ef crash_signal
../../gcc-trunk/gcc/toplev.c:330
0x825aad function_summary::get(cgraph_node*)
../../gcc-trunk/gcc/symbol-summary.h:212
0x825aad clone_info::get(cgraph_node*)
../../gcc-trunk/gcc/symtab-clones.h:70
0x825aad cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*)
../../gcc-trunk/gcc/cgraph.c:1495
0xd932bf redirect_all_calls(copy_body_data*, basic_block_def*)
../../gcc-trunk/gcc/tree-inline.c:2963
0xd9697e copy_cfg_body
../../gcc-trunk/gcc/tree-inline.c:3118
0xd9697e copy_body
../../gcc-trunk/gcc/tree-inline.c:3294
0xd99ec0 expand_call_inline
../../gcc-trunk/gcc/tree-inline.c:5084
0xd9beb9 gimple_expand_calls_inline
../../gcc-trunk/gcc/tree-inline.c:5274
0xd9beb9 optimize_inline_calls(tree_node*)
../../gcc-trunk/gcc/tree-inline.c:5447
0xa968fb inline_transform(cgraph_node*)
../../gcc-trunk/gcc/ipa-inline-transform.c:763
0xc00f79 execute_one_ipa_transform_pass
../../gcc-trunk/gcc/passes.c:2240
0xc00f79 execute_all_ipa_transforms(bool)
../../gcc-trunk/gcc/passes.c:2287
0x82dbf5 cgraph_node::expand()
../../gcc-trunk/gcc/cgraphunit.c:1822
0x82f596 expand_all_functions
../../gcc-trunk/gcc/cgraphunit.c:1997
0x82f596 symbol_table::compile()
../../gcc-trunk/gcc/cgraphunit.c:2361
0x832b6f symbol_table::compile()
../../gcc-trunk/gcc/cgraphunit.c:2545
0x832b6f symbol_table::finalize_compilation_unit()
../../gcc-trunk/gcc/cgraphunit.c:2542
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[534] % 
[534] % cat small.c
int printf (const char *, ...);

int a;
static void b(int c) {
  if (c)
printf("%d", a);
}
void e() {
  int d = 0;
  b(d);
}

[Bug tree-optimization/97633] New: ICE at -O3: verify_gimple failed

2020-10-29 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97633

Bug ID: 97633
   Summary: ICE at -O3: verify_gimple failed
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[508] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201029 (experimental) [master revision
e1344fe7b6a:a1208522e1a:79991e2348a864ace6ea2bf108a7502862f1129f] (GCC) 
[509] % 
[509] % gcctk -O2 -c small.c
[510] % 
[510] % gcctk -O3 -c small.c
small.c: In function ‘g’:
small.c:11:6: error: missing ‘PHI’ def
   11 | void g () {
  |  ^
vect_j_11.9_7 = PHI <(10), _8(3)>
during GIMPLE pass: slp
small.c:11:6: internal compiler error: verify_gimple failed
0xd4c3b5 verify_gimple_in_cfg(function*, bool)
../../gcc-trunk/gcc/tree-cfg.c:5461
0xbfb79e execute_function_todo
../../gcc-trunk/gcc/passes.c:1992
0xbfc682 execute_todo
../../gcc-trunk/gcc/passes.c:2046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[511] % 
[511] % cat small.c
extern short i (void);

struct {
  short a;
  short b;
} c;

int d, e;
static int f = 1;

void g () {
  if (e) {
if (f)
  goto L;
while (d) {
  i ();
  short j = d, k = i (), l = k;
L:
  if (!(d && e) || l)
goto L;
  c.a = j;
  c.b = k;
}
  }
}

[Bug tree-optimization/97567] New: wrong code at -Os and above on x86_64-pc-linux-gnu

2020-10-25 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97567

Bug ID: 97567
   Summary: wrong code at -Os and above on x86_64-pc-linux-gnu
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[550] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201025 (experimental) [master revision
1aeb7d7d67d:7a48d67add1:d7ddd287ca76e87f431f43687de6d8cc48e52543] (GCC)
[551] %
[551] % gcctk -O1 small.c; ./a.out
[552] %
[552] % gcctk -Os small.c
[553] % ./a.out
Illegal instruction
[554] %
[554] % cat small.c
int a, b, c, d;
void k() {
  unsigned f = 1;
  long g = 4073709551615;
  for (; a; a++)
for (;;) {
  d = 0;
L1:
  break;
}
  if (f)
for (; a; a++)
  ;
  g || f;
  int i = 0 - f || g;
  long j = g - f;
  if (j || f) {
if (g < 4073709551615)
  for (;;)
;
int e = ~f, h = b / ~e;
if (c)
  goto L2;
g = f = h;
  }
  g || d;
L2:
  if (c)
goto L1;
}
int main() { k(); return 0; }

[Bug tree-optimization/97559] New: ICE at -O1 and above on x86_64-pc-linux-gnu: verify_ssa failed

2020-10-24 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97559

Bug ID: 97559
   Summary: ICE at -O1 and above on x86_64-pc-linux-gnu:
verify_ssa failed
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[566] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201024 (experimental) [master revision
d0e2ffcca0e:78f21910dde:a29ff9c53a77b6e208350d8c6db0f3e988f61d1f] (GCC) 
[567] % 
[567] % gcctk -O0 -c small.c
[568] % 
[568] % gcctk -O1 -c small.c
small.c: In function ‘e’:
small.c:5:6: error: stmt with wrong VUSE
5 | void e () {
  |  ^
# VUSE <.MEM_8(D)>
f_9 = a;
expected .MEM_5
during GIMPLE pass: sink
small.c:5:6: internal compiler error: verify_ssa failed
0xf6887b verify_ssa(bool, bool)
../../gcc-trunk/gcc/tree-ssa.c:1208
0xbf6e07 execute_function_todo
../../gcc-trunk/gcc/passes.c:1999
0xbf7bb2 execute_todo
../../gcc-trunk/gcc/passes.c:2046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[569] % 
[569] % cat small.c
int printf (char *, ...);

int a, b, c, d;

void e () {
  int f = a;
  if (b) {
  L1:
b = 0;
  L2:
if (c) {
  if (f)
printf("0");
  goto L1;
}
  }
  if (d)
goto L2;
}

[Bug tree-optimization/97556] New: ICE at -O2 and -O3 in 32-bit mode on x86_64-pc-linux-gnu in size_remaining, at builtins.c:235

2020-10-23 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97556

Bug ID: 97556
   Summary: ICE at -O2 and -O3 in 32-bit mode on
x86_64-pc-linux-gnu in size_remaining, at
builtins.c:235
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[520] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201023 (experimental) [master revision
7991e963239:9cbfe237f74:757ba6653c2699761c2243e0194749a6695112d8] (GCC) 
[521] % 
[521] % gcctk -m32 -Os -c small.c
[522] % 
[522] % gcctk -m32 -O2 -c small.c
during GIMPLE pass: strlen
small.c: In function ‘f’:
small.c:4:6: internal compiler error: in size_remaining, at builtins.c:235
4 | void f () {
  |  ^
0x7a510b
access_ref::size_remaining(generic_wide_int >*)
const
../../gcc-trunk/gcc/builtins.c:235
0x7a53d5 access_ref::add_offset(generic_wide_int >
const&, generic_wide_int > const&)
../../gcc-trunk/gcc/builtins.c:334
0x7a6bd3 compute_objsize
../../gcc-trunk/gcc/builtins.c:4840
0x7a6b63 compute_objsize
../../gcc-trunk/gcc/builtins.c:4781
0x7a7de1 compute_objsize(tree_node*, int, access_ref*, range_query*)
../../gcc-trunk/gcc/builtins.c:5039
0x7a7f61 compute_objsize(tree_node*, int, tree_node**, tree_node**,
range_query*)
../../gcc-trunk/gcc/builtins.c:5063
0xf15fc2 maybe_warn_overflow
../../gcc-trunk/gcc/tree-ssa-strlen.c:2042
0xf1a7f8 maybe_warn_overflow
../../gcc-trunk/gcc/tree-ssa-strlen.c:2351
0xf1a7f8 handle_store
../../gcc-trunk/gcc/tree-ssa-strlen.c:5059
0xf1c744 check_and_optimize_stmt
../../gcc-trunk/gcc/tree-ssa-strlen.c:5697
0xf1c744 strlen_dom_walker::before_dom_children(basic_block_def*)
../../gcc-trunk/gcc/tree-ssa-strlen.c:5874
0x1729737 dom_walker::walk(basic_block_def*)
../../gcc-trunk/gcc/domwalk.c:309
0xf0dd4f printf_strlen_execute
../../gcc-trunk/gcc/tree-ssa-strlen.c:5940
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[523] % 
[523] % cat small.c
char a[1][3];
int b;

void f () {
  unsigned c = 10;
  if (b)
goto L;
  while (b) {
c = ~0;
  L:
a[c][0] = 0;
  }
}

[Bug tree-optimization/97555] New: wrong code at -Os and above on x86_64-pc-linux-gnu

2020-10-23 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97555

Bug ID: 97555
   Summary: wrong code at -Os and above on x86_64-pc-linux-gnu
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[536] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201023 (experimental) [master revision
7991e963239:9cbfe237f74:757ba6653c2699761c2243e0194749a6695112d8] (GCC) 
[537] % 
[537] % gcctk -O1 small.c; ./a.out
[538] % 
[538] % gcctk -Os small.c
[539] % ./a.out
Floating point exception
[540] % 
[540] % cat small.c
struct {
  int a:1;
} b;

int c, d, e, f = 1, g;

int main ()
{
  for (; d < 3; d++) {
char h = 1 % f, i = ~(0 || ~0);
c = h;
f = ~b.a;
~b.a | 1 ^ ~i && g;
if (~e)
  i = b.a;
b.a = i;
  }
  return 0;
}

[Bug tree-optimization/97467] New: ICE in verify_range, at value-range.cc:369 (-Os and above)

2020-10-17 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97467

Bug ID: 97467
   Summary: ICE in verify_range, at value-range.cc:369 (-Os and
above)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[594] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201017 (experimental) [master revision
56e4eee935c:ba026021eaa:f476a9fe912132abf06c2832a1bb9abe6c1a1bb1] (GCC) 
[595] % 
[595] % gcctk -O1 small.c
[596] % 
[596] % gcctk -Os small.c
during GIMPLE pass: evrp
small.c: In function ‘main’:
small.c:13:1: internal compiler error: in verify_range, at value-range.cc:369
   13 | }
  | ^
0x104b853 irange::verify_range()
../../gcc-trunk/gcc/value-range.cc:369
0x104e8b7 irange::irange_set(tree_node*, tree_node*)
../../gcc-trunk/gcc/value-range.cc:172
0x104e8b7 irange::set(tree_node*, tree_node*, value_range_kind)
../../gcc-trunk/gcc/value-range.cc:226
0x1851ec5 int_range<2u>::int_range(tree_node*,
generic_wide_int const&, generic_wide_int
const&, value_range_kind)
../../gcc-trunk/gcc/value-range.h:431
0x1851ec5 operator_lshift::op1_range(irange&, tree_node*, irange const&, irange
const&) const
../../gcc-trunk/gcc/range-op.cc:1611
0x18e9398 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:878
0x18eb2d3 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x18e9457 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:903
0x18eb2d3 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x18e9d9d gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1002
0x18e4b00 ranger_cache::iterative_cache_update(tree_node*)
../../gcc-trunk/gcc/gimple-range-cache.cc:636
0x18e5783 ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
../../gcc-trunk/gcc/gimple-range-cache.cc:873
0x18e5b7e ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
../../gcc-trunk/gcc/gimple-range-cache.cc:589
0x18d8a00 gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
../../gcc-trunk/gcc/gimple-range.cc:909
0x18d9384 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
../../gcc-trunk/gcc/gimple-range.cc:880
0x18dbb27 gimple_ranger::range_of_range_op(irange&, gimple*)
../../gcc-trunk/gcc/gimple-range.cc:418
0x18e0203 gimple_ranger::calc_stmt(irange&, gimple*, tree_node*)
../../gcc-trunk/gcc/gimple-range.cc:369
0x18e09a9 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*)
../../gcc-trunk/gcc/gimple-range.cc:986
0x18d9485 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
../../gcc-trunk/gcc/gimple-range.cc:877
0x104a61e range_query::value_of_expr(tree_node*, gimple*)
../../gcc-trunk/gcc/value-query.cc:85
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[597] % 
[597] % cat small.c
int a;
long b;
unsigned int c = 1;

int main () {
  int e;
  for (; c <= 0; c++) {
int f = 0;
b = e;
a = f || b << c;
  }
  return 0;
}

[Bug tree-optimization/97466] New: ICE in vect_get_and_check_slp_defs, at tree-vect-slp.c:538 (at -O3)

2020-10-16 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97466

Bug ID: 97466
   Summary: ICE in vect_get_and_check_slp_defs, at
tree-vect-slp.c:538 (at -O3)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[503] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201016 (experimental) [master revision
3e8d8f3b883:93f23a96b87:02629b116eed7c6911ef0eb2ef97e1883e9fb1de] (GCC) 
[504] % 
[504] % gcctk -O2 small.c
[505] % 
[505] % gcctk -O3 small.c
during GIMPLE pass: vect
small.c: In function ‘main’:
small.c:59:5: internal compiler error: in vect_get_and_check_slp_defs, at
tree-vect-slp.c:538
   59 | int main () {
  | ^~~~
0xfdf1ee vect_get_and_check_slp_defs
../../gcc-trunk/gcc/tree-vect-slp.c:536
0xfe4c11 vect_build_slp_tree_2
../../gcc-trunk/gcc/tree-vect-slp.c:1443
0xfe36e9 vect_build_slp_tree
../../gcc-trunk/gcc/tree-vect-slp.c:1266
0xfe4d2c vect_build_slp_tree_2
../../gcc-trunk/gcc/tree-vect-slp.c:1486
0xfe36e9 vect_build_slp_tree
../../gcc-trunk/gcc/tree-vect-slp.c:1266
0xfe4d2c vect_build_slp_tree_2
../../gcc-trunk/gcc/tree-vect-slp.c:1486
0xfe36e9 vect_build_slp_tree
../../gcc-trunk/gcc/tree-vect-slp.c:1266
0xfeae71 vect_analyze_slp_instance
../../gcc-trunk/gcc/tree-vect-slp.c:2135
0xfee1da vect_analyze_slp(vec_info*, unsigned int)
../../gcc-trunk/gcc/tree-vect-slp.c:2441
0xfcde42 vect_analyze_loop_2
../../gcc-trunk/gcc/tree-vect-loop.c:2262
0xfcde42 vect_analyze_loop(loop*, vec_info_shared*)
../../gcc-trunk/gcc/tree-vect-loop.c:2799
0xff679c try_vectorize_loop_1
../../gcc-trunk/gcc/tree-vectorizer.c:994
0xff7269 vectorize_loops()
../../gcc-trunk/gcc/tree-vectorizer.c:1226
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[506] % 
[506] % cat small.c
struct b {
  int c;
  char e;
  char f;
  unsigned g;
};

struct h {
  int i : 2;
};

static short j = 5;
static int k, l, m, ah;
static char n;
static struct b o, p;
int *q;
static int **r = 
char s;
static struct h t;
short u;

unsigned char a (unsigned char v, unsigned char w) {
  return w ? v % w : 0;
}

void ac () {
  ah = 0 >= t.i;
  while (n)
;
}

short d (short v) { return v; }

static int x () {
  int y;
  char aa;
  int *ab = 
  o.f = 0;
  while (!j)
;
  ac();
  while (s) {
char ad;
int ae;
p.e = ad = 7;
for (; ad; ad--) {
  unsigned af = 4;
  ae = 1;
  for (; ae >= 0; ae--) {
aa = a ((p.g == (l >= af) || y), *ab);
**r ^= (d ((m < o.c) ^ aa) == 0) ^ u;
  }
}
*ab = 0;
  }
  return 0;
}

int main () {
  x();
  return 0;
}

[Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above)

2020-10-16 Thread su at cs dot ucdavis.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97462

Bug ID: 97462
   Summary: ICE in op1_range, at range-op.cc:1580 (-Os and above)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[554] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201016 (experimental) [master revision
37753588116:be453072dd2:6c6e0cafa38cee8309f37b846cb7db813a472a54] (GCC) 
[555] % 
[555] % gcctk -O1 -c -w small.c
[556] % gcctk -Os -c -w small.c
during GIMPLE pass: evrp
small.c: In function ‘d’:
small.c:7:1: internal compiler error: in op1_range, at range-op.cc:1580
7 | }
  | ^
0x7d0131 operator_lshift::op1_range(irange&, tree_node*, irange const&, irange
const&) const
../../gcc-trunk/gcc/range-op.cc:1580
0x1867d23 gori_compute::compute_name_range_op(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:494
0x186b139 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:575
0x186b139 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x1868729 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:903
0x186b139 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:575
0x186b139 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x186a1cf gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*)
../../gcc-trunk/gcc/gimple-range-gori.cc:1002
0x186632e ranger_cache::iterative_cache_update(tree_node*)
../../gcc-trunk/gcc/gimple-range-cache.cc:636
0x186681a ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
../../gcc-trunk/gcc/gimple-range-cache.cc:808
0x1866fbd ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
../../gcc-trunk/gcc/gimple-range-cache.cc:589
0x185fe61 gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
../../gcc-trunk/gcc/gimple-range.cc:909
0x1860577 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
../../gcc-trunk/gcc/gimple-range.cc:880
0x108b86d range_query::value_of_expr(tree_node*, gimple*)
../../gcc-trunk/gcc/value-query.cc:85
0x17148b1 hybrid_folder::value_of_expr(tree_node*, gimple*)
../../gcc-trunk/gcc/gimple-ssa-evrp.c:235
0xf456d3 substitute_and_fold_engine::replace_uses_in(gimple*)
../../gcc-trunk/gcc/tree-ssa-propagate.c:871
0xf459ec substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
../../gcc-trunk/gcc/tree-ssa-propagate.c:1141
0x16ec3b7 dom_walker::walk(basic_block_def*)
../../gcc-trunk/gcc/domwalk.c:309
0xf44e65 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
../../gcc-trunk/gcc/tree-ssa-propagate.c:1283
0x1714526 execute_early_vrp
../../gcc-trunk/gcc/gimple-ssa-evrp.c:340
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
[557] % 
[557] % cat small.c
int a, b;

void d ()
{
  a << ~0 && b;
  b = a;
}