[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#559045: maildrop filter tolower() and toupper() functionality get optimized out by gcc



On Tue, 1 Dec 2009 15:38:34 +0100, Bastian Blank <waldi@debian.org> wrote:
> On Tue, Dec 01, 2009 at 03:26:29PM +0100, Josip Rodin wrote:
>> Is there a bug in maildrop-2.2.0/maildrop/recipenode.C that causes it
to
>> get compiled differently with -O1, or is the problem with the compiler?
> 
> Are you able to produce a minimal testcase?

Certainly. If we have a filter test.mailfilter as follows:

>>>

FOO="TestTestTest"
LOWERFOO = tolower($FOO)
UPPERFOO = toupper($FOO)

echo "FOO is $FOO"
echo "LOWERFOO should be testtesttest, is $LOWERFOO"
echo "UPPERFOO should be TESTTESTTEST, is $UPPERFOO"

<<<

With the standard build, I do "echo | maildrop test.mailfilter" and get

>>>

FOO is TestTestTest
LOWERFOO should be testtesttest, is
UPPERFOO should be TESTTESTTEST, is

<<<

But with the -O1 build, I get

>>>

FOO is TestTestTest
LOWERFOO should be testtesttest, is testtesttest
UPPERFOO should be TESTTESTTEST, is TESTTESTTEST

<<<



> 
> Bastian
> 
> -- 
> Our way is peace.
> 		-- Septimus, the Son Worshiper, "Bread and Circuses",
> 		   stardate 4040.7.

-- 
Darac Marjal


Reply to: