On 06/20/2016 12:45 PM, Jakub Jelinek wrote:
Hi!
On the following testcase we ICE during warn_uninit.
Normally, has_undefined_value_p returns false for anonymous SSA_NAMEs,
so NULL expr/var aren't a problem. If t has a COMPLEX_EXPR as def-stmt,
where the first operand is some scalar var's (D) SSA_NAME and the second
operand is 0, which results from gimplification of conversion of scalar
uninitialized var to complex type, t is anonymous SSA_NAME and expr and var
are both NULL.
This patch attempts to deal with that, try to recognize the case and use
the other SSA_NAME's underlying var as expr/var in that case, or punt (in
the unlikely case this wouldn't help).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/6.2?
2016-06-20 Jakub Jelinek <ja...@redhat.com>
PR middle-end/71581
* tree-ssa-uninit.c (warn_uninit): If EXPR and VAR are NULL,
see if T isn't anonymous SSA_NAME with COMPLEX_EXPR created
for conversion of scalar user var to complex type and use the
underlying SSA_NAME_VAR in that case. If EXPR is still NULL,
punt.
* gcc.dg/pr71581.c: New test.
OK.
jeff