Re: [C PATCH] Fix C pointer_diff with volatile args (PR c/86093)

2018-06-15 Thread Joseph Myers
On Fri, 15 Jun 2018, Jakub Jelinek wrote: > Hi! > > The match.pd framework uses op0 == op1 || operand_equal_p (op0, op1, 0) > style comparisons heavily; the reason why we don't optimize away say > volatile int i; > ... > int j = i - i; > into int j = (i, 0); > is only because both the C and C++

[C PATCH] Fix C pointer_diff with volatile args (PR c/86093)

2018-06-15 Thread Jakub Jelinek
Hi! The match.pd framework uses op0 == op1 || operand_equal_p (op0, op1, 0) style comparisons heavily; the reason why we don't optimize away say volatile int i; ... int j = i - i; into int j = (i, 0); is only because both the C and C++ FE convert the volatile arguments to non-volatile ones befor