diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/regression/Makefile | 2 | ||||
-rw-r--r-- | test/regression/Results/casts2 | 1 | ||||
-rw-r--r-- | test/regression/casts2.c | 16 |
3 files changed, 18 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile index 4581bac8..4ebf042d 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -8,7 +8,7 @@ LIBS=$(LIBMATH) # Can run and have reference output in Results TESTS=bitfields1 bitfields2 bitfields3 expr1 initializers volatile2 \ - funct3 expr5 struct7 struct8 casts1 + funct3 expr5 struct7 struct8 casts1 casts2 # Other tests: should compile to .s without errors (but expect warnings) EXTRAS=commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \ diff --git a/test/regression/Results/casts2 b/test/regression/Results/casts2 new file mode 100644 index 00000000..36866313 --- /dev/null +++ b/test/regression/Results/casts2 @@ -0,0 +1 @@ +t_3 = 65440 diff --git a/test/regression/casts2.c b/test/regression/casts2.c new file mode 100644 index 00000000..b7620764 --- /dev/null +++ b/test/regression/casts2.c @@ -0,0 +1,16 @@ +#include <stdint.h> +#include <stdio.h> + +uint16_t func_46(void) +{ + int8_t l_48 = 0xA0; + return l_48; +} + +int main(void) +{ + int32_t t_3 = 0; + t_3 = func_46(); + printf("t_3 = %d\n", t_3); + return 0; +} |