aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-03 17:50:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-03-03 17:50:16 -0800
commita7f7be88de0d636489e46053928bc5b608b8f958 (patch)
tree5f40fcb506ea47eeda56b3ffeb32c4f308fd6c06
parente303c7f81082f6d49a52e9b7b0db1ff131d6efb6 (diff)
improve testing for statically incorrect calls
-rw-r--r--tests/cases/sillyfuncast2_noasm.ll (renamed from tests/cases/sillyfuncast2.ll)1
-rw-r--r--tests/test_core.py2
-rw-r--r--tests/test_other.py4
3 files changed, 5 insertions, 2 deletions
diff --git a/tests/cases/sillyfuncast2.ll b/tests/cases/sillyfuncast2_noasm.ll
index f72ebe28..6c55b990 100644
--- a/tests/cases/sillyfuncast2.ll
+++ b/tests/cases/sillyfuncast2_noasm.ll
@@ -14,6 +14,7 @@ entry:
%retval = alloca i32, align 4 ; [#uses=1 type=i32*]
store i32 0, i32* %retval
call i32 bitcast (void (i32, i32)* @doit to i32 (i32, i64)*)(i32 0, i64 0) nounwind
+ call void bitcast (void (i32, i32)* @doit to void (i32, float)*)(i32 0, float 0.0) nounwind
ret i32 1
}
diff --git a/tests/test_core.py b/tests/test_core.py
index 3ee02d3c..6ea0614a 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -5202,7 +5202,7 @@ def process(filename):
'structparam', 'extendedprecision', 'issue_39', 'phinonexist', 'oob_ta2', 'phiself', 'invokebitcast', # invalid ir
'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', # pnacl limitations in ExpandStructRegs
'2xi40', # pnacl limitations in ExpandGetElementPtr
- 'quoted', 'sillyfuncast2', # current fastcomp limitations FIXME
+ 'quoted', # current fastcomp limitations FIXME
'atomicrmw_unaligned' # TODO XXX
]: continue
if '_ta2' in shortname and not Settings.USE_TYPED_ARRAYS == 2:
diff --git a/tests/test_other.py b/tests/test_other.py
index 8eb6ce4a..0ef9ebb5 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2547,8 +2547,10 @@ int main()
for asserts in [0, 1]:
extra = []
if opts != 1-asserts: extra = ['-s', 'ASSERTIONS=' + str(asserts)]
- cmd = [PYTHON, EMCC, path_from_root('tests', 'cases', 'sillyfuncast2.ll'), '-O' + str(opts)] + extra
+ cmd = [PYTHON, EMCC, path_from_root('tests', 'cases', 'sillyfuncast2_noasm.ll'), '-O' + str(opts)] + extra
print cmd
stdout, stderr = Popen(cmd, stderr=PIPE).communicate()
assert ('''unexpected number of arguments 3 in call to 'doit', should be 2''' in stderr) == asserts, stderr
+ assert ('''unexpected return type i32 in call to 'doit', should be void''' in stderr) == asserts, stderr
+ assert ('''unexpected argument type float at index 1 in call to 'doit', should be i32''' in stderr) == asserts, stderr