During a compile of gcc 4.3.2 through gentoo's portage with or without
gentoo-specific patches, and cflags of "-march=native -O2 -pipe" on an amdfam10
processor, an internal compiler error occurs consistently:

/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/sbitmap.c: In function
'sbitmap_popcount':
/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/sbitmap.c:1047:
internal compiler error: in memory_address_length, at config/i386/i386.c:16380
make[3]: *** [sbitmap.o] Error 1
make[3]: Leaving directory
`/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/gcc'
make[2]: *** [all-stageprofile-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.2/work/build'
make[1]: *** [stageprofile-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.2/work/build'
make: *** [profiledbootstrap] Error 2


The command executed to build that file is:

/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/xgcc 
-B/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/
-B/usr/i686-pc-linux-gnu/bin/ -c -O2
 -march=native -pipe -fprofile-generate -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes 
 -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-pedantic -Wno-long-long 
 -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I.
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc 
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/. 
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../include
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libcpp/include  
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libdecnumber 
  -I/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libdecnumber/bid
-I../libdecnumber    
  /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/sbitmap.c -o
sbitmap.o


This error *does* occur with the cflags "-O1 -march=native -pipe" (-O1 rather
than -O2) and does *not* occur with cflags of "-O1 -pipe" - leading me to
believe that the problem lies in the native optimizations for the processor
(AMD Phenom 9850 Quad-Core). I have not attempted to build gcc outside of
portage, or with -march=amdfam10 (rather than native) in cflags. I have only
attempted to reproduce this within a VM (VMWare Workstation 6.5), but I don't
believe that is relevant due to its design - these instructions should be
executed natively. I can, with significant effort, try this build outside of a
VM if absolutely necessary.

I can help reproduce, test, or provide information about this problem as
needed.


-- 
           Summary: Internal compiler error during gcc build with -
                    march=amdfam10
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: special at dereferenced dot net
 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=38177

Reply via email to