Re: [C++ PATCH] Fix build_noexcept_spec ICE (PR c++/54207)

2012-12-06 Thread Jason Merrill
On 12/06/2012 02:24 AM, Jakub Jelinek wrote: + if (TREE_CODE (expr) == INTEGER_CST) +{ + if (operand_equal_p (expr, boolean_true_node, 0)) + return noexcept_true_spec; + else if (operand_equal_p (expr, boolean_false_node, 0)) + return noexcept_false_spec; +}

Re: [C++ PATCH] Fix build_noexcept_spec ICE (PR c++/54207)

2012-12-06 Thread Jakub Jelinek
On Thu, Dec 06, 2012 at 09:07:43AM -0500, Jason Merrill wrote: These are the only two possibilities for a boolean INTEGER_CST, so let's assert that it's false if it isn't true. You can then leave the 'else' on the if (expr == error_mark_node). And here you don't need to check the value at

Re: [C++ PATCH] Fix build_noexcept_spec ICE (PR c++/54207)

2012-12-06 Thread Jason Merrill
OK. Jason

[C++ PATCH] Fix build_noexcept_spec ICE (PR c++/54207)

2012-12-05 Thread Jakub Jelinek
Hi! We ICE on the following testcase, because perform_implicit_conversion_flags doesn't guarantee the type of the returned value is boolean_type_node, if it is some other type compatible with it (in the same_type_p sense), then simple == boolean_true_node and == boolean_false_node comparisons