patches/gcc/4.0.0/140-pr21173-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Sep 04 17:27:16 2009 +0200 (2009-09-04)
changeset 1512 439a6b292917
permissions -rw-r--r--
TODO: update

Add TODO list for m4, autoconf, automake and libtool.
Building our own versions would remove burden from the users
who have older versions on their distributions, and are not
ready/able/allowed to upgrade.
     1 See http://gcc.gnu.org/PR21173
     2 This is a fix for a last minute brown-bag bug with gcc-4.0.0
     3 
     4  ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] ------- 
     5 Subject: Bug 21173
     6 
     7 CVSROOT:        /cvs/gcc
     8 Module name:    gcc
     9 Branch:         gcc-4_0-branch
    10 Changes by:     dberlin@gcc.gnu.org     2005-04-25 14:02:38
    11 
    12 Modified files:
    13         gcc            : ChangeLog tree-ssa-pre.c 
    14 
    15 Log message:
    16         2005-04-25  Daniel Berlin  <dberlin@dberlin.org>
    17         
    18         Fix PR tree-optimization/21173
    19         
    20         * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
    21         on things we pass to force_gimple_operand.  Don't try to special
    22         case min_invariants.
    23 
    24 Patches:
    25 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.192&r2=2.7592.2.193
    26 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.65.4.2&r2=2.65.4.3
    27 
    28 ===================================================================
    29 RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
    30 retrieving revision 2.65.4.2
    31 retrieving revision 2.65.4.3
    32 diff -u -r2.65.4.2 -r2.65.4.3
    33 --- gcc/gcc/tree-ssa-pre.c	2005/04/17 23:40:31	2.65.4.2
    34 +++ gcc/gcc/tree-ssa-pre.c	2005/04/25 14:02:31	2.65.4.3
    35 @@ -1330,7 +1330,8 @@
    36  	
    37  	folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), 
    38  			      genop1, genop2));
    39 -	newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
    40 +	newexpr = force_gimple_operand (unshare_expr (folded), 
    41 +					&forced_stmts, false, NULL);
    42  	if (forced_stmts)
    43  	  {
    44  	    tsi = tsi_start (forced_stmts);
    45 @@ -1372,14 +1373,8 @@
    46  	add_referenced_tmp_var (temp);
    47  	folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), 
    48  			      genop1));
    49 -	/* If the generated operand  is already GIMPLE min_invariant
    50 -	   just use it instead of calling force_gimple_operand on it,
    51 -	   since that may make it not invariant by copying it into an
    52 -	   assignment.  */
    53 -	if (!is_gimple_min_invariant (genop1))
    54 -	  newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
    55 -	else
    56 -	  newexpr = genop1;
    57 +	newexpr = force_gimple_operand (unshare_expr (folded), 
    58 +					&forced_stmts, false, NULL);
    59  	if (forced_stmts)
    60  	  {
    61  	    tsi = tsi_start (forced_stmts);
    62 
    63     0K .                                                         1.24 MB/s
    64 
    65 13:16:54 (1.24 MB/s) - `-' saved [1303]
    66