This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR46528


On Nov 25, 2010, Richard Guenther <rguenther@suse.de> wrote:

> 	PR tree-optimization/46528
> 	* profile.c (branch_prob): Do not split blocks based on locations
> 	from debug statements.

I see you noticed this is also debug/46338, for which I posted an
identical patch, save for whitespace and Zdenek's reduced testcase.
Sorry that it took me so long to post the patch in its final form, I'd
had it for quite a while, but was having trouble completing testing
because of other unrelated problems.

Ok to install the testcase?

for gcc/testsuite/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/46338
	* g++.dg/debug/pr46338.C: New.

Index: gcc/testsuite/g++.dg/debug/pr46338.C
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/g++.dg/debug/pr46338.C	2010-11-26 03:15:26.561728156 -0200
@@ -0,0 +1,24 @@
+// PR debug/46338
+// { dg-do compile }
+// { dg-options "-O -fprofile-generate -fcompare-debug" }
+
+void bar ();
+
+struct S
+{
+  int f ()
+  {
+  }
+};
+
+S *s;
+
+void
+foo (int x)
+{
+  if (x)
+    return;
+  bar ();
+  for (int j = 0; j < s->f (); j++)
+    ;
+}


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


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