This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15347] New: [tree-ssa] fold if ("<12ers" + 1 == 0).
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2004 19:25:41 -0000
- Subject: [Bug optimization/15347] New: [tree-ssa] fold if ("<12ers" + 1 == 0).
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
void bar ();
int
foo (void)
{
if ("<12ers" + 1 == 0)
bar ();
}
which is reduced from from
extern const char tree_code_type[];
extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__));
extern void abort (void) __attribute__ ((__noreturn__));
int
foo (int a)
{
if (tree_code_type[a] == '1')
if (strchr ("<12ers", tree_code_type[a]) == 0)
abort ();
}
which is in turn reduced from find_base_decl() in alias.c.
--
Summary: [tree-ssa] fold if ("<12ers" + 1 == 0).
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15347