[PATCH] Fix PR tree-opt/36830
Eric Botcazou
ebotcazou@adacore.com
Sun Jul 27 17:25:00 GMT 2008
Hi,
This is the bootstrap failure of the Ada compiler introduced by the PRE
rewrite. It is not reproducible in all circumstances and I'm not sure
where the variability comes from, but I think that there are a couple of
problems in the code:
- vn_reference_op_compute_hash doesn't hash operand 2 of references (whereas
it did on the 4.3 branch),
- expressions_equal_p is not prepared to handle pairs of operands for which
only one member is null. This happens for s-os_lib.adb:To_Path_String_Access
on x86/Linux because we have in the IL:
(*path_access_14)[j_48]{lb: 1 sz: 1}
and
(*D.8135_34)[j_48]{lb: D.8139_42 sz: 1}
These are ARRAY_REFs with the same operand #1 so vn_reference_op_eq compares
operand #2, which is NULL in the former case but not in the latter, leading
to a SIGSEGV in expressions_equal_p when the types are evaluated. This is
expected according to tree.def.
Bootstrapped/regtested on i586-suse-linux, OK for mainline? The second hunk
needs to be backported to the 4.3 branch.
2008-07-27 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/36830
* tree-ssa-sccvn.c (vn_reference_op_compute_hash): Hash operand #2.
(expressions_equal_p): Return false if only one operand is null.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr36830.diff
Type: text/x-diff
Size: 1621 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080727/97e9d241/attachment.bin>
More information about the Gcc-patches
mailing list