From e715d5652f0c53579bb322411cb35f32d411108c Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 12 Aug 2008 18:05:43 +0000 Subject: PR middle-end/37014 * expr.c (expand_expr_real_1): Handle TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR. * dojump.c (do_jump): Likewise. * gcc.c-torture/compile/20080812-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139029 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/expr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 109ddebe5dc..e61dc616165 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1,6 +1,6 @@ /* Convert tree expression to rtl instructions, for GNU compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -8970,7 +8970,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, /* If no set-flag instruction, must generate a conditional store into a temporary variable. Drop through and handle this like && and ||. */ - + /* Although TRUTH_{AND,OR}IF_EXPR aren't present in GIMPLE, they + are occassionally created by folding during expansion. */ + case TRUTH_ANDIF_EXPR: + case TRUTH_ORIF_EXPR: if (! ignore && (target == 0 || modifier == EXPAND_STACK_PARM @@ -9170,8 +9173,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, case POSTDECREMENT_EXPR: case LOOP_EXPR: case EXIT_EXPR: - case TRUTH_ANDIF_EXPR: - case TRUTH_ORIF_EXPR: /* Lowered by gimplify.c. */ gcc_unreachable (); -- cgit v1.2.1