fix check of fn calls from argmemonly functions
fixes
MODIFY
ir/instr.cpp
ir/instr.cpp
@@ -1802,7 +1802,7 @@ StateValue FnCall::toSMT(State &s) const {
vector<StateValue> inputs;
vector<Memory::PtrInput> ptr_inputs;
vector<Type*> out_types;
- bool argmemonly = attrs.has(FnAttrs::ArgMemOnly);
+ bool argmemonly = s.getFn().getFnAttrs().has(FnAttrs::ArgMemOnly);
ostringstream fnName_mangled;
fnName_mangled << fnName;

ADD
tests/alive-tv/attrs/argmemonly-ub2.srctgt.ll
+; ERROR: Source is more defined than target
+
+@x = constant i8 0
+@y = constant i8 1
+
+declare i8 @f(i8* %p) readonly argmemonly
+
+define i8 @src() {
+ %r = call i8 @f(i8* @x)
+ ret i8 %r
+}
+
+define i8 @tgt() {
+ %r = call i8 @f(i8* @y)
+ ret i8 %r
+}

fix check of fn calls from argmemonly functions
fixes #763