Take the following example: static const char f[3] = "?"; int main(void) { if (f[0] == '?') abort (); return 0; }
We don't optitimize this at the tree level. -- Summary: CCP does not handle STRING_CSTs Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: normal 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=22303