summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/compat/mixed-struct-check.h')
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-check.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
new file mode 100644
index 000000000..248ffb215
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
@@ -0,0 +1,37 @@
+/* Function definitions that are used by multiple tests. */
+
+void checkScd (Scd x, int i)
+{ if (x.c != (char)i || x.d != (double)i+1) DEBUG_CHECK }
+void checkScdc (Scdc x, int i)
+{ if (x.c != (char)i || x.d != (double)i+1 || x.b != (char)i+2) DEBUG_CHECK }
+void checkSd (Sd x, int i)
+{ if (x.d != (double)i) DEBUG_CHECK }
+void checkSdi (Sdi x, int i)
+{ if (x.d != (double)i || x.i != i+1) DEBUG_CHECK }
+void checkScsds (Scsds x, int i)
+{ if (x.c != (char)i || x.sd.d != (double)i+1) DEBUG_CHECK }
+void checkScsdsc (Scsdsc x, int i)
+{ if (x.c != (char)i || x.sd.d != (double)i+1 || x.b != (char)i+2) DEBUG_CHECK }
+void checkScsdis (Scsdis x, int i)
+{ if (x.c != (char)i || x.sdi.d != (double)i+1 || x.sdi.i != i+2) DEBUG_CHECK }
+void checkScsdisc (Scsdisc x, int i)
+{ if (x.c != (char)i || x.sdi.d != (double)i+1 || x.sdi.i != i+2
+ || x.b != (char)i+3) DEBUG_CHECK }
+void checkSsds (Ssds x, int i)
+{ if (x.sd.d != (double)i) DEBUG_CHECK }
+void checkSsdsc (Ssdsc x, int i)
+{ if (x.sd.d != (double)i || x.c != (char)i+1) DEBUG_CHECK }
+void checkScssdss (Scssdss x, int i)
+{ if (x.c != (char)i || x.ssds.sd.d != (double)i+1) DEBUG_CHECK }
+void checkScssdssc (Scssdssc x, int i)
+{ if (x.c != (char)i || x.ssds.sd.d != (double)i+1
+ || x.b != (char)i+2) DEBUG_CHECK }
+
+void checkSfi (Sfi x, int i)
+{ if (x.f != (float)i || x.i != i+1) DEBUG_CHECK }
+void checkSfii (Sfii x, int i)
+{ if (x.f != (float)i || x.i1 != i+1 || x.i2 != i+2) DEBUG_CHECK }
+void checkSfifi (Sfifi x, int i)
+{ if (x.fi.f != (float)i || x.fi.i != i+1) DEBUG_CHECK }
+void checkSfiifii (Sfiifii x, int i)
+{ if (x.fii.f != (float)i || x.fii.i1 != i+1 || x.fii.i2 != i+2) DEBUG_CHECK }