* g++.dg/debug/pr46338.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167263
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-11-29 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/46338
+ * g++.dg/debug/pr46338.C: New.
+
2010-11-29 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <rakdver@kam.uniff.cz>
--- /dev/null
+// 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++)
+ ;
+}