public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/38177]  New: Internal compiler error during gcc build with -march=amdfam10
@ 2008-11-19 17:29 special at dereferenced dot net
  2008-11-23 19:31 ` [Bug target/38177] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: special at dereferenced dot net @ 2008-11-19 17:29 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
@ 2008-11-23 19:31 ` pinskia at gcc dot gnu dot org
  2008-11-23 23:48 ` special at dereferenced dot net
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-11-23 19:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-11-23 19:30 -------
Can you provide the preprocessed source and the output of adding -v to the
invocation line?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
          Component|other                       |target
           Keywords|                            |build, ice-on-valid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
  2008-11-23 19:31 ` [Bug target/38177] " pinskia at gcc dot gnu dot org
@ 2008-11-23 23:48 ` special at dereferenced dot net
  2008-11-23 23:49 ` special at dereferenced dot net
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: special at dereferenced dot net @ 2008-11-23 23:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from special at dereferenced dot net  2008-11-23 23:46 -------
Created an attachment (id=16753)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16753&action=view)
Preprocessed source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
  2008-11-23 19:31 ` [Bug target/38177] " pinskia at gcc dot gnu dot org
  2008-11-23 23:48 ` special at dereferenced dot net
@ 2008-11-23 23:49 ` special at dereferenced dot net
  2008-11-24 15:06 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: special at dereferenced dot net @ 2008-11-23 23:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from special at dereferenced dot net  2008-11-23 23:48 -------
Output of the failed command with -v (removed irrelevant lines of 'ignoring
nonexistant/duplicate directory' for incldues):

Reading specs from
/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/specs
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.2
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror --enable-secureplt
--disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp
--enable-cld --disable-libgcj --with-arch=i686
--enable-languages=c,c++,treelang,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.2'
Thread model: posix
gcc version 4.3.2 (Gentoo 4.3.2) 
COLLECT_GCC_OPTIONS='-B/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/'
'-B/usr/i686-pc-linux-gnu/bin/' '-c' '-O2'  '-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' '-I../../build/gcc/' '-v' '-o' 'sbitmap.o'
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/cc1 -quiet -v -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 -I../../build/gcc/ -iprefix
/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/prev-gcc/../../../lib/gcc/i686-pc-linux-gnu/4.3.2/
-isystem /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/include
-isystem
/var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/include-fixed
-DIN_GCC -DHAVE_CONFIG_H
/var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/sbitmap.c
-march=amdfam10 -mcx16 -msahf --param l1-cache-size=64 --param
l1-cache-line-size=64 -mtune=amdfam10 -quiet -dumpbase sbitmap.c -auxbase-strip
sbitmap.o -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -version -fprofile-generate -o - |
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/as -V -Qy -o
sbitmap.o -
#include "..." search starts here:
#include <...> search starts here:
 .
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../include
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libcpp/include
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libdecnumber
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/gcc-4.3.2/gcc/../libdecnumber/bid
 ../../build/gcc/
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/include
 /var/tmp/portage/sys-devel/gcc-4.3.2/work/build/./prev-gcc/include-fixed
 /usr/include
End of search list.
GNU C (Gentoo 4.3.2) version 4.3.2 (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.3.1.
GNU assembler version 2.18 (i686-pc-linux-gnu) using BFD version (GNU Binutils)
2.18
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 930702400f402cfbdac6d055d258069e
/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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
                   ` (2 preceding siblings ...)
  2008-11-23 23:49 ` special at dereferenced dot net
@ 2008-11-24 15:06 ` ubizjak at gmail dot com
  2008-11-24 15:31 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2008-11-24 15:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ubizjak at gmail dot com  2008-11-24 15:05 -------
The sbitmap.i works for me with ~/gcc-build-43/gcc/cc1 -O2 -march=amdfam10
-mcx16 -msahf -fprofile-generate --param l1-cache-size=64 --param
l1-cache-line-size=64

where

GNU C (GCC) version 4.3.3 20081110 (prerelease) [gcc-4_3-branch revision
141732] (i686-pc-linux-gnu)

and

GNU C (GCC) version 4.4.0 20081121 (prerelease) [trunk revision 142081]
(i686-pc-linux-gnu)

Can you try latest 4.3 branch?


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.3.3 4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
                   ` (3 preceding siblings ...)
  2008-11-24 15:06 ` ubizjak at gmail dot com
@ 2008-11-24 15:31 ` ubizjak at gmail dot com
  2008-11-24 15:37 ` special at dereferenced dot net
  2008-11-24 16:02 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2008-11-24 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ubizjak at gmail dot com  2008-11-24 15:29 -------
BTW: You should report this bug to:

with-bugurl=http://bugs.gentoo.org/


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
                   ` (4 preceding siblings ...)
  2008-11-24 15:31 ` ubizjak at gmail dot com
@ 2008-11-24 15:37 ` special at dereferenced dot net
  2008-11-24 16:02 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: special at dereferenced dot net @ 2008-11-24 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from special at dereferenced dot net  2008-11-24 15:36 -------
I've already spoken to one of the GCC maintainers for gentoo - he advised me to
report the issue directly upstream if I could reproduce it without
gentoo-specific patches (which I have); this could be an issue with how the
gentoo ebuild is building gcc, but even so it looks like a GCC bug, not a
gentoo bug.

I can try a build with the latest from the 4.3 branch later today.


-- 

special at dereferenced dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/38177] Internal compiler error during gcc build with -march=amdfam10
  2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
                   ` (5 preceding siblings ...)
  2008-11-24 15:37 ` special at dereferenced dot net
@ 2008-11-24 16:02 ` ubizjak at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2008-11-24 16:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ubizjak at gmail dot com  2008-11-24 16:00 -------
(In reply to comment #6)
> I've already spoken to one of the GCC maintainers for gentoo - he advised me to
> report the issue directly upstream if I could reproduce it without
> gentoo-specific patches (which I have); this could be an issue with how the

The trick is, that gentoo maintainer should first check if the bug is already
fixed in the SVN (on the branch they are using). The maintainer _should_ track
the SVN branch head to filter out bugs that are already fixed.

Please see http://gcc.gnu.org/bugs.html#dontwant


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38177


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-24 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 17:29 [Bug other/38177] New: Internal compiler error during gcc build with -march=amdfam10 special at dereferenced dot net
2008-11-23 19:31 ` [Bug target/38177] " pinskia at gcc dot gnu dot org
2008-11-23 23:48 ` special at dereferenced dot net
2008-11-23 23:49 ` special at dereferenced dot net
2008-11-24 15:06 ` ubizjak at gmail dot com
2008-11-24 15:31 ` ubizjak at gmail dot com
2008-11-24 15:37 ` special at dereferenced dot net
2008-11-24 16:02 ` ubizjak at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).