summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/Regression/C++Frontend/pointer_arithmetic.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Regression/C++Frontend/pointer_arithmetic.c b/llvm/test/Regression/C++Frontend/pointer_arithmetic.c
new file mode 100644
index 00000000000..5fedd85e009
--- /dev/null
+++ b/llvm/test/Regression/C++Frontend/pointer_arithmetic.c
@@ -0,0 +1,21 @@
+typedef struct {
+ int w;
+// float x;
+// double y;
+// long long z;
+} S1Ty;
+
+typedef struct {
+ S1Ty A, B;
+} S2Ty;
+
+void takeS1(S1Ty *V) {}
+void takeVoid(void *P) {}
+
+int main() {
+ S2Ty E;
+ takeS1(&E.B);
+ takeVoid(&E);
+ return 0;
+}
+
OpenPOWER on IntegriCloud