Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

G++ bug?
Difference between en1 and en2, changed 87 character(s)
~~~~~↵
#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 &mdash; g++ (GCC) 5.1.0↵

- Linux 4.3.3-1-ARCH x86_64 GNU/Linux &mdash; g++ (GCC) 5.3.0↵

- Linux 3.19.0-21-generic x86_64 GNU/Linux &mdash; g++ (GCC) 5.3.0↵

- It also fails when submitted to ideone.com
, codeforces.com ([eg](http://codeforces.com/contest/611/submission/15167432)), 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?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English JoeyWheeler 2016-01-03 14:49:14 11 Tiny change: 'ng on g++ under lin' -> 'ng on g++ with c++11 under lin'
en2 English JoeyWheeler 2016-01-03 14:06:13 87
en1 English JoeyWheeler 2016-01-03 13:52:32 781 Initial revision (published)