Hide Forgot
Created attachment 532596 [details] Pre-processed source. Reduced almost to minimum. Description of problem: Segfault when compiling Version-Release number of selected component (if applicable): gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) gcc-4.6.2-1.fc16.x86_64 How reproducible: every time with the supplied preprocessed source. Steps to Reproduce: 1. gcc -m32 -O -c source.i Actual results: cc: internal compiler error: Segmentation fault (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Expected results: compile to succeed, no output Additional info: removing -O makes it compile.
I did some additional debugging: $ gdb /usr/bin/gcc GNU gdb (GDB) Fedora (7.3.50.20110722-9.fc16) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/gcc...Reading symbols from /usr/lib/debug/usr/bin/x86_64-redhat-linux-gcc.debug...done. done. (gdb) set follow-fork-mode child (gdb) run -m32 -O -c source.i Starting program: /usr/bin/gcc -m32 -O -c source.i [New process 9643] process 9643 is executing new program: /usr/libexec/gcc/x86_64-redhat-linux/4.6.2/cc1 Program received signal SIGSEGV, Segmentation fault. [Switching to process 9643] 0x0000000000749fec in addr_object_size (osi=0x7fffff7ff190, ptr=0x7ffff0a720c0, object_size_type=0) at ../../gcc/tree-object-size.c:163 163 { (gdb) bt #0 0x0000000000749fec in addr_object_size (osi=0x7fffff7ff190, ptr=0x7ffff0a720c0, object_size_type=0) at ../../gcc/tree-object-size.c:163 #1 0x000000000074a51c in expr_object_size (osi=<optimized out>, ptr=<optimized out>, value=<optimized out>) at ../../gcc/tree-object-size.c:638 #2 0x000000000074aca6 in collect_object_sizes_for (osi=0x7fffff7ff190, var=0x7ffff0a71688) at ../../gcc/tree-object-size.c:946 #3 0x000000000074af19 in merge_object_sizes (osi=0x7fffff7ff190, dest=<optimized out>, orig=0x7ffff0a71688, offset=0) at ../../gcc/tree-object-size.c:733 #4 0x000000000074a862 in collect_object_sizes_for (osi=0x7fffff7ff190, var=0x7ffff0a73108) at ../../gcc/tree-object-size.c:1000 #5 0x0000000000749b55 in compute_builtin_object_size (ptr=0x7ffff0a73108, object_size_type=0) at ../../gcc/tree-object-size.c:527 #6 0x000000000074a140 in addr_object_size (osi=<optimized out>, ptr=0x7ffff0a720c0, object_size_type=0) at ../../gcc/tree-object-size.c:180 #7 0x000000000074a51c in expr_object_size (osi=<optimized out>, ptr=<optimized out>, value=<optimized out>) at ../../gcc/tree-object-size.c:638 #8 0x000000000074aca6 in collect_object_sizes_for (osi=0x7fffff7ff440, var=0x7ffff0a71688) at ../../gcc/tree-object-size.c:946 #9 0x000000000074af19 in merge_object_sizes (osi=0x7fffff7ff440, dest=<optimized out>, orig=0x7ffff0a71688, offset=0) at ../../gcc/tree-object-size.c:733 #10 0x000000000074a862 in collect_object_sizes_for (osi=0x7fffff7ff440, var=0x7ffff0a73108) at ../../gcc/tree-object-size.c:1000 #11 0x0000000000749b55 in compute_builtin_object_size (ptr=0x7ffff0a73108, object_size_type=0) at ../../gcc/tree-object-size.c:527 #12 0x000000000074a140 in addr_object_size (osi=<optimized out>, ptr=0x7ffff0a720c0, object_size_type=0) at ../../gcc/tree-object-size.c:180 #13 0x000000000074a51c in expr_object_size (osi=<optimized out>, ptr=<optimized out>, value=<optimized out>) at ../../gcc/tree-object-size.c:638 #14 0x000000000074aca6 in collect_object_sizes_for (osi=0x7fffff7ff6f0, var=0x7ffff0a71688) at ../../gcc/tree-object-size.c:946 #15 0x000000000074af19 in merge_object_sizes (osi=0x7fffff7ff6f0, dest=<optimized out>, orig=0x7ffff0a71688, offset=0) at ../../gcc/tree-object-size.c:733 #16 0x000000000074a862 in collect_object_sizes_for (osi=0x7fffff7ff6f0, var=0x7ffff0a73108) at ../../gcc/tree-object-size.c:1000 #17 0x0000000000749b55 in compute_builtin_object_size (ptr=0x7ffff0a73108, This just continues ad infinity. object_size_type=0) at ../../gcc/tree-object-size.c:527 #4254 0x000000000074a140 in addr_object_size (osi=<optimized out>, ptr=0x7ffff0a720c0, object_size_type=0) at ../../gcc/tree-object-size.c:180 #4255 0x000000000074a51c in expr_object_size (osi=<optimized out>, ptr=<optimized out>, value=<optimized out>) at ../../gcc/tree-object-size.c:638 #4256 0x000000000074aca6 in collect_object_sizes_for (osi=0x7fffff876300, var=0x7ffff0a71688) at ../../gcc/tree-object-size.c:946 #4257 0x000000000074af19 in merge_object_sizes (osi=0x7fffff876300, dest=<optimized out>, orig=0x7ffff0a71688, offset=0) at ../../gcc/tree-object-size.c:733 #4258 0x000000000074a862 in collect_object_sizes_for (osi=0x7fffff876300, var=0x7ffff0a73108) at ../../gcc/tree-object-size.c:1000 #4259 0x0000000000749b55 in compute_builtin_object_size (ptr=0x7ffff0a73108, object_size_type=0) at ../../gcc/tree-object-size.c:527 So some non-terminating recursive call it seems. (if my debugging has any value at all.)
i compiled it successfully by: gcc -m32 -O -c ~/Downloads/source.i -o ~/source1 gcc -v: Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
-- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
(In reply to comment #2) > gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) Your compiler is too old to show the problem. gcc 4.6.2 is required. AFAIK this bug has been fixed in gcc trunk and 4.6 branch, more info at the bug# referenced from here.
I too get this error while compiling Mahogany. Applying gcc47-pr51077.patch helps.
gcc-4.6.3-2.fc16,libtool-2.4-9.fc16,gcc-python-plugin-0.9-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/gcc-4.6.3-2.fc16,libtool-2.4-9.fc16,gcc-python-plugin-0.9-1.fc16
Package gcc-4.6.3-2.fc16, libtool-2.4-9.fc16, gcc-python-plugin-0.9-1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gcc-4.6.3-2.fc16 libtool-2.4-9.fc16 gcc-python-plugin-0.9-1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-3370/gcc-4.6.3-2.fc16,libtool-2.4-9.fc16,gcc-python-plugin-0.9-1.fc16 then log in and leave karma (feedback).
gcc-4.6.3-2.fc16, libtool-2.4-9.fc16, gcc-python-plugin-0.9-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.