[reg...@gamow tmp426]$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r163740-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r163740-install --program-prefix=r163740- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20100901 (experimental) (GCC)
[reg...@gamow tmp426]$ cat small.c int g_9; int *g_8 = &g_9; int g_56; int *g_209 = &g_56; int func_103 (int p_104) { if (1 != *g_8) { unsigned char l_107[3]; g_56 &= l_107[2]; } else for (0; g_56; 0) &p_104; return p_104; } void func_85 (int,int); void int320 (int * p_51, int p_52, unsigned p_53) { int l; func_85 (func_103 (0), *g_209); l = func_103 (0); } [reg...@gamow tmp426]$ current-gcc -O2 small.c small.c: In function 'func_103': small.c:6:5: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: null pointer dereference in gcc Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45512