aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2016-12-08 11:01:03 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2016-12-08 11:01:03 +0000
commit8a00c78748fd716f9936cb1a937fa1979581d2fe (patch)
tree045bc7307ed4604a1737c6d0ef4acccae80c0535 /gcc
parenta5b03f2a17a7d41380de232bae2ab4800015407f (diff)
downloadgcc-8a00c78748fd716f9936cb1a937fa1979581d2fe.zip
gcc-8a00c78748fd716f9936cb1a937fa1979581d2fe.tar.gz
gcc-8a00c78748fd716f9936cb1a937fa1979581d2fe.tar.bz2
[PR78112] Remove platform-dependent checks in g++.dg/pr78112.C
... as there checks failed on many platforms. As a replacement, this commit also adds a new testcase from source reduction. The hope is that this new testcase will get a consistent output across all platforms. gcc/testsuite/ PR debug/78112 * g++.dg/pr78112.C: Remove platform-dependent checks. * g++.dg/pr78112-2.C: New testcase. From-SVN: r243432
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/pr78112-2.C13
-rw-r--r--gcc/testsuite/g++.dg/pr78112.C2
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/pr78112-2.C b/gcc/testsuite/g++.dg/pr78112-2.C
new file mode 100644
index 0000000..d9d18ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr78112-2.C
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-g -dA -gdwarf-4 -std=gnu++11" } */
+/* { dg-options "-g -dA -std=gnu++11 -gdwarf-4" } */
+/* { dg-final { scan-assembler-times DW_AT_object_pointer 18 } } */
+
+void run (int *int_p, void(*func)(int *)) { func (int_p); }
+namespace foo {
+ struct Foo {
+ int a;
+ Foo() { run (&a, [](int *int_p) { *int_p = 0; }); }
+ };
+}
+int main (void) { foo::Foo f; }
diff --git a/gcc/testsuite/g++.dg/pr78112.C b/gcc/testsuite/g++.dg/pr78112.C
index 986171d..8312292 100644
--- a/gcc/testsuite/g++.dg/pr78112.C
+++ b/gcc/testsuite/g++.dg/pr78112.C
@@ -1,7 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-g -dA -std=gnu++11" } */
-/* { dg-final { scan-assembler-times DW_AT_inline 6 { xfail *-*-aix* } } } */
-/* { dg-final { scan-assembler-times DW_AT_object_pointer 37 { xfail *-*-aix* } } } */
namespace std
{
template <typename _Tp> struct integral_constant