From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.7.11) Gecko/20050729 Description of problem: for some files, the command `gcc -dCv file.c` or `gcc -drv file.c` will lead to "internal compiler error: Segmentation fault" Version-Release number of selected component (if applicable): 4.0.0 20050519 (Red Hat 4.0.0-8) How reproducible: Always Steps to Reproduce: use the dump option for generating control flow graph to compile the following code: #include <stdio.h> void main(void) { int i = 1, j = 10, tmp = 100; char *pi =&i, *pj=&j; *((int*)pi)=*((int*)pj); printf("%x,%x\n", pi, pj); pj = ((int*)pj)+1; pi++; printf("%x,%x\n", pi, pj); printf("%d,%d,tmp=%d\n", i, j, tmp); } Additional info:
Created attachment 117625 [details] This is the same code as above. For many other code, the dump option doesn't work either.
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00676.html
Should be fixed in gcc-4.0.1-9.
I tried on gcc4 (GCC) 4.1.0 20050826, it works. Thanks!