public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13531] New: __builtin_apply compilation error for -march=i686 and greater
@ 2003-12-31 10:36 lowzl at hotmail dot com
2003-12-31 11:59 ` [Bug c++/13531] " lowzl at hotmail dot com
2003-12-31 18:09 ` ebotcazou at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: lowzl at hotmail dot com @ 2003-12-31 10:36 UTC (permalink / raw)
To: gcc-bugs
I do not know exactly what triggers this bug, however, I can repeatedly cause
it, for -march=i686 and greater, for Linux and Cygwin.
My Linux GCC was configured with:
/var/tmp/portage/gcc-3.2.3-r3/work/gcc-3.2.3/configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long
--disable-checking --enable-cstdio=stdio --enable-clocale=generic
--enable-__cxa_atexit --enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext
I use the stock Cygwin GCC build.
This is the (generated) code in question:
.loc 1 60 0
movl -20(%ebp), %eax
movl (%eax), %ecx
movl %esp, %esi
subl $32, %esp
leal 8(%esp), %edx ### Should be leal (%esp), %edx or movl %esp, %edx
movl (%ecx), %eax
movl %eax, (%edx)
movl 4(%ecx), %eax
movl %eax, 4(%edx)
movl 8(%ecx), %eax
movl %eax, 8(%edx)
movl 12(%ecx), %eax
movl %eax, 12(%edx)
movl 16(%ecx), %eax
movl %eax, 16(%edx)
movl 20(%ecx), %eax
movl %eax, 20(%edx)
movl 24(%ecx), %eax
movl %eax, 24(%edx)
movl 28(%ecx), %eax
movl %eax, 28(%edx)
movl -20(%ebp), %eax
addl $4, %eax
movl (%eax), %eax
movl -20(%ebp), %edx
addl $8, %edx
movl (%edx), %edx
movl -20(%ebp), %ecx
addl $12, %ecx
movl (%ecx), %ecx
movl -16(%ebp), %ebx
call *%ebx
fstp %st(1)
movl %eax, -168(%ebp)
movl %edx, -164(%ebp)
fstpt -152(%ebp)
movl %esi, %esp
leal -168(%ebp), %eax
movl %eax, -24(%ebp)
Because of this bug, the arguments are copied offset by 2 positions to the
right, i.e. old arg 1 becomes new arg 3, old arg 2 becomes new arg 4 etc.
I have tested this on 3 different builds of the same GCC source code (on 3
different i686-pc-linux-gnu machines), all produce this error at -march=i686 or
greater. Using -march=i586 and lower does not trigger this bug.
I have also tested this code on the September 2003 update of the Apple Developer
Tools - it compiles correctly there.
--
Summary: __builtin_apply compilation error for -march=i686 and
greater
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lowzl at hotmail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu ; i686-pc-cygwin
GCC host triplet: i686-pc-linux-gnu ; i686-pc-cygwin
GCC target triplet: i686-pc-linux-gnu ; i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13531
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/13531] __builtin_apply compilation error for -march=i686 and greater
2003-12-31 10:36 [Bug c++/13531] New: __builtin_apply compilation error for -march=i686 and greater lowzl at hotmail dot com
@ 2003-12-31 11:59 ` lowzl at hotmail dot com
2003-12-31 18:09 ` ebotcazou at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: lowzl at hotmail dot com @ 2003-12-31 11:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lowzl at hotmail dot com 2003-12-31 09:48 -------
Created an attachment (id=5387)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5387&action=view)
tar.bz2 containing source code, intermediate files and Makefiles
The GCC-BugReport subdirectory contains the final executable and intermediate
files.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13531
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/13531] __builtin_apply compilation error for -march=i686 and greater
2003-12-31 10:36 [Bug c++/13531] New: __builtin_apply compilation error for -march=i686 and greater lowzl at hotmail dot com
2003-12-31 11:59 ` [Bug c++/13531] " lowzl at hotmail dot com
@ 2003-12-31 18:09 ` ebotcazou at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-12-31 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2003-12-31 18:04 -------
*** This bug has been marked as a duplicate of 12210 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13531
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-12-31 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-31 10:36 [Bug c++/13531] New: __builtin_apply compilation error for -march=i686 and greater lowzl at hotmail dot com
2003-12-31 11:59 ` [Bug c++/13531] " lowzl at hotmail dot com
2003-12-31 18:09 ` ebotcazou at gcc dot gnu dot org
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).