Compile the following code without any optimizations: #include <stdio.h>
int main(int argc, char *argv[]) { char a[9000000]; printf("gcc is wonderful\n"); } like gcc test.c -o test.o ./test Segmentation fault Is it a bug? Can anyone give an insight why such a code segfaults? -- Summary: [BUG or NOT?] Segmentation fault on valid code Product: gcc Version: 4.2.4 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: t dot artem at mailcity dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39741