This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc bug



Hello ,

I tried to report this bug to Data Base but failed to sent two files.

We've found a bug in gcc versions 3.0.0, 3.0.2, 3.0.3 on Linux only. 

This bug shows only in non-debug version of our executable, so every time we
encounter the bug, it takes much effort to locate the bug in exe assembly
code and prove that the bug is actually in gcc and not in exe itself. Since
it looks that the bug is not being fixed in the released versions of gcc and
it shows from time to time in exe code, we prepared a small testcase that
demonstrates the bug. 


Attached are two files: try.cpp and try.gdb. Try.cpp contains the testcase
that fails at run-time with segmentation fault if compiled with the command
given at the top of the file. Note that it fails only if it is compiled with
-O1 flag. The file try.gdb contains the assembly dump of the function main()
taken from gdb session, and also contains three comments inside the code
explaining why the segmentation fault happens. In short, the problem is that
gcc compiler assigns the same address for two live temporary variables, thus
causing the value of the first variable to be overwritten by the value of
the second.

Thanks in advance,
	Inessa
 <<try.cpp>>  <<try.ZIP>> 

Attachment: try.cpp
Description: Binary data

Attachment: try.ZIP
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]