From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29243 invoked by alias); 8 Mar 2006 05:15:08 -0000 Received: (qmail 29033 invoked by uid 48); 8 Mar 2006 05:15:04 -0000 Date: Wed, 08 Mar 2006 05:15:00 -0000 Subject: [Bug tree-optimization/26602] New: final_cleanup can mess up incoming frequencies X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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 X-SW-Source: 2006-03/txt/msg00803.txt.bz2 List-Id: An example (which I got from looking a little at varasm.c): struct a { int i; }; int f(int *); int g(struct a *b) { struct a *b1 =b; int t = 0; for(;b < b1+3;b++) { if (b==0) return 1; int *c = &b->i; if (c == 0) return 1; t+=f(c); } return t; } ------- Currently we get: Removing basic block 9 Merging blocks 2 and 3 g (b) { struct a * b.35; int t; int D.1525; : if (b == 0B) goto ; else goto ; Invalid sum of incoming frequencies 2731, should be 2048 :; b.35 = b; t = 0; goto (); :; if (b.35 == 0B) goto ; else goto ; :; D.1525 = f (&b.35->i); t = t + D.1525; b.35 = b.35 + 4B; if (b.35 != (struct a *) (b + 12B)) goto ; else goto ; :; t = 1; Invalid sum of incoming frequencies 2156, should be 2875 :; return t; -- Summary: final_cleanup can mess up incoming frequencies Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26602