[Bug 1263576]

Matthew Gretton-Dann 1263576 at bugs.launchpad.net
Thu Jan 9 13:50:42 UTC 2014


I think the actual issue is with the code in aarch64_build_constant:

      /* zcount contains the number of additional MOVK instructions
	 required if the constant is built up with an initial MOVZ instruction,
	 while ncount is the number of MOVK instructions required if starting
	 with a MOVN instruction.  Choose the sequence that yields the fewest
	 number of instructions, preferring MOVZ instructions when they are both
	 the same.  */
      if (ncount < zcount)
	{
	  emit_move_insn (gen_rtx_REG (Pmode, regnum),
			  GEN_INT ((~val) & 0xffff));
	  tval = 0xffff;
	}
      else
	{
	  emit_move_insn (gen_rtx_REG (Pmode, regnum),
			  GEN_INT (val & 0xffff));
	  tval = 0;
	}

The GEN_INT in the first if branch is incorrect as it truncates the
immediate at 16-bits, and so we will never generate the "MOVN" form.
What it should be instead is: GEN_INT (~((~val) & 0xffff)) or
equivalent.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.8 in Ubuntu.
https://bugs.launchpad.net/bugs/1263576

Title:
  coinor-osi fails to build from source on arm64 (but did succeed
  before)

Status in The GNU Compiler Collection:
  New
Status in Linaro GCC:
  Confirmed
Status in “clp” package in Ubuntu:
  Confirmed
Status in “coinor-osi” package in Ubuntu:
  Fix Released
Status in “gcc-4.7” package in Ubuntu:
  Fix Released
Status in “gcc-4.8” package in Ubuntu:
  New
Status in “clp” source package in Trusty:
  Confirmed
Status in “coinor-osi” source package in Trusty:
  Fix Released
Status in “gcc-4.7” source package in Trusty:
  Fix Released
Status in “gcc-4.8” source package in Trusty:
  New

Bug description:
  coinor-osi fails to build from source on arm64 (but did fail before),
  running the test just segfaults. lowering the compiler options to -O0
  shows the same behavior.

  cd test; make test
  make[2]: Entering directory `/build/buildd/coinor-osi-0.106.4/test'
  g++ -DHAVE_CONFIG_H -I. -I`echo .` -I../src/Osi  -I`echo ./../src/Osi` -I`echo ./../src/OsiCommonTest` -I/usr/include/coin         -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD -c -o unitTest.o unitTest.cpp
  g++ -DHAVE_CONFIG_H -I. -I`echo .` -I../src/Osi  -I`echo ./../src/Osi` -I`echo ./../src/OsiCommonTest` -I/usr/include/coin         -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD -c -o OsiTestSolver.o OsiTestSolver.cpp
  g++ -DHAVE_CONFIG_H -I. -I`echo .` -I../src/Osi  -I`echo ./../src/Osi` -I`echo ./../src/OsiCommonTest` -I/usr/include/coin         -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD -c -o OsiTestSolverInterface.o OsiTestSolverInterface.cpp
  g++ -DHAVE_CONFIG_H -I. -I`echo .` -I../src/Osi  -I`echo ./../src/Osi` -I`echo ./../src/OsiCommonTest` -I/usr/include/coin         -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD -c -o OsiTestSolverInterfaceIO.o OsiTestSolverInterfaceIO.cpp
  g++ -DHAVE_CONFIG_H -I. -I`echo .` -I../src/Osi  -I`echo ./../src/Osi` -I`echo ./../src/OsiCommonTest` -I/usr/include/coin         -D_FORTIFY_SOURCE=2  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD -c -o OsiTestSolverInterfaceTest.o OsiTestSolverInterfaceTest.cpp
  /bin/bash ../libtool --tag=CXX --mode=link g++  -g -O2 -Wformat -Werror=format-security   -DOSI_BUILD  -Wl,-Bsymbolic-functions -Wl,-z,relro -o unitTest  unitTest.o OsiTestSolver.o OsiTestSolverInterface.o OsiTestSolverInterfaceIO.o OsiTestSolverInterfaceTest.o       ../src/OsiCommonTest/libOsiCommonTests.la       ../src/Osi/libOsi.la -lCoinUtils -lbz2 -lz -lm         
  mkdir .libs
  g++ -g -O2 -Wformat -Werror=format-security -DOSI_BUILD -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -o .libs/unitTest unitTest.o OsiTestSolver.o OsiTestSolverInterface.o OsiTestSolverInterfaceIO.o OsiTestSolverInterfaceTest.o  ../src/OsiCommonTest/.libs/libOsiCommonTests.so ../src/Osi/.libs/libOsi.so -lCoinUtils -lbz2 -lz -lm
  creating unitTest
  ./unitTest -mpsDir=`echo /usr/share/coin/Data/Sample` 
  Testing OsiRowCut with OsiTestSolverInterface
  make[2]: *** [test] Segmentation fault
  make[2]: Leaving directory `/build/buildd/coinor-osi-0.106.4/test'
  make[1]: *** [test] Error 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1263576/+subscriptions



More information about the foundations-bugs mailing list