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

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This looks like a lim2 bug to me.
Before that we have:
  <bb 1392> [local count: 44372324]:
  [/usr/src/gcc/gcc/gimplify.c:10068:24] if (code_1387(D) == 181)
    goto <bb 1393>; [51.12%]
  else
    goto <bb 1394>; [48.88%]

  <bb 1393> [local count: 22683134]:
  [/usr/src/gcc/gcc/gimplify.c:10069:8] if (outer_ctx_1389 != 0B)
    goto <bb 1394>; [70.00%]
  else
    goto <bb 1397>; [30.00%]

  <bb 1394> [local count: 37567381]:
  # PT = nonlocal escaped { D.141932 D.141953 D.141974 D.181276 D.181278
D.181824 D.181827 D.181828 D.181834 D.182151 D.182157 D.182167 D.182168
D.182169 D.182170 D.182171 D.182173 D
.182190 D.182192 D.182194 D.182195 D.182198 D.182398 D.182856 D.182863 D.182865
D.182867 D.182946 D.182947 D.182948 D.182949 } (nonlocal, escaped, escaped
heap)
  # iftmp.2373_1515 = PHI <outer_ctx_1389(1393), ctx_1386(1392)>
so it is perfectly fine that null isn't there in PT of iftmp.2373_1515.
But lim2 moves it to:
  # PT = nonlocal escaped { D.141932 D.141953 D.141974 D.181276 D.181278
D.181824 D.181827 D.181828 D.181834 D.182151 D.182157 D.182167 D.182168
D.182169 D.182170 D.182171 D.182173 D
.182190 D.182192 D.182194 D.182195 D.182198 D.182398 D.182856 D.182863 D.182865
D.182867 D.182946 D.182947 D.182948 D.182949 } (nonlocal, escaped, escaped
heap)
  iftmp.2373_1515 = code_1387(D) == 181 ? outer_ctx_1389 : ctx_1386;
which isn't dominated by the outer_ctx_1389 != NULL check and so
reset_flow_sensitive_info should have been called on it.

Reply via email to