http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47713
Summary: String comparison optimization with LLE and friends Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: tkoe...@gcc.gnu.org Blocks: 36854 Created attachment 23322 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23322 patch (regression-tested) A PR to save a patch which I don't really think is appropriate for late stage 3. We want to extend the string comparison optimizations to LLE and friends. I don't want to forget this during stage 1 of 4.7 :-) Test case: ! { dg-do run } ! { dg-options "-O -fdump-tree-original" } ! Check for compile-time simplifications of LLE and friends. program main character(3) :: a a = 'ab' if (.not. LLE(a,a)) call abort if (LLT(a,a)) call abort if (.not. LGE(a,a)) call abort if (LGT(a,a)) call abort end program main ! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } } ! { dg-final { cleanup-tree-dump "original" } }