This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/43529] New: G++ doesn't optimize away empty loop when index is a double


Empty loops where the loop index is an integer are optimized away, but the
following loop is not (presumably because it is more difficult to prove that it
terminates in finite time?)

int main()
{
        for(double i=0; i<1e9; i+=1);
}

Command line: g++ -O3


-- 
           Summary: G++ doesn't optimize away empty loop when index is a
                    double
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: evouga at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43529


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]