diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-16 12:49:54 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-16 12:49:54 +0000 |
commit | a2b8ad9dae1c4042d4f4a6ea565afde2fa467cc0 (patch) | |
tree | 9cfd3012fed2d1f7c1ece9189a03bf60b95b11e5 /regress | |
parent | f7896bac028341785c618c79985e6edabc7fd0d7 (diff) |
+= and sign extend problem
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/pcc/ccom/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/pcc/ccom/arith001.c | 15 |
2 files changed, 19 insertions, 2 deletions
diff --git a/regress/usr.bin/pcc/ccom/Makefile b/regress/usr.bin/pcc/ccom/Makefile index b40629c2b3e..22768fca4a6 100644 --- a/regress/usr.bin/pcc/ccom/Makefile +++ b/regress/usr.bin/pcc/ccom/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.1 2007/10/07 18:12:43 otto Exp $ +# $OpenBSD: Makefile,v 1.2 2007/10/16 12:49:53 otto Exp $ CC=/usr/local/bin/cc -REGRESS_TARGETS=const001 \ +REGRESS_TARGETS=\ + arith001 \ + const001 \ darray001 \ enum001 \ init001 init004 \ diff --git a/regress/usr.bin/pcc/ccom/arith001.c b/regress/usr.bin/pcc/ccom/arith001.c new file mode 100644 index 00000000000..d6163248b46 --- /dev/null +++ b/regress/usr.bin/pcc/ccom/arith001.c @@ -0,0 +1,15 @@ +#include <stdio.h> +main() +{ + long long foo = 10; + unsigned int d = 0xffffffffUL; + + if (foo + d != 0x100000009LL) + return 1; + + foo += d; + if (foo != 0x100000009LL) + return 1; + return 0; +} + |