public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14412] New: [regression] generates different object file when run on the same source
@ 2004-03-03 17:46 ckirby at laurelnetworks dot com
2004-03-03 17:55 ` [Bug c++/14412] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ckirby at laurelnetworks dot com @ 2004-03-03 17:46 UTC (permalink / raw)
To: gcc-bugs
Given the same source file, gcc generates a different .o file every time it is
run. I have verified that it works correctly in 3.3. The problem has been
verified in both 3.3.2 and 3.3.3.
command line:
$ /u/lni/gcc/3.3.3/i686-pc-linux-gnu/bin/i686-pc-linux-gnulibc2.2-g++ -c
src/system/trace/example.c++ -o t1.o
$ /u/lni/gcc/3.3.3/i686-pc-linux-gnu/bin/i686-pc-linux-gnulibc2.2-g++ -c
src/system/trace/example.c++ -o t2.o
$ sum t1.o t2.o
07738 1 t1.o
40330 1 t2.o
example.c++:
namespace
{
class Example
{
public:
Example();
};
Example::Example()
{
}
}
Here is the difference in the objdump output:
$ objdump -D t1.o > od.t1
$ objdump -D t2.o > od.t2
$ diff -du od.t1 od.t2
--- od.t1 2004-03-03 12:40:06.000000000 -0500
+++ od.t2 2004-03-03 12:40:10.000000000 -0500
@@ -1,16 +1,16 @@
-t1.o: file format elf32-i386
+t2.o: file format elf32-i386
Disassembly of section .text:
-00000000 <_ZN45_GLOBAL__N_src_system_trace_example.c__lmRQEb7ExampleC2Ev>:
+00000000 <_ZN45_GLOBAL__N_src_system_trace_example.c__N4Abhc7ExampleC2Ev>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 5d pop %ebp
4: c3 ret
5: 90 nop
-00000006 <_ZN45_GLOBAL__N_src_system_trace_example.c__lmRQEb7ExampleC1Ev>:
+00000006 <_ZN45_GLOBAL__N_src_system_trace_example.c__N4Abhc7ExampleC1Ev>:
6: 55 push %ebp
7: 89 e5 mov %esp,%ebp
9: 5d pop %ebp
$ /u/lni/gcc/3.3.3/i686-pc-linux-gnu/bin/i686-pc-linux-gnulibc2.2-g++ -v
Reading specs from
/u/lni/gcc/3.3.3/i686-pc-linux-gnu/lib/gcc-lib/i686-pc-linux-gnulibc2.2/3.3.3/specs
Configured with: ../../../src/gcc/configure --host=i686-pc-linux-gnu
--target=i686-pc-linux-gnulibc2.2
--with-headers=../../../src/gcc/../sys-root/i686-pc-linux-gnulibc2.2/sys-include
--with-libs=../../../src/gcc/../sys-root/i686-pc-linux-gnulibc2.2/libs
--prefix=/u/lni/gcc/3.3.3/i686-pc-linux-gnu --enable-threads=posix
--enable-long-long --enable-shared
Thread model: posix
gcc version 3.3.3
--
Summary: [regression] generates different object file when run on
the same source
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ckirby at laurelnetworks dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14412
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/14412] [regression] generates different object file when run on the same source
2004-03-03 17:46 [Bug c++/14412] New: [regression] generates different object file when run on the same source ckirby at laurelnetworks dot com
@ 2004-03-03 17:55 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-03 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-03 17:55 -------
This is not a bug, use -frandom-seed=whatever if you want to get the same object file the same each
time.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14412
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-03 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 17:46 [Bug c++/14412] New: [regression] generates different object file when run on the same source ckirby at laurelnetworks dot com
2004-03-03 17:55 ` [Bug c++/14412] " pinskia 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).