#include <algorithm>
struct RT {
std::pair<int,int> v[100000]; // runtime linked with size of this array, 6s at 10000, 20s at 20000, who knows at 200000 (quadratic time? who knows)
} z;
int main() {
}
The above code seems to be stuck in compiling on g++ with c++11 under linux. (compiled as g++ -o prog prog.cpp -std=c++11) It's been tested and has failed under
Linux 4.0.6-1-ARCH x86_64 GNU/Linux — g++ (GCC) 5.1.0
Linux 4.3.3-1-ARCH x86_64 GNU/Linux — g++ (GCC) 5.3.0
Linux 3.19.0-21-generic x86_64 GNU/Linux — g++ (GCC) 5.3.0
It also fails when submitted to ideone.com, codeforces.com (eg), dmoj.ca
It appears to compile successfully using clang++ and when using cygwin
Could other people try compile this and see what results they get?
Auto comment: topic has been updated by JoeyWheeler (previous revision, new revision, compare).
For me compiling it works with both
g++ prog.cpp
andg++ prog.cpp -std=c++11
.Linux 3.19.0-42-generic x86_64, gcc version 4.8.4
For me it compiles without
-std=c++11
on g++ 5.2.1 (doesn't with the option on), and both works on g++ 4.9.3Linux 4.2.0-22-generic x86_64 (Ubuntu Gnome 15.10), g++ version 5.2.1 / 4.9.3
Also using
tuple
won't work. Containers (vectors, sets and maps) and strings seem to be okay.You should report this bug here: https://gcc.gnu.org/bugs/
Compiles just fine for me both with and without
std=c++11
on Windows (MinGW-w64, GCC 4.9.2) and Linux (g++ (Debian 4.7.2-5) 4.7.2
)I've submitted it as bug on gcc issue tracker two months ago https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68203