[Bug middle-end/23989] New: DCE removes a loop when it shouldn't

dorit at il dot ibm dot com gcc-bugzilla@gcc.gnu.org
Wed Sep 21 07:48:00 GMT 2005


DCE (.t44.dce3) eliminates the third loop in the testcase below, although the 
print loop should be enough to keep it alive:

======================
subroutine foo(a,b)
real a,b
type bzz
   real d(100)
end type bzz
type (bzz) e

dimension a(100), b(100)
read *,x,y
a=log(x)    <--- loop 1
b=log(y)    <--- loop 2
e%d = a+b   <--- loop 3. eliminated
print *,e%d
end
======================

See related thread here: http://gcc.gnu.org/ml/gcc/2005-09/msg00645.html

-- 
           Summary: DCE removes a loop when it shouldn't
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dorit at il dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ppc64-yellowdog-linux
  GCC host triplet: ppc64-yellowdog-linux
GCC target triplet: ppc64-yellowdog-linux


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



More information about the Gcc-bugs mailing list