[Bug optimization/15347] New: [tree-ssa] fold if ("<12ers" + 1 == 0).

kazu at cs dot umass dot edu gcc-bugzilla@gcc.gnu.org
Sun May 9 19:25:00 GMT 2004


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



More information about the Gcc-bugs mailing list