s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.73k stars 193 forks source link

g++ can't compile code with string class correctly #163

Open JianmingJin opened 3 years ago

JianmingJin commented 3 years ago

For the simple C++ code, G++ display error message of " segmentation fault".

include

include

using namespace std; int main() { string s; cin >> s; cout << s; return 0; }

However, initialize "s" as an empty string , the compile result is OK. I am very appreciate if anyone can help to solve the problem.