summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx')
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx
new file mode 100644
index 000000000..aca2ea3a3
--- /dev/null
+++ b/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx
@@ -0,0 +1,12 @@
+class foo {
+ char z [10];
+public:
+ char *get_z () { return & this->z[0]; }
+};
+
+int main ()
+{
+foo x;
+x.get_z()[9] = 'a';
+return 0;
+}