aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C')
-rw-r--r--gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C b/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C
new file mode 100644
index 000000000..b4f533e5a
--- /dev/null
+++ b/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr55081.C
@@ -0,0 +1,17 @@
+// PR c++/55081
+// { dg-do compile }
+
+struct R { int field; } r;
+
+__UINTPTR_TYPE__ *
+foo ()
+{
+ static __UINTPTR_TYPE__ array[] = {
+ sizeof (char),
+ (reinterpret_cast <__UINTPTR_TYPE__>(&r.field)
+ - reinterpret_cast <__UINTPTR_TYPE__>(&r)) + 1
+ };
+ return array;
+}
+
+// { dg-final { scan-assembler-not "_ZGVZ3foovE5array" } }