[ccan] ciniparser test failed on PowerPC

Joseph Adams joeyadams3.14159 at gmail.com
Wed Jul 15 15:43:11 EST 2009


I did a make check on CCAN with my eMac G4 (PowerPC) under Fedora 10
today.  Everything passed except ciniparser, which failed 8/12 tests,
the first being:

ok(itmp = ciniparser_getnsec(ini),
		"ciniparser_getnsec()   : %d entries in dictionary %s",
			itmp, ini_name);

I found out that it only seems to happen when ciniparser is compiled
with -O3 (-fstrict-aliasing doesn't seem to change matters).  Note
that on PowerPC, GCC defaults to char being unsigned instead of
signed.  When I add -fsigned-char, ciniparser passes the tests.
However, when I try -O3 -funsigned-char on my x86, ciniparser still
passes.

Thus, from what I've gathered, ciniparser only seems to fail on
PowerPC when -O3 and unsigned chars are enabled.  Any ideas why?  To
test, perhaps someone should write tests specifically for
dictionary.[ch] .

By the way, one crazy idea to consider would be to use my new
stringmap module (
http://ccan.ozlabs.org/repo/?cmd=content;path=ccan/stringmap/_info )
instead of dictionary here :)


More information about the ccan mailing list