On 01/22/2016 04:03 AM, Richard Biener wrote:
My guess is this is probably suppose to be
&& ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 1)))
&& ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 2)))
but I'm not sure. Any guesses whats intended here?
Not sure, it might be to detect some of the x ? : throw () constructs
but not sure how those would survive the previous == code check.
Maybe a ? (void) ... : (void) ... is supposed to be detected.
The type check below would catch that as well
(huh? a flag_syntax_only check in fold-const.c!?)
I'd say change to ! VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (tem, 1))
to match what the VOID_TYPE_P check does above this block.
It's definitely to catch cases where one or both branches of a COND_EXPR
have a void type due to throwing an exception and other non-returning
things.
See:
https://gcc.gnu.org/ml/gcc-patches/2002-10/msg00873.html
Andrew if you wanted to be particularly sure, you could check out
c2ad71a27166be748562a41f50bc9bd2f252e85d
And build it (ha!, good luck with that) and see what the code does with
the old g77.dg/execute/7388.f test :_)
Or maybe you might get lucky and the 7388.f test will still get into
that path and you can poke around more directly.
Jeff