#3301: -O2 optimization breaks encryption --------------------+------------------------------------------------------- Reporter: pdmef | Owner: pdmef Type: defect | Status: new Priority: major | Milestone: 1.6 Component: build | Version: 1.5.20 Keywords: | --------------------+------------------------------------------------------- This is a bit weird.
When I compile with -O2 (autoconf default) on OS X 10.5.x, it'll break because `crypt_get_keys()` will go into the S/MIME part and look for S/MIME keys even though I use PGP/MIME. `msg->security` is 259 which means to use PGP (`1 << 8` = 256), `1 << 0` = 1 for encryption and `1 << 1` = 2 for signing (256+1+2=259). This used to work with -O2. The only thing I changed is upgrading XCode to 3.1.3. With fink/64bit I use `gcc -arch x86_64`, gcc is: {{{ gcc version 4.0.1 (Apple Inc. build 5493) }}} It does work when I use `gcc-4.2 -arch x86_64` with gcc 4.2: {{{ gcc version 4.2.1 (Apple Inc. build 5574) }}} I can 100% reproduce this. Note that I only need to compile crypt.c using gcc-4.2 to make it work (here even -O2 is fine). So this may well be a gcc bug rather than a mutt bug? -- Ticket URL: <http://dev.mutt.org/trac/ticket/3301> Mutt <http://www.mutt.org/> The Mutt mail user agent