Re: Higher order arithmetic compressoe



So I experimented further on until I realized that it is an
optimization issue:

$ g++ -Wall -O2 unarbc0.cpp bit_byts.cpp -o unarbc0
$ g++ -Wall -O2 arbc0.cpp bit_byts.cpp -o arbc0
produces the bad versions which don't work properly, whereas
$ g++ -Wall arbc0.cpp bit_byts.cpp -o arbc0
$ g++ -Wall unarbc0.cpp bit_byts.cpp -o unarbc0
gives correctly working tools.

Then there is almost certainly a bug in the code, which the
unoptimized version is accidentally suppressing. Time to break out the
debugger.

b
.



Relevant Pages

  • Re: Noob Guestion About Make.conf
    ... Note that optimization settings other than -O and -O2 ... submitting bug reports without patches to the developers. ... FreeBSD world needs all the compiler hackers it can get:) ...
    (comp.unix.bsd.freebsd.misc)
  • Re: buggy optimization levels...
    ... > the optimization that caused the observed failure is thus also hard. ... Note that it is not necessarily gcc which is at fault for such ... It may be a bug in gcc, but it may also be a bug in the code ...
    (freebsd-questions)
  • ///Re: Branch displacement Optimization
    ... If the answer is yes, the assembler reduces the ... optimization, still assembles programs FASTER than RosAsm. ... there is a nasty bug somewhere that i must ... the essay isn't attacking anything. ...
    (alt.lang.asm)
  • Re: Function prefix comments in C files
    ... now that reminds me of a bug I spent an unreasonable time searching ... It turned out that when the compiler had its ... default optimization level on the access to the pointer was ... With optimization turned off access was no longer atomic and it ...
    (comp.arch.embedded)
  • RE: Administrivia: List Announcement
    ... The first example is 'just a bug'. ... Ops can be reduced if your compiler could optmize it. ... character strings, which is sort of implied as I read it, then it is pretty ... can express that optimization in vanilla C, ...
    (Vuln-Dev)