aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2010-11-29 19:18:24 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2010-11-29 19:18:24 +0000
commit0e160b34c694459cca0532b510cbddf63bc7392d (patch)
tree5831b712910f39236722d4671c9d01ef7d4e0946 /gcc
parentfabfcf5e03d71b2a549aeea6d2b1175a72003908 (diff)
downloadgcc-0e160b34c694459cca0532b510cbddf63bc7392d.zip
gcc-0e160b34c694459cca0532b510cbddf63bc7392d.tar.gz
gcc-0e160b34c694459cca0532b510cbddf63bc7392d.tar.bz2
re PR debug/46338 (-fcompare-debug failure (length) with -O -fprofile-generate)
PR debug/46338 * g++.dg/debug/pr46338.C: New. From-SVN: r167263
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/debug/pr46338.C24
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c4bf620..cfa16d3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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>
diff --git a/gcc/testsuite/g++.dg/debug/pr46338.C b/gcc/testsuite/g++.dg/debug/pr46338.C
new file mode 100644
index 0000000..dfa9245
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr46338.C
@@ -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++)
+ ;
+}