> > * config/rs6000/rs6000-call.c: Include value-range.h. > > * config/rs6000/rs6000.c: Likewise. > > This is okay for trunk, thanks! (It is trivial and obvious as well, so > please just commit things like this without prior approval.)
This patch is not the correct long-term solution, as I explained to Martin on IRC. If it is approved as a work-around, it should be stated that it is a band-aid. Equally obvious is including value-range.h in tree-ssa-propagate.h. The tree-ssa-propagate.h, value-query.h and value-range.h headers currently are in an inconsistent state. GCC has worked to move towards a "flat" header files model to detangle the header dependencies in GCC. Most headers don't include other headers. In fact Andrew worked on the header reduction effort. As part of the recent Ranger infrastructure patches, Aldy included value-query.h in tree-ssa-propagate.h, but value-query.h depends on the irange type defined in value-range.h. I presume that the other uses of tree-ssa-propagate.h that refer to the irange methods also include value-range.h from some other dependency. I don't know which solution Aldy and Andrew prefer. tree-ssa-propagate.h could include value-range.h or users of tree-ssa-propagate.h that need Ranger could include tree-query.h. Or tree-query.h needs to be self-contained and provide the irange type. Or tree-query.h and tree-range.h need to be combined. The current interdependency of the headers does not seem like a wise choice. Thanks, David