aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-13 21:11:52 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-13 21:11:52 +0100
commit0dd50fc6f13c02d9d548fd57e7f8f7020241e317 (patch)
treeba31f3d09476a6895f9bfeca9fc3e631495aa8f1
parente6e08429446ea4c20d57ffa347ea699afdd1d4a6 (diff)
downloadgcc-0dd50fc6f13c02d9d548fd57e7f8f7020241e317.zip
gcc-0dd50fc6f13c02d9d548fd57e7f8f7020241e317.tar.gz
gcc-0dd50fc6f13c02d9d548fd57e7f8f7020241e317.tar.bz2
Fix testsuite regression caused by r271077
* 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. From-SVN: r271133
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wattributes1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wattributes2.C32
3 files changed, 40 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ebefd00..6c6bbc3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C b/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
index b1c48d4..2223936 100644
--- a/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/Wattributes1.C
@@ -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
index 0000000..f37b1f01
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/Wattributes2.C
@@ -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 }