On Mon, Nov 03, 2014 at 11:06:06AM +0100, Jan-Benedict Glaw wrote: > On Wed, 2014-10-29 18:27:57 +0800, Zhenqiang Chen <zhenqiang.c...@arm.com> > wrote: > > Hi, > > > > The patch enhances ifcvt to allow_cc_mode if HAVE_cbranchcc4. > > > > Bootstrap and no make check regression on X86-64. > > Will add new test cases after ccmp is enabled. > > > > Ok for trunk? > > This seems to uncover something for s390x-linux, see > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=372394 > > [...] > g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions > -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual > -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long > -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. > -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. > -I/home/jbglaw/repos/gcc/gcc/../include > -I/home/jbglaw/repos/gcc/gcc/../libcpp/include > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber > -I/home/jbglaw/repos/gcc/gcc/../libbacktrace -o ifcvt.o -MT ifcvt.o -MMD > -MP -MF ./.deps/ifcvt.TPo /home/jbglaw/repos/gcc/gcc/ifcvt.c > /home/jbglaw/repos/gcc/gcc/ifcvt.c:1456:5: error: token "." is not valid in > preprocessor expressions > /home/jbglaw/repos/gcc/gcc/ifcvt.c:1788:5: error: token "." is not valid in > preprocessor expressions > /home/jbglaw/repos/gcc/gcc/ifcvt.c:2370:5: error: token "." is not valid in > preprocessor expressions > make[1]: *** [ifcvt.o] Error 1 > > It's choking on the HAVE_cbranchcc4 macro itself there.
Note the HAVE_* macros can be not defined, or defined to complex expressions (for the conditions), not necessarily compile time constants. At the start of ifcvt.c there is: #ifndef HAVE_conditional_move #define HAVE_conditional_move 0 #endif #ifndef HAVE_incscc #define HAVE_incscc 0 #endif #ifndef HAVE_decscc #define HAVE_decscc 0 #endif #ifndef HAVE_trap #define HAVE_trap 0 #endif so supposedly HAVE_cbranchcc4 should be treated similarly, and all the #if HAVE_cbranchcc4 code actually replaced with if (HAVE_cbranchcc4) #instead. Jakub