You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After compiling with patmos-clang -O2 main.c, and running using echo "2" | pasim a.out, we would expect it to output Output: 4, but instead we get Output: 2.
Clearly scanf is not working correctly.
Running the same program and commands on ubuntu outputs the expected string
The text was updated successfully, but these errors were encountered:
Wow, that difference between macos and Linux? The above-mentioned issue is reported on patemu instead of pasim. But maybe they are related. And in newlib instead of the two simulators.
To send input to a program's stdin running on the simulator, we can use piping:
echo "some input" | pasim a.out
.Doing this on macos doesn't work. Example program:
After compiling with
patmos-clang -O2 main.c
, and running usingecho "2" | pasim a.out
, we would expect it to outputOutput: 4
, but instead we getOutput: 2
.Clearly
scanf
is not working correctly.Running the same program and commands on ubuntu outputs the expected string
The text was updated successfully, but these errors were encountered: