diff options
author | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-09-24 14:51:46 +0200 |
---|---|---|
committer | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-09-24 14:51:46 +0200 |
commit | 159777cd07801bcc15d54363adf62cf91dd3fcba (patch) | |
tree | 46bf3630ef408a917a5d61c2b3277d10e5f00e02 /test | |
parent | e49318b3606d7568d8592887e4278efa696afd10 (diff) | |
parent | 749d2beee61986a3464d81cd84097fbffe4affff (diff) | |
download | compcert-kvx-159777cd07801bcc15d54363adf62cf91dd3fcba.tar.gz compcert-kvx-159777cd07801bcc15d54363adf62cf91dd3fcba.zip |
Merge remote-tracking branch 'origin/csmith' into towards_3.10
Diffstat (limited to 'test')
-rw-r--r-- | test/regression/Makefile | 2 | ||||
-rw-r--r-- | test/regression/union_passing.c | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile index db0b381e..b3a2eee8 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -18,7 +18,7 @@ TESTS?=int32 int64 floats floats-basics floats-lit \ funct3 expr5 struct7 struct8 struct11 struct12 casts1 casts2 char1 \ sizeof1 sizeof2 binops bool for1 for2 switch switch2 compound \ decl1 bitfields9 ptrs3 \ - parsing krfun ifconv many_parameters + parsing krfun ifconv many_parameters union_passing # Can run, but only in compiled mode, and have reference output in Results diff --git a/test/regression/union_passing.c b/test/regression/union_passing.c new file mode 100644 index 00000000..b0ce6319 --- /dev/null +++ b/test/regression/union_passing.c @@ -0,0 +1,23 @@ +#include <stdint.h> +#include <stdio.h> +static int32_t bk; +union ba { + int64_t bb; +}; +static void dada(union ba); +void nothing(void); +void stuff(void) { + union ba f = {5}; + int32_t i[1000]; + nothing(); + dada(f); +} +static void dada(union ba k) { + bk = k.bb; +} +void nothing(void) { +} +int main() { + stuff(); + printf("result = %d\n", bk); +} |