aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2006-08-29 02:55:03 -0400
committerJason Merrill <jason@gcc.gnu.org>2006-08-29 02:55:03 -0400
commitbed02d89608838750eac5b389e91b2678c72d55d (patch)
treed610e5b2cb788508832762326b280dc332edea2e /gcc/testsuite
parentd218d0e66d1144e1a727c13fb0586c82b4fc3d87 (diff)
downloadgcc-bed02d89608838750eac5b389e91b2678c72d55d.zip
gcc-bed02d89608838750eac5b389e91b2678c72d55d.tar.gz
gcc-bed02d89608838750eac5b389e91b2678c72d55d.tar.bz2
re PR c++/26577 (ICE in cp_expr_size with volatile and non POD)
PR c++/26577 * cvt.c (convert_to_void): Don't automatically load from volatiles of TREE_ADDRESSABLE type. From-SVN: r116554
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/warn/volatile1.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/volatile1.C b/gcc/testsuite/g++.dg/warn/volatile1.C
new file mode 100644
index 0000000..5b1050f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/volatile1.C
@@ -0,0 +1,12 @@
+// PR c++/26577
+
+struct A
+{
+ A(const A&);
+ A& operator=(const A&);
+ void baz() volatile;
+};
+void A::baz() volatile
+{
+ *this; // { dg-warning "will not be accessed" }
+}