GNU bug report logs - #36370
27.0.50; XFIXNAT called on negative numbers

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Tue, 25 Jun 2019 05:37:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bruno Haible <bruno <at> clisp.org>
To: bug-gnulib <at> gnu.org
Cc: 36370 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, Pip Cet <pipcet <at> gmail.com>
Subject: bug#36370: 27.0.50; XFIXNAT called on negative numbers
Date: Fri, 28 Jun 2019 01:45:11 +0200
Hi Paul,

> I'll CC: this to bug-gnulib since it's a Gnulib issue. I have not 
> installed this patch into Gnulib on savannah.

Can you please show an example code on which the change makes a difference?

I used this test program

==================================== foo.c ====================================
#include <stdio.h>

//#define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
#define assume(R) (!__builtin_constant_p (!(R) == !(R)) || (R) ? (void) 0 : __builtin_unreachable ())

int f_generic (int i)
{
  printf("%d\n", i & 0x80000000);
  return 0;
}

int f_condition (int i)
{
  if (i >= 0)
    printf("%d\n", i & 0x80000000);
  return 0;
}

int f_assume (int i)
{
  assume (i >= 0);
  printf("%d\n", i & 0x80000000);
  return 0;
}
===============================================================================

$ gcc -O2 -m32 -S foo.c && fgrep -v .cfi foo.s

and the code is the same, regardless of which definition of 'assume' I enable.

Bruno





This bug report was last modified 6 years and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.