summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/c_kinds.c
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/gfortran.dg/c_kinds.c
downloadcbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2
cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.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/gfortran.dg/c_kinds.c')
-rw-r--r--gcc/testsuite/gfortran.dg/c_kinds.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/c_kinds.c b/gcc/testsuite/gfortran.dg/c_kinds.c
new file mode 100644
index 000000000..8fb658a98
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_kinds.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99" } */
+
+#include <stdint.h>
+
+void param_test(short int my_short, int my_int, long int my_long,
+ long long int my_long_long, int8_t my_int8_t,
+ int_least8_t my_int_least8_t, int_fast8_t my_int_fast8_t,
+ int16_t my_int16_t, int_least16_t my_int_least16_t,
+ int_fast16_t my_int_fast16_t, int32_t my_int32_t,
+ int_least32_t my_int_least32_t, int_fast32_t my_int_fast32_t,
+ int64_t my_int64_t, int_least64_t my_int_least64_t,
+ int_fast64_t my_int_fast64_t, intmax_t my_intmax_t,
+ intptr_t my_intptr_t, float my_float, double my_double,
+ long double my_long_double, char my_char, _Bool my_bool);
+
+
+int main(int argc, char **argv)
+{
+ short int my_short = 1;
+ int my_int = 2;
+ long int my_long = 3;
+ long long int my_long_long = 4;
+ int8_t my_int8_t = 1;
+ int_least8_t my_int_least8_t = 2;
+ int_fast8_t my_int_fast8_t = 3;
+ int16_t my_int16_t = 1;
+ int_least16_t my_int_least16_t = 2;
+ int_fast16_t my_int_fast16_t = 3;
+ int32_t my_int32_t = 1;
+ int_least32_t my_int_least32_t = 2;
+ int_fast32_t my_int_fast32_t = 3;
+ int64_t my_int64_t = 1;
+ int_least64_t my_int_least64_t = 2;
+ int_fast64_t my_int_fast64_t = 3;
+ intmax_t my_intmax_t = 1;
+ intptr_t my_intptr_t = 0;
+ float my_float = 1.0;
+ double my_double = 2.0;
+ long double my_long_double = 3.0;
+ char my_char = 'y';
+ _Bool my_bool = 1;
+
+ param_test(my_short, my_int, my_long, my_long_long, my_int8_t,
+ my_int_least8_t, my_int_fast8_t, my_int16_t,
+ my_int_least16_t, my_int_fast16_t, my_int32_t,
+ my_int_least32_t, my_int_fast32_t, my_int64_t,
+ my_int_least64_t, my_int_fast64_t, my_intmax_t,
+ my_intptr_t, my_float, my_double, my_long_double, my_char,
+ my_bool);
+
+ return 0;
+}/* end main() */