[Insight-developers] vxl update

Brad King brad.king at kitware.com
Wed Dec 8 10:34:46 EST 2010


On 12/08/2010 09:27 AM, Brad King wrote:
> On 12/07/2010 06:19 PM, Sean McBride wrote:
>> http://www.cdash.org/CDash/testSummary.php?project=2&name=test_pow_log&date=2010-12-07
> 
> http://itk.org/gitweb?p=ITK.git;a=commitdiff;h=d280635a

For those interested, I narrowed this GCC bug down to the
test case below and submitted it:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46850

-Brad

$ cat gcc_opt_int_bug.sh
#!/usr/bin/env bash
#avoid="-fno-guess-branch-probability" # uncomment to avoid
inline="inline" # comment to avoid
echo "$inline"'
static int int_pow(int a, unsigned int b) {
  if (b==0) return 1;
  else if (b==1) return a;
  else return int_pow(a*a,b>>1) * int_pow(a, b&1);
}
int main() {
  return int_pow(2, 31U) != 0x80000000U;
}
' > gcc_opt_int_bug.c
opt="-O -fstrict-overflow -foptimize-sibling-calls -ftree-vrp $avoid"
gcc $opt gcc_opt_int_bug.c
./a.out
echo $?


More information about the Insight-developers mailing list