On Thu, 2020-06-04 at 02:37 +0200, Ilya Leoshkevich via Gcc-patches wrote: > Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux > and s390x-redhat-linux. > > > Linux Kernel (specifically, drivers/leds/trigger/ledtrig-cpu.c) build > with GCC 10 fails on s390 with "impossible constraint". > > The problem is that jump threading makes __builtin_constant_p lie when > an expression in question appears to be a constant on a threading path. What do you mean by this?
What should happen is the path where the queried object is constant, builtin_constant_p will return true. On the other path where it is not, builtin_constant_p will return false. > > Fix by disallowing __builtin_constant_p on threading paths. > > gcc/ChangeLog: > > 2020-06-03 Ilya Leoshkevich <i...@linux.ibm.com> > > * tree-ssa-threadbackward.c (thread_jumps::profitable_jump_thread_path): > Do not allow __builtin_constant_p on a threading path. Sorry, this is wrong. jeff >