On Mon, May 23, 2011 at 5:38 PM, Jason Merrill <ja...@redhat.com> wrote: > On 05/23/2011 11:01 AM, Richard Guenther wrote: >> >> Ok. Though I wonder where you enter folding before you check semantic >> validity. > > The problem is in c-common:shorten_binary_op, which uses get_narrower and > then calls common_type on the types of the results. There is no common type > between a scoped enum and char, so common_type returns NULL_TREE, so we get > a SEGV in c_common_signed_or_unsigned_type. > > Do you think I should change shorten_binary_op instead?
Yeah, that might constrain it to C family languages. shorten_binary_op is one of our premature optimization things anyway, best to slowly go away ... Richard. > Jason >