tree-optimization/94266 - fix object type extraction heuristics
authorRichard Biener <rguenther@suse.de>
Fri, 20 Mar 2020 09:52:02 +0000 (10:52 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 20 Mar 2020 09:52:45 +0000 (10:52 +0100)
commit8fefa21fcf67f30c467eb3cb73d09cb96d0ea6a8
treeeb4a94c9ed28f177d9c7b73b1a1ebbfe22de7dc6
parent719c864225e28c33a0737a331a772781ce8e6591
tree-optimization/94266 - fix object type extraction heuristics

This fixes the heuristic deriving an actual object type from a
MEM_REFs pointer operand to use the more sensible type of an
actual object instead of the pointed to type.

2020-03-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/94266
* gimple-ssa-sprintf.c (get_origin_and_offset): Use the
type of the underlying object to adjust for the containing
field if available.
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c