aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-07-08 13:39:17 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-07-08 13:39:17 -0400
commit34bec556064f1adec8668f12cda40040c9873fef (patch)
tree4bdf9760b14ac8c0062d311b24cf3e16f4011dd6 /gcc/testsuite
parent3e4f84847dbc75ef3337d1e3e5dc2b9fe1495035 (diff)
downloadgcc-34bec556064f1adec8668f12cda40040c9873fef.zip
gcc-34bec556064f1adec8668f12cda40040c9873fef.tar.gz
gcc-34bec556064f1adec8668f12cda40040c9873fef.tar.bz2
re PR c++/45603 (crash in "build_addr_func")
PR c++/45603 * decl.c (expand_static_init): Don't get confused by user declaration of __cxa_guard_acquire. From-SVN: r176054
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/abi/guard3.C14
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b2ba49a..21e6d8d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/45603
+ * g++.dg/abi/guard3.C: New.
+
2011-07-08 Julian Brown <julian@codesourcery.com>
* lib/target-supports.exp
diff --git a/gcc/testsuite/g++.dg/abi/guard3.C b/gcc/testsuite/g++.dg/abi/guard3.C
new file mode 100644
index 0000000..fd9d00e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/guard3.C
@@ -0,0 +1,14 @@
+// PR c++/45603
+
+extern "C" int __cxa_guard_acquire();
+
+struct A
+{
+ ~A();
+};
+
+A* f()
+{
+ static A a;
+ return &a;
+}