source: trunk/toolchain/gcc/patches/llvm/951-bug_37014.patch @ 18019

Last change on this file since 18019 was 18019, checked in by nbd, 7 years ago

gcc: add llvm-gcc and llvm from trunk (does not successfully compile a target yet, but gets close)

File size: 2.0 KB
  • gcc/dojump.c

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37014
    
    a b do_jump (tree exp, rtx if_false_label, r 
    307307        break; 
    308308      } 
    309309 
    310     case TRUTH_ANDIF_EXPR: 
    311     case TRUTH_ORIF_EXPR: 
    312310    case COMPOUND_EXPR: 
    313311      /* Lowered by gimplify.c.  */ 
    314312      gcc_unreachable (); 
    do_jump (tree exp, rtx if_false_label, r 
    518516      if (BRANCH_COST >= 4 || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1))) 
    519517        goto normal; 
    520518 
     519    case TRUTH_ANDIF_EXPR: 
    521520      if (if_false_label == NULL_RTX) 
    522521        { 
    523522          drop_through_label = gen_label_rtx (); 
    do_jump (tree exp, rtx if_false_label, r 
    538537      if (BRANCH_COST >= 4 || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1))) 
    539538        goto normal; 
    540539 
     540    case TRUTH_ORIF_EXPR: 
    541541      if (if_true_label == NULL_RTX) 
    542542        { 
    543543          drop_through_label = gen_label_rtx (); 
  • gcc/expr.c

    a b expand_expr_real_1 (tree exp, rtx target 
    86348634      /* If no set-flag instruction, must generate a conditional store 
    86358635         into a temporary variable.  Drop through and handle this 
    86368636         like && and ||.  */ 
    8637  
     8637      /* Although TRUTH_{AND,OR}IF_EXPR aren't present in GIMPLE, they 
     8638         are occassionally created by folding during expansion.  */ 
     8639    case TRUTH_ANDIF_EXPR: 
     8640    case TRUTH_ORIF_EXPR: 
    86388641      if (! ignore 
    86398642          && (target == 0 
    86408643              || modifier == EXPAND_STACK_PARM 
    expand_expr_real_1 (tree exp, rtx target 
    88328835    case POSTDECREMENT_EXPR: 
    88338836    case LOOP_EXPR: 
    88348837    case EXIT_EXPR: 
    8835     case TRUTH_ANDIF_EXPR: 
    8836     case TRUTH_ORIF_EXPR: 
    88378838      /* Lowered by gimplify.c.  */ 
    88388839      gcc_unreachable (); 
    88398840 
  • new file gcc/testsuite/gcc.c-torture/compile/20080812-1.c

    - +  
     1/* PR middle-end/37014 */ 
     2 
     3void bar (signed char *); 
     4 
     5void 
     6foo (int x, int y) 
     7{ 
     8  int i; 
     9  signed char a[123], b[123], c; 
     10  for (i = 0; i < 123; i++) 
     11    { 
     12      int e = y - x; 
     13      int d = e < 0 ? -e : e; 
     14      c = d < 75; 
     15      a[y] = c; 
     16      b[y] = c; 
     17      y--; 
     18    } 
     19  bar (b); 
     20  bar (a); 
     21} 
Note: See TracBrowser for help on using the repository browser.