public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23331] FIXME from tree-ssa-ccp: dealing with "a"[3]
[not found] <bug-23331-4@http.gcc.gnu.org/bugzilla/>
@ 2015-04-01 12:07 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-04-01 12:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23331
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The FIXME is gone and we transform this to
f ()
{
int a;
char _2;
int _3;
<bb 2>:
_2 = "a"[13];
_3 = (int) _2;
return _3;
}
which is good enough (we could make CCP more optimistic, treating _2 as
UNDEFINED and finally replacing remaining UNDEFINED uses with
__builtin_unreachable ()).
But that's a different bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [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
end of thread, other threads:[~2015-04-01 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-23331-4@http.gcc.gnu.org/bugzilla/>
2015-04-01 12:07 ` [Bug tree-optimization/23331] FIXME from tree-ssa-ccp: dealing with "a"[3] rguenth at gcc dot gnu.org
2005-08-11 17:17 [Bug tree-optimization/23331] New: " 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).