source: clfs-sysroot/patches/gcc-4.4.1-branch_update-1.patch@ 7a95c74

Last change on this file since 7a95c74 was 29cd472, checked in by Joe Ciccone <jciccone@…>, 15 years ago

Update the GCC Branch Update patch to 4.4.1-1.

  • Property mode set to 100644
File size: 6.5 KB
  • gcc/resource.c

    Submitted By: Jim Gifford (jim at cross-lfs dot org)
    Date: 07-22-2009
    Initial Package Version: 4.4.1
    Origin: Upstream
    Upstream Status: Applied
    Description: This is a branch update for gcc-4.4.1, and should be
                 rechecked periodically.
    
    This patch was made from Revision # 149965.
    
    diff -Naur gcc-4.4.1.orig/gcc/resource.c gcc-4.4.1/gcc/resource.c
    old new  
    945945
    946946  /* If we found a basic block, get the live registers from it and update
    947947     them with anything set or killed between its start and the insn before
    948      TARGET.  Otherwise, we must assume everything is live.  */
     948     TARGET; this custom life analysis is really about registers so we need
     949     to use the LR problem.  Otherwise, we must assume everything is live.  */
    949950  if (b != -1)
    950951    {
    951       regset regs_live = df_get_live_in (BASIC_BLOCK (b));
     952      regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
    952953      rtx start_insn, stop_insn;
    953954
    954955      /* Compute hard regs live at start of block.  */
     
    10521053                {
    10531054                  HARD_REG_SET extra_live;
    10541055
    1055                   REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
     1056                  REG_SET_TO_HARD_REG_SET (extra_live, DF_LR_IN (bb));
    10561057                  IOR_HARD_REG_SET (current_live_regs, extra_live);
    10571058                }
    10581059            }
  • gcc/testsuite/gcc.c-torture/compile/pr40321.c

    diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c
    old new  
     1struct X { int flag; int pos; };
     2int foo(struct X *a, struct X *b)
     3{
     4  while (1)
     5    {
     6      if (a->flag)
     7        break;
     8      ({ struct X *tmp = a; a = b; b = tmp; });
     9    }
     10
     11  return a->pos + b->pos;
     12}
  • gcc/testsuite/g++.dg/torture/pr40321.C

    diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C
    old new  
     1/* { dg-do compile } */
     2
     3struct VectorD2
     4{
     5  VectorD2() : x(0), y(0) { }
     6  VectorD2(int _x, int _y) : x(_x), y(_y) { }
     7  int x, y;
     8  int GetLength2() const { return x*x + y*y; };
     9  VectorD2 operator+(const VectorD2 vec) const {
     10      return VectorD2(x+vec.x,y+vec.y);
     11  }
     12};
     13struct Shape
     14{
     15  enum Type { ST_RECT, ST_CIRCLE } type;
     16  VectorD2 pos;
     17  VectorD2 radius;
     18  bool CollisionWith(const Shape& s) const;
     19};
     20bool Shape::CollisionWith(const Shape& s) const
     21{
     22  if(type == ST_CIRCLE && s.type == ST_RECT)
     23    return s.CollisionWith(*this);
     24  return (pos + s.pos).GetLength2() < (radius + s.radius).GetLength2();
     25}
  • gcc/tree-ssa-pre.c

    diff -Naur gcc-4.4.1.orig/gcc/tree-ssa-pre.c gcc-4.4.1/gcc/tree-ssa-pre.c
    old new  
    35073507}
    35083508
    35093509
    3510 /* Add OP to EXP_GEN (block), and possibly to the maximal set if it is
    3511    not defined by a phi node.
    3512    PHI nodes can't go in the maximal sets because they are not in
    3513    TMP_GEN, so it is possible to get into non-monotonic situations
    3514    during ANTIC calculation, because it will *add* bits.  */
     3510/* Add OP to EXP_GEN (block), and possibly to the maximal set.  */
    35153511
    35163512static void
    35173513add_to_exp_gen (basic_block block, tree op)
     
    35233519        return;
    35243520      result = get_or_alloc_expr_for_name (op);
    35253521      bitmap_value_insert_into_set (EXP_GEN (block), result);
    3526       if (TREE_CODE (op) != SSA_NAME
    3527           || gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_PHI)
    3528         bitmap_value_insert_into_set (maximal_set, result);
     3522      bitmap_value_insert_into_set (maximal_set, result);
    35293523    }
    35303524}
    35313525
     
    35443538      add_to_value (get_expr_value_id (e), e);
    35453539      bitmap_insert_into_set (PHI_GEN (block), e);
    35463540      bitmap_value_insert_into_set (AVAIL_OUT (block), e);
     3541      if (!in_fre)
     3542        {
     3543          unsigned i;
     3544          for (i = 0; i < gimple_phi_num_args (phi); ++i)
     3545            {
     3546              tree arg = gimple_phi_arg_def (phi, i);
     3547              if (TREE_CODE (arg) == SSA_NAME)
     3548                {
     3549                  e = get_or_alloc_expr_for_name (arg);
     3550                  add_to_value (get_expr_value_id (e), e);
     3551                  bitmap_value_insert_into_set (maximal_set, e);
     3552                }
     3553            }
     3554        }
    35473555    }
    35483556}
    35493557
     
    42544262      FOR_ALL_BB (bb)
    42554263        {
    42564264          print_bitmap_set (dump_file, EXP_GEN (bb), "exp_gen", bb->index);
    4257           print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen",
    4258                                   bb->index);
    4259           print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out",
    4260                                   bb->index);
     4265          print_bitmap_set (dump_file, PHI_GEN (bb), "phi_gen", bb->index);
     4266          print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
     4267          print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
    42614268        }
     4269
     4270      print_bitmap_set (dump_file, maximal_set, "maximal", 0);
    42624271    }
    42634272
    42644273  /* Insert can get quite slow on an incredibly large number of basic
  • gcc/version.c

    diff -Naur gcc-4.4.1.orig/gcc/version.c gcc-4.4.1/gcc/version.c
    old new  
    1414   Makefile.  */
    1515
    1616const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
    17 const char pkgversion_string[] = PKGVERSION;
     17const char pkgversion_string[] = "(GCC for Cross-LFS 4.4.1.20090722) ";
  • libstdc++-v3/include/std/valarray

    diff -Naur gcc-4.4.1.orig/libstdc++-v3/include/std/valarray gcc-4.4.1/libstdc++-v3/include/std/valarray
    old new  
    11// The template and inlines for the -*- C++ -*- valarray class.
    22
    33// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    4 // 2006, 2007, 2009
     4// 2006, 2007, 2008, 2009
    55// Free Software Foundation, Inc.
    66//
    77// This file is part of the GNU ISO C++ Library.  This library is free
     
    647647  template<typename _Tp>
    648648    inline
    649649    valarray<_Tp>::valarray(initializer_list<_Tp> __l)
    650       : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
     650    : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
    651651    { std::__valarray_copy_construct (__l.begin(), __l.end(), _M_data); }
    652652#endif
    653653
     
    681681    {
    682682      _GLIBCXX_DEBUG_ASSERT(_M_size == __l.size());
    683683      std::__valarray_copy(__l.begin(), __l.size(), _M_data);
     684      return *this;
    684685    }
    685686#endif
    686687
Note: See TracBrowser for help on using the repository browser.