Created
July 10, 2017 06:11
-
-
Save kaityo256/6ba47b403356d59854712d1bc1fe427f to your computer and use it in GitHub Desktop.
Compilation takes too long
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| const int N = 100000000; | |
| int | |
| main(void){ | |
| static int a[N] = {}; | |
| printf("%d\n",a[0]); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you compile it with "g++ -O3 -g", then it takes too long to compile.
This phenomenon depends on version of GCC. I observed this behavior with following versions,
Other compilers, such as clang++ and icpc, does not show this behavior.