This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/36090] [4.3/4.4 Regression] ppc64 cacoshl miscompilation



------- Comment #5 from dje at gcc dot gnu dot org  2008-05-01 02:40 -------
Maybe something like the following patch (untested)?

Index: rs6000.c
===================================================================
*** rs6000.c    (revision 132964)
--- rs6000.c    (working copy)
*************** constant_pool_expr_1 (rtx op, int *have_
*** 3358,3364 ****
        return 0;
      case PLUS:
      case MINUS:
!       return (constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc)
              && constant_pool_expr_1 (XEXP (op, 1), have_sym, have_toc));
      case CONST:
        return constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc);
--- 3358,3365 ----
        return 0;
      case PLUS:
      case MINUS:
!       return (! *have_toc
!             && constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc)
              && constant_pool_expr_1 (XEXP (op, 1), have_sym, have_toc));
      case CONST:
        return constant_pool_expr_1 (XEXP (op, 0), have_sym, have_toc);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36090


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]