summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.benjamin
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-15 00:14:08 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-15 00:14:08 +0000
commite38a624a1f2adc03351d4adec9bca1332cb9f05e (patch)
treefd22b7d9aeefff05491e9193a26c1ded1dce6b2c /gcc/testsuite/g++.old-deja/g++.benjamin
parent3758503f6a2b6d3e7d87e03d13f4a79dc371eea6 (diff)
downloadgcc-e38a624a1f2adc03351d4adec9bca1332cb9f05e.tar.gz
more 16-bit/h8300 tweaks
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.benjamin')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C b/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C
index afc70601950..482150bcf6f 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C
@@ -2,6 +2,7 @@
//test for bools with inclusive ors
#include <assert.h>
+#include <limits.h>
void bar ( bool x ) {};
void bars ( short x ) {};
@@ -45,12 +46,14 @@ int ors(){
}
+#if INT_MAX > 32767
int orus(){
unsigned short y = 1;
bars ( y );
int blob = ( 65539 | int (y) );
return blob; //expect 65539, will be 3 if done in us type
}
+#endif
int main() {
int tmp;
@@ -66,11 +69,10 @@ int main() {
assert (tmp ==27);
tmp = ors();
assert (tmp ==27);
- if (sizeof (int) > 2 && sizeof (int) > sizeof (unsigned short))
- {
- tmp = orus();
- assert (tmp == 65539);
- }
+#if INT_MAX > 32767
+ tmp = orus();
+ assert (tmp == 65539);
+#endif
return 0;
}