"Valery A.Khamenya"
2003-Nov-13 12:29 UTC
[LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
> > - gcc bug > > - problem with SuSE distribution > > One of these two. In theory GCC should never crash (even if the LLVM > sources had problems), and since SuSE made modifications to the compiler > before they shipped it, they implicitly took responsibility for the end > result.I agree.> You can try sending a bug report to SuSE.hm, sending bug report is not my favorite hobby :)> That said, if you can figure out what is causing the problem,well, I know: assert( expression && "my way to kick out gcc from SuSE 9 :)" ) BTW, the following (expression && "my way to kick out gcc from SuSE 9 :)") is ok for gcc. So the problem comes from composition this argument with assert itself.> I would definitely like to put a workaround in the LLVM code, assuming it's not > too ugly. Compatibility with a broad range of compilers is important, > even if they are buggy. :)I see. The following ugly workaround helps: #ifdef NDEBUG bool b = getOption(ArgName) == Opt ; assert( b && "Arg not in map!"); #endif Well, one could camouflage this :) -- vak
Brian R. Gaeke
2003-Nov-13 12:36 UTC
[LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
> > I would definitely like to put a workaround in the LLVM code, assuming it's not > > too ugly. Compatibility with a broad range of compilers is important, > > even if they are buggy. :) > > I see. The following ugly workaround helps: > > #ifdef NDEBUG > bool b = getOption(ArgName) == Opt ; > assert( b && "Arg not in map!"); > #endifYou might try something like assert((getOption(ArgName) == Opt) && "Arg not in map!"); (note extra parens) -Brian -- gaeke at uiuc.edu
Chris Lattner
2003-Nov-13 12:41 UTC
[LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
On Thu, 13 Nov 2003, [koi8-r] "Valery A.Khamenya[koi8-r] " wrote:> > You can try sending a bug report to SuSE. > > hm, sending bug report is not my favorite hobby :)Well if you don't, it might never get fixed :(> > That said, if you can figure out what is causing the problem, > > well, I know: > > assert( expression && "my way to kick out gcc from SuSE 9 :)" ) > BTW, the following > (expression && "my way to kick out gcc from SuSE 9 :)") > is ok for gcc. So the problem comes from composition this argument with assert itself.If it is just one or two places in the source base, it's probably ok to work around this. If the SuSE compiler has problems with that construct in general, however, it will never compile LLVM (we use it all over the place). It might be possible to hack your <cassert> header file or something though... -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/
"Valery A.Khamenya"
2003-Nov-13 13:17 UTC
[LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
> You might try something like > > assert((getOption(ArgName) == Opt) && "Arg not in map!"); > > (note extra parens)I've tried. It doesn't help BTW, the same workaround helps in: utils/TableGen/InstrSelectorEmitter.cpp lib/Analysis/IntervalPartition.cpp lib/CodeGen/RegAlloc/PhyRegAlloc.cpp interesting, that assert couses internal error not in every instance :-/ Well, but then comes: ------------------------------ make[3]: Entering directory `/home/vak/llvm/llvm/runtime/GCCLibraries/crtend' Compiling C++-Exception.cpp to bytecode gccas: Pass.cpp:311: void RegisterPassBase::registerPass(PassInfo*): Assertion `PassInfoMap->find(PI->getTypeInfo()) == PassInfoMap->end() && "Pass already registered!"' failed. g++: Internal error: Aborted (program as) Please submit a full bug report. See <URL:http://llvm.cs.uiuc.edu> for instructions. ------------------------------ P.S. guys, I am really sorry about ugly symbols around subject, it is because of a stupid www interface :(
"Valery A.Khamenya"
2003-Nov-13 13:59 UTC
[LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
> > hm, sending bug report is not my favorite hobby :) > > Well if you don't, it might never get fixed :(OK-OK, let's save the world :) Well, I've made it.> It might be possible to hack your <cassert> header file or something > though...it is just a few places in three files as reported in my previous post. Then comes assert violation with message from llvm sources. regards, -- vak
Possibly Parallel Threads
- [LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
- [LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
- [LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
- [LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error
- [LLVMdev] llvm 1.0, g++, SuSE 9, internal compiler error