llvm-gcc won't bootstrap

Got a strange problem. With our modified llvm here,llvm-gcc won't
bootstrap. It fails compiling unwind-dw2.c during translation from
the gcc IR to llvm. It fails with -O0 -emit-llvm so according to
the docs, this is strictly a frontend bug. A run of delta produced
an 18 line testcase with nothing remarkable in it.

However, it bootstraps fine using the official llvm sources. Note
that the llvm-gcc sources used in both builds is identical.

How can this be?

                                -Dave

unwind-dw2.c is compiled using newly built llvm-gcc which uses your version of llvm for optimization and code generation. So there may be a bug somewhere in your version of llvm that is mis-compiling llvm-gcc that is used to compile unwind-dw2.c.

Devang Patel wrote:

unwind-dw2.c is compiled using newly built llvm-gcc which uses your
version of llvm for optimization and code generation. So there may be
a bug somewhere in your version of llvm that is mis-compiling llvm-gcc
that is used to compile unwind-dw2.c.

Yes, I know the difference is our llvm. But it's not running through
the optimizer or machine code generator as I'm compiling with -O0 and
- -emit-llvm. In fact the thing never gets beyond gcc-to-llvm
translation.

I was on to something this afternoon, it looked like an actual gcc
frontend bug. It may be that our llvm changes the memory layout
just right to expose the problem. I'll take up the investigation
tomorrow and see if I can fix it.

                              -Dave