G++ bug?

Правка en2, от JoeyWheeler, 2016-01-03 14:06:13
#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++ 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский JoeyWheeler 2016-01-03 14:49:14 11 Tiny change: 'ng on g++ under lin' -> 'ng on g++ with c++11 under lin'
en2 Английский JoeyWheeler 2016-01-03 14:06:13 87
en1 Английский JoeyWheeler 2016-01-03 13:52:32 781 Initial revision (published)