http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449

Ryan Lortie <desrt at desrt dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |desrt at desrt dot ca

--- Comment #7 from Ryan Lortie <desrt at desrt dot ca> ---
Another case, and this one fails at all optimisation levels:

int a(void) { return 0; }

/* This always returns a constant expression.  If we can't statically
 * determine its value, then this is the constant expression '0'.
 */
#define CONSTIFY(x) (__builtin_constant_p(x)&&(x))

/* works fine */
int b = CONSTIFY(a());
int c = CONSTIFY(a()) ? 2 : 3;

/* fails */
int d = __builtin_choose_expr(CONSTIFY(a()), 2, 3);

Reply via email to