public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/3724: Illegal instruction when profiling optimized code on arm-linux
@ 2001-07-17 18:16 philr
0 siblings, 0 replies; 2+ messages in thread
From: philr @ 2001-07-17 18:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 3724
>Category: optimization
>Synopsis: Illegal instruction when profiling optimized code on arm-linux
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Tue Jul 17 18:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: philr
>Release: 3.0
>Organization:
>Environment:
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-unknown-linux-gnu
glibc-2.2.3 (happens under glibc-2.1.3 as well) on an Intel Assabet dev board.
>Description:
I can run code compiled with -O or -pg, but if I use both, an illegal instruction halts the program after the first profiled function returns.
>How-To-Repeat:
On host:
$ arm-linux-gcc -v -save-temps -O -pg test.c
Reading specs from /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/specs
Configured with: ../gcc-3.0/configure --target=arm-linux --host=i686-pc-linux --prefix=/usr/arm_tools --enable-languages=c,c++
Thread model: posix
gcc version 3.0
/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/cpp0 -lang-c -v -iprefix /usr/local/bin/../lib/gcc-lib/arm-linux/3.0/ -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__ELF__ -D__unix -D__linux -Asystem=unix -Asystem=posix -Acpu=arm -Amachine=arm -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D__ARM_ARCH_3__ -D__APCS_32__ -D__ARMEL__ -D__arm__ test.c test.i
GNU CPP version 3.0 (cpplib) (ARM GNU/Linux with ELF)
ignoring nonexistent directory "/usr/local/lib/gcc-lib/arm-linux/3.0/include"
ignoring nonexistent directory "/usr/local/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/sys-include"
ignoring nonexistent directory "/usr/local/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/include
/usr/arm_tools/lib/../arm-linux/sys-include
/usr/arm_tools/lib/../arm-linux/include
End of search list.
/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/cc1 -fpreprocessed test.i -quiet -dumpbase test.c -O -version -p -o test.s
GNU CPP version 3.0 (cpplib) (ARM GNU/Linux with ELF)
GNU C version 3.0 (arm-linux)
compiled by GNU C version 3.0.
/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/bin/as -o test.o test.s
/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/collect2 -dynamic-linker /lib/ld-linux.so.2 -X -m armelf_linux -p /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/lib/gcrt1.o /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/lib/crti.o /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/crtbegin.o -L/usr/local/bin/../lib/gcc-lib -L/usr/arm_tools/lib/gcc-lib/arm-linux/3.0 -L/usr/arm_tools/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/lib test.o -lgcc -lc -lgcc /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/crtend.o /usr/arm_tools/lib/gcc-lib/arm-linux/3.0/../../../../arm-linux/lib/crtn.o
$ cat test.i
# 1 "test.c"
void func() {} int main() { func(); }
On target:
$ ./a.out
a.out (268): undefined instruction: pc=4011fd0c
Code: 30292a20 7c7c2029 (616d2a20) 6e656c78 203d2120
Illegal instruction
$
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/3724: Illegal instruction when profiling optimized code on arm-linux
@ 2001-07-18 0:26 Philip Blundell
0 siblings, 0 replies; 2+ messages in thread
From: Philip Blundell @ 2001-07-18 0:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/3724; it has been noted by GNATS.
From: Philip Blundell <philb@gnu.org>
To: philr@iobjects.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/3724: Illegal instruction when profiling optimized code on arm-linux
Date: Wed, 18 Jul 2001 08:15:48 +0100
--==_Exmh_-1086092172P
Content-Type: text/plain; charset=us-ascii
>glibc-2.2.3 (happens under glibc-2.1.3 as well) on an Intel Assabet dev board.
>>Description:
>I can run code compiled with -O or -pg, but if I use both, an illegal instruct
>ion halts the program after the first profiled function returns.
I think the bug is actually in glibc. You might find that you can use
"-fno-omit-frame-pointer" as a workaround.
p.
--==_Exmh_-1086092172P
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999 (debian)
iD8DBQE7VTekVTLPJe9CT30RAmyhAJ9gvQ2dqjiLcdSRH57VX2/wh0s9BACfXwSy
I+SHPoIC7ZW768uzbGl1Mgc=
=FLSf
-----END PGP SIGNATURE-----
--==_Exmh_-1086092172P--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-18 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 18:16 optimization/3724: Illegal instruction when profiling optimized code on arm-linux philr
2001-07-18 0:26 Philip Blundell
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).