[Bug build/19444] build failures with -O1 due to -Wmaybe-uninitialized
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Fri Jan 4 16:19:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=19444
--- Comment #13 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 27c5e756a2a8495d77480a103081a86c1ca9a1e8 (commit)
from 8b18d418bd0ef1d2b1093e5b956bf176f41f4828 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=27c5e756a2a8495d77480a103081a86c1ca9a1e8
commit 27c5e756a2a8495d77480a103081a86c1ca9a1e8
Author: Martin Jansa <martin.jansa@gmail.com>
Date: Fri Jan 4 16:17:48 2019 +0000
sysdeps/ieee754: prevent maybe-uninitialized errors with -O [BZ #19444]
With -O included in CFLAGS it fails to build with:
../sysdeps/ieee754/ldbl-96/e_jnl.c: In function '__ieee754_jnl':
../sysdeps/ieee754/ldbl-96/e_jnl.c:146:20: error: 'temp' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
b = invsqrtpi * temp / sqrtl (x);
~~~~~~~~~~^~~~~~
../sysdeps/ieee754/ldbl-96/e_jnl.c: In function '__ieee754_ynl':
../sysdeps/ieee754/ldbl-96/e_jnl.c:375:16: error: 'temp' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
b = invsqrtpi * temp / sqrtl (x);
~~~~~~~~~~^~~~~~
../sysdeps/ieee754/dbl-64/e_jn.c: In function '__ieee754_jn':
../sysdeps/ieee754/dbl-64/e_jn.c:113:20: error: 'temp' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
b = invsqrtpi * temp / sqrt (x);
~~~~~~~~~~^~~~~~
../sysdeps/ieee754/dbl-64/e_jn.c: In function '__ieee754_yn':
../sysdeps/ieee754/dbl-64/e_jn.c:320:16: error: 'temp' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
b = invsqrtpi * temp / sqrt (x);
~~~~~~~~~~^~~~~~
Build tested with Yocto for ARM, AARCH64, X86, X86_64, PPC, MIPS, MIPS64
with -O, -O1, -Os.
For AARCH64 it needs one more fix in locale for -Os:
https://sourceware.org/ml/libc-alpha/2018-09/msg00539.html
[BZ #19444]
* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Use
__builtin_unreachable for default case in switch.
(__ieee754_yn): Likewise.
* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++++++++++
sysdeps/ieee754/dbl-64/e_jn.c | 2 ++
sysdeps/ieee754/ldbl-128/e_jnl.c | 4 ++++
sysdeps/ieee754/ldbl-128ibm/e_jnl.c | 4 ++++
sysdeps/ieee754/ldbl-96/e_jnl.c | 4 ++++
5 files changed, 27 insertions(+), 0 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list