Messages in this thread | | | Date | Mon, 7 Dec 2009 13:13:01 -0500 | From | Jakub Jelinek <> | Subject | Re: GCC 4.x random code generator for x86_64 ? |
| |
On Mon, Dec 07, 2009 at 06:50:17PM +0100, Thomas Gleixner wrote: > Can anyone shed some light on the following: > > Applying a patch which adds a yet unused "extern int bla(void);" line > to a header file results in something which is beyond me. > > The .i files differ as expected in exaclty _one_ line.
The source code is different, so this doesn't seem to be random code generation. The extra declaration means following decls will have higher uids and there is a bunch of places in gcc where hash tables are traversed and code generation depends on the order in the traversal. While hash tables hashed on pointer values are considered important bugs because generated code could change in between runs with the same source, traversal of tables hashed by decl uids are far less severe - gcc makes no promises that different sources result in the same generated code. You are using quite oldish gcc, if you reproduce it with something newer (current 4.5 trunk or recent gcc from redhat/gcc-4_4-branch) and provide full preprocessed source and exact command line options, I'll have a look though.
Jakub
| |