public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23331] New: FIXME from tree-ssa-ccp: dealing with "a"[3]
@ 2005-08-11 17:17 pinskia at gcc dot gnu dot org
  2005-08-20 14:04 ` [Bug tree-optimization/23331] " pinskia at gcc dot gnu dot org
  2005-09-25  4:25 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 17:17 UTC (permalink / raw)
  To: gcc-bugs

/* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/23331] FIXME from tree-ssa-ccp: dealing with "a"[3]
  2005-08-11 17:17 [Bug tree-optimization/23331] New: FIXME from tree-ssa-ccp: dealing with "a"[3] pinskia at gcc dot gnu dot org
@ 2005-08-20 14:04 ` pinskia at gcc dot gnu dot org
  2005-09-25  4:25 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-20 14:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-20 13:54 -------
Testcase:
int f(void)
{
  int a = 13;
  return "a"[a];
}

This should be converted over to:
int f(void)
{
  __builtin_trap ();
}

-- 


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/23331] FIXME from tree-ssa-ccp: dealing with "a"[3]
  2005-08-11 17:17 [Bug tree-optimization/23331] New: FIXME from tree-ssa-ccp: dealing with "a"[3] pinskia at gcc dot gnu dot org
  2005-08-20 14:04 ` [Bug tree-optimization/23331] " pinskia at gcc dot gnu dot org
@ 2005-09-25  4:25 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-25  4:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-25 04:25 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-25 04:25:03
               date|                            |


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-25  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 17:17 [Bug tree-optimization/23331] New: FIXME from tree-ssa-ccp: dealing with "a"[3] pinskia at gcc dot gnu dot org
2005-08-20 14:04 ` [Bug tree-optimization/23331] " pinskia at gcc dot gnu dot org
2005-09-25  4:25 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).