Deleted Added
full compact
fold-const.c (237021) fold-const.c (237406)
1/* Fold a constant sub-tree into a single node for C-compiler
2 Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under

--- 2788 unchanged lines hidden (view full) ---

2797 case ALIGN_INDIRECT_REF:
2798 case MISALIGNED_INDIRECT_REF:
2799 case REALPART_EXPR:
2800 case IMAGPART_EXPR:
2801 return OP_SAME (0);
2802
2803 case ARRAY_REF:
2804 case ARRAY_RANGE_REF:
1/* Fold a constant sub-tree into a single node for C-compiler
2 Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under

--- 2788 unchanged lines hidden (view full) ---

2797 case ALIGN_INDIRECT_REF:
2798 case MISALIGNED_INDIRECT_REF:
2799 case REALPART_EXPR:
2800 case IMAGPART_EXPR:
2801 return OP_SAME (0);
2802
2803 case ARRAY_REF:
2804 case ARRAY_RANGE_REF:
2805 /* Operands 2 and 3 may be null. */
2805 /* Operands 2 and 3 may be null.
2806 Compare the array index by value if it is constant first as we
2807 may have different types but same value here. */
2806 return (OP_SAME (0)
2808 return (OP_SAME (0)
2807 && OP_SAME (1)
2809 && (tree_int_cst_equal (TREE_OPERAND (arg0, 1),
2810 TREE_OPERAND (arg1, 1))
2811 || OP_SAME (1))
2808 && OP_SAME_WITH_NULL (2)
2809 && OP_SAME_WITH_NULL (3));
2810
2811 case COMPONENT_REF:
2812 /* Handle operand 2 the same as for ARRAY_REF. Operand 0
2813 may be NULL when we're called to compare MEM_EXPRs. */
2814 return OP_SAME_WITH_NULL (0)
2815 && OP_SAME (1)

--- 10812 unchanged lines hidden ---
2812 && OP_SAME_WITH_NULL (2)
2813 && OP_SAME_WITH_NULL (3));
2814
2815 case COMPONENT_REF:
2816 /* Handle operand 2 the same as for ARRAY_REF. Operand 0
2817 may be NULL when we're called to compare MEM_EXPRs. */
2818 return OP_SAME_WITH_NULL (0)
2819 && OP_SAME (1)

--- 10812 unchanged lines hidden ---