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 tree-optimization/23331] New: FIXME from tree-ssa-ccp: dealing with "a"[3]


/* We can get here for out-of-range string constant accesses,
         such as "_"[3].  Bail out of the entire substitution search
         and arrange for the entire statement to be replaced by a
         call to __builtin_trap.  In all likelihood this will all be
         constant-folded away, but in the meantime we can't leave with
         something that get_expr_operands can't understand.  */

      t = base;
      STRIP_NOPS (t);
      if (TREE_CODE (t) == ADDR_EXPR
          && TREE_CODE (TREE_OPERAND (t, 0)) == STRING_CST)
        {
          /* FIXME: Except that this causes problems elsewhere with dead
             code not being deleted, and we die in the rtl expanders
             because we failed to remove some ssa_name.  In the meantime,
             just return zero.  */
          /* FIXME2: This condition should be signaled by
             fold_read_from_constant_string directly, rather than
             re-checking for it here.  */
          return integer_zero_node;
        }


Just a bug to track progress on this FIXME.

-- 
           Summary: FIXME from tree-ssa-ccp: dealing with "a"[3]
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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