diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-21 06:14:08 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-09-21 06:14:08 +0000 |
commit | febbef3fece6191d899e9f4f9c3a362db801fbfa (patch) | |
tree | aaa408cc8058b487e1ea48f64fbb0cfadc7dfdbc | |
parent | 7680822102e8f6dbdb978162ea7674aed6d4b66f (diff) |
two know failures of pcc
-rw-r--r-- | regress/usr.bin/pcc/cc/ccom/init001.c | 16 | ||||
-rw-r--r-- | regress/usr.bin/pcc/cc/ccom/tmpalloc001.c | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/regress/usr.bin/pcc/cc/ccom/init001.c b/regress/usr.bin/pcc/cc/ccom/init001.c new file mode 100644 index 00000000000..70bb3826f8f --- /dev/null +++ b/regress/usr.bin/pcc/cc/ccom/init001.c @@ -0,0 +1,16 @@ +/* Based on OpenBSD PR 5586 from TAKAHASHI Tamotsu */ + +struct s { + int f; + int g[1][1]; +}; + +struct s v = { 0x99, {{0x100}} }; + +int +main() +{ + if (v.f != 0x99) + errx(1, "wrong"); + return 0; +} diff --git a/regress/usr.bin/pcc/cc/ccom/tmpalloc001.c b/regress/usr.bin/pcc/cc/ccom/tmpalloc001.c new file mode 100644 index 00000000000..0fef7fe865a --- /dev/null +++ b/regress/usr.bin/pcc/cc/ccom/tmpalloc001.c @@ -0,0 +1,10 @@ +/* From Ted Unangst */ +int a() { return 1; } + +int main() +{ + int b = 0; + a() + ++b; + printf("b %d\n", b); + return 0; +} |