On Tue, 2014-11-25 at 10:15 -0700, Jeff Law wrote: > On 11/25/14 10:14, Segher Boessenkool wrote: > > On Tue, Nov 25, 2014 at 09:44:35AM -0700, Jeff Law wrote: > >> On 11/24/14 20:37, Segher Boessenkool wrote: > >>> `lcc' is not an insn but just a pattern. This caused a build error in > >>> libgcc. > > > >> A good example of a case that would have been caught if we get to a > >> point where stuff in the insn chain are not RTX objects, but something > >> else entirely. > > > > Hey, it already did ICE, easy to catch. But you mean "wouldn't even > > compile" I guess :-) > Exactly. This kind of problem is something I want to catch at compile > time rather than at runtime.
Right. FWIW I have a set of patches that converts PATTERN() to requiring a const rtx_insn * rather than a const_rtx, but so far they only compile on x86_64. Extending them to cover all archs would have caught this at compile time, I guess, since "lcc" would have been just an rtx. Presumably something for the next stage1.