diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gfortran.dg/lto/pr60635_1.c')
-rw-r--r-- | gcc-4.8/gcc/testsuite/gfortran.dg/lto/pr60635_1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gfortran.dg/lto/pr60635_1.c b/gcc-4.8/gcc/testsuite/gfortran.dg/lto/pr60635_1.c new file mode 100644 index 000000000..eddc569e6 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/gfortran.dg/lto/pr60635_1.c @@ -0,0 +1,14 @@ +#include <stdint.h> +#include <stdbool.h> + +static bool littleendian=true; + +uint16_t bigendc16(union{uint16_t * n;uint8_t* b;}x){ + + if (!littleendian) return *x.n; + + uint16_t res = ((uint16_t)(x.b[1])<<0) | + ((uint16_t)(x.b[0])<<8); + return res; +} + |