]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix testsuite regression caused by r271077
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 May 2019 20:11:52 +0000 (20:11 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 May 2019 20:11:52 +0000 (20:11 +0000)
* g++.dg/cpp0x/Wattributes1.C: Adjust dg-error line number to fix
regression, by matching a note on any line.
* g++.dg/cpp0x/Wattributes2.C: Add another copy that checks the
correct line number is matched without depending on a library header.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271133 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
gcc/testsuite/g++.dg/cpp0x/Wattributes2.C [new file with mode: 0644]

index ebefd00c02d455c8efb0832f0ce5b45b98e798dd..6c6bbc3b3396b8cdf1c1c733917ec27e36b33980 100644 (file)
@@ -1,3 +1,10 @@
+2019-05-13  Jonathan Wakely  <jwakely@redhat.com>
+
+       * g++.dg/cpp0x/Wattributes1.C: Adjust dg-error line number to fix
+       regression, by matching a note on any line.
+       * g++.dg/cpp0x/Wattributes2.C: Add another copy that checks the
+       correct line number is matched without depending on a library header.
+
 2019-05-13  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/90402
index b1c48d42349087ff6280f209e68a209f96810b23..2223936fba3202e6455d3cd3ee3a01fec85a2c08 100644 (file)
@@ -5,4 +5,4 @@
 #include <new>
 __attribute__((visibility("hidden")))void*operator new(std::size_t); // { dg-warning "visibility attribute ignored" }
 
-// { dg-message "previous declaration" "" { target *-*-* } 125 }
+// { dg-message "previous declaration" "" { target *-*-* } 0 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wattributes2.C b/gcc/testsuite/g++.dg/cpp0x/Wattributes2.C
new file mode 100644 (file)
index 0000000..f37b1f0
--- /dev/null
@@ -0,0 +1,32 @@
+// PR c++/60373
+// { dg-do compile { target c++11 } }
+// { dg-require-visibility "" }
+
+#pragma GCC visibility push(default)
+namespace std
+{
+  using size_t = decltype(sizeof(0));
+  struct nothrow_t { };
+}
+
+void* operator new(std::size_t)
+  __attribute__((__externally_visible__));
+void* operator new[](std::size_t)
+  __attribute__((__externally_visible__));
+void* operator new(std::size_t, const std::nothrow_t&) noexcept
+  __attribute__((__externally_visible__, __malloc__));
+void* operator new[](std::size_t, const std::nothrow_t&) noexcept
+  __attribute__((__externally_visible__, __malloc__));
+void operator delete(void*) noexcept
+  __attribute__((__externally_visible__));
+void operator delete[](void*) noexcept
+  __attribute__((__externally_visible__));
+void operator delete(void*, const std::nothrow_t&) noexcept
+  __attribute__((__externally_visible__));
+void operator delete[](void*, const std::nothrow_t&) noexcept
+  __attribute__((__externally_visible__));
+#pragma GCC visibility pop
+
+__attribute__((visibility("hidden")))void*operator new(std::size_t); // { dg-warning "visibility attribute ignored" }
+
+// { dg-message "previous declaration" "" { target *-*-* } 12 }