From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3194 invoked by alias); 21 Sep 2005 07:48:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3170 invoked by uid 48); 21 Sep 2005 07:48:32 -0000 Date: Wed, 21 Sep 2005 07:48:00 -0000 From: "dorit at il dot ibm dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050921074826.23989.dorit@il.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/23989] New: DCE removes a loop when it shouldn't X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg02595.txt.bz2 List-Id: 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