re PR debug/85550 (-fdebug-types-section broken with DW_OP_addr in DW_AT_location)
authorJakub Jelinek <jakub@redhat.com>
Fri, 30 Nov 2018 20:55:41 +0000 (21:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 30 Nov 2018 20:55:41 +0000 (21:55 +0100)
PR debug/85550
* g++.dg/debug/dwarf2/pr85550.C: New test.

From-SVN: r266689

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/pr85550.C [new file with mode: 0644]

index 68186d8..9ec4164 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/85550
+       * g++.dg/debug/dwarf2/pr85550.C: New test.
+
 2018-11-30  Thomas Schwinge  <thomas@codesourcery.com>
 
        PR c/87924
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr85550.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr85550.C
new file mode 100644 (file)
index 0000000..72c03b9
--- /dev/null
@@ -0,0 +1,17 @@
+// PR debug/85550
+// { dg-do link }
+// { dg-options "-O2 -g -fdebug-types-section" }
+
+struct A {
+  int bar () const { return 0; }
+};
+template <int (A::*foo)() const>
+struct B {
+};
+
+B<&A::bar> b;
+
+int
+main ()
+{
+}