summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/string1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/string1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/string1.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/string1.C b/gcc/testsuite/g++.old-deja/g++.other/string1.C
new file mode 100644
index 000000000..503533a03
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/string1.C
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+// Origin: mrs@wrs.com (Mike Stump)
+
+class Wrapper {
+public:
+ static const char msgPtr[];
+ static const char *JunkFunc() {
+ return &msgPtr[0];
+ }
+};
+
+const char Wrapper::msgPtr[] = "Hello world.";
+
+int main() {
+ const char *p1 = &Wrapper::msgPtr[0];
+ const char *p2 = Wrapper::JunkFunc();
+
+ if (p1 != p2)
+ return 1;
+}