Bug#796076: gcc-5: undefined reference errors with extern __inline__ (regression)

2015-08-20 Thread Matthias Klose
On 08/20/2015 02:39 AM, Vincent Lefevre wrote:
 On 2015-08-19 17:36:47 +0200, Matthias Klose wrote:
 On 08/19/2015 10:48 AM, Vincent Lefevre wrote:
 extern __inline__ fn1() { fn2(); }

 main() {}

 not a bug. if you want to keep gnu89 inline semantics, build using 
 -fgnu89-inline.
 
 Well, I haven't chosen the gnu89 inline semantics. This comes from
 gmp.h (GMP 4.1). So, that's actually a bug in GMP, which uses this
 semantics unconditionally with all GCC versions. Fortunately,
 GMP 4.1 is very old and this has been improved in later GMP
 versions.

see https://gcc.gnu.org/gcc-5/porting_to.html

__attribute__ ((gnu_inline)) should be your fix.



Bug#796076: gcc-5: undefined reference errors with extern __inline__ (regression)

2015-08-20 Thread Vincent Lefevre
On 2015-08-20 13:19:23 +0200, Matthias Klose wrote:
 see https://gcc.gnu.org/gcc-5/porting_to.html
 
 __attribute__ ((gnu_inline)) should be your fix.

Yes, this has been fixed in GMP 4.2, but the (very old) GMP 4.1 branch
will never be fixed. This is a bit annoying, as for MPFR up to 3.1.x,
we claim that we still support GMP 4.1.x, which is true, but this bug
makes the MPFR build fail with a misleading error message in configure
(we also suggest in the error message to look at config.log, where one
can find a bit more about the real reason of the failure, but this
doesn't give an idea of what is wrong exactly). I have improved the
gmp.h testing in the MPFR configure so that one gets a more meaningful
error if gmp.h isn't usable at all (+ mentioning this incompatibility
between GMP 4.1.x and GCC 5, in the MPFR 3.1 branch).

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#796076: gcc-5: undefined reference errors with extern __inline__ (regression)

2015-08-19 Thread Vincent Lefevre
On 2015-08-19 17:36:47 +0200, Matthias Klose wrote:
 On 08/19/2015 10:48 AM, Vincent Lefevre wrote:
  extern __inline__ fn1() { fn2(); }
  
  main() {}
 
 not a bug. if you want to keep gnu89 inline semantics, build using 
 -fgnu89-inline.

Well, I haven't chosen the gnu89 inline semantics. This comes from
gmp.h (GMP 4.1). So, that's actually a bug in GMP, which uses this
semantics unconditionally with all GCC versions. Fortunately,
GMP 4.1 is very old and this has been improved in later GMP
versions.

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#796076: gcc-5: undefined reference errors with extern __inline__ (regression)

2015-08-19 Thread Vincent Lefevre
Package: gcc-5
Version: 5.2.1-15
Severity: important

On the following C code obtained with creduce (on a code obtained
when I wanted to test MPFR 3.1.3 against GMP 4.1.4):

extern __inline__ fn1() { fn2(); }

main() {}

I get the following error with gcc-5:

$ gcc-5 -w ct.i
/tmp/ccFWIDKK.o: In function `fn1':
ct.i:(.text+0xa): undefined reference to `fn2'
collect2: error: ld returned 1 exit status

No such problem with gcc-4.9, gcc-4.8 and gcc-4.7.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages gcc-5 depends on:
ii  binutils  2.25.1-1
ii  cpp-5 5.2.1-15
ii  gcc-5-base5.2.1-15
ii  libc6 2.19-19
ii  libcc1-0  5.2.1-15
ii  libgcc-5-dev  5.2.1-15
ii  libgcc1   1:5.2.1-15
ii  libgmp10  2:6.0.0+dfsg-7
ii  libisl13  0.14-2
ii  libmpc3   1.0.3-1
ii  libmpfr4  3.1.3-1
ii  libstdc++65.2.1-15
ii  zlib1g1:1.2.8.dfsg-2+b1

Versions of packages gcc-5 recommends:
ii  libc6-dev  2.19-19

Versions of packages gcc-5 suggests:
pn  gcc-5-doc none
ii  gcc-5-locales 5.2.1-15
ii  gcc-5-multilib5.2.1-15
pn  libasan2-dbg  none
ii  libatomic1-dbg5.2.1-15
ii  libcilkrts5-dbg   5.2.1-15
ii  libgcc1-dbg   1:5.2.1-15
ii  libgomp1-dbg  5.2.1-15
ii  libitm1-dbg   5.2.1-15
ii  liblsan0-dbg  5.2.1-15
pn  libmpx0-dbg   none
ii  libquadmath0-dbg  5.2.1-15
ii  libtsan0-dbg  5.2.1-15
ii  libubsan0-dbg 5.2.1-15

-- no debconf information