Summary: | Cross compiling glibc produces a false maybe-uninitialized error | ||
---|---|---|---|
Product: | gcc | Reporter: | Alistair <alistair> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fw, wilson |
Priority: | P3 | Keywords: | diagnostic |
Version: | 8.3.0 | ||
Target Milestone: | --- | ||
Host: | Target: | riscv32 | |
Build: | x86_64 | Known to work: | |
Known to fail: | Last reconfirmed: | 2019-10-10 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 24639 | ||
Attachments: | Output of -save-temps |
Description
Alistair
2019-09-06 17:30:48 UTC
The full command line is: gcc clnt_udp.c -c -std=gnu11 -fgnu89-inline -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -Wstrict-prototypes -Wold-style-definition -fmath-errno -fPIC -ftls-model=initial-exec -I../include -I/scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build/sunrpc -I/scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build -I../sysdeps/unix/sysv/linux/riscv/rv32 -I../sysdeps/unix/sysv/linux/riscv -I../sysdeps/riscv/nptl -I../sysdeps/unix/sysv/linux/generic/wordsize-32 -I../sysdeps/unix/sysv/linux/generic -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/riscv/rv32/rvd -I../sysdeps/riscv/rv32/rvf -I../sysdeps/riscv/rvf -I../sysdeps/riscv/rvd -I../sysdeps/riscv/rv32 -I../sysdeps/riscv -I../sysdeps/init_array -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /scratch/alistair/software/tier3/buildroot/output/host/lib/gcc/riscv32-buildroot-linux-gnu/8.3.0/include -isystem /scratch/alistair/software/tier3/buildroot/output/host/lib/gcc/riscv32-buildroot-linux-gnu/8.3.0/include-fixed -isystem /scratch/alistair/software/tier3/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot/usr/include -D_LIBC_REENTRANT -include /scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DSHARED -DTOP_NAMESPACE=glibc -o /scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build/sunrpc/compat-clnt_udp.os -MD -MP -MF /scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build/sunrpc/compat-clnt_udp.os.dt -MT /scratch/alistair/software/tier3/buildroot/output/build/glibc-custom/build/sunrpc/compat-clnt_udp.os -DEXPORT_RPC_SYMBOLS I can also reproduce this with the 9.2 release. I can reproduce using gcc-8 and gcc-9 but not mainline. I'm using gcc options: -std=gnu11 -fgnu89-inline -mcmodel=medlow -g -O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fno-stack-protector -Wstrict-prototypes - Wold-style-definition -fmath-errno -fPIC -ftls-model=initial-exec \ tmp.i -fdump-tree-all -fdump-ipa-all Bisecting on mainline shows that the new IPA SRA pass added Sept 20 fixed this. Without that patch, I see that total_deadline is being decomposed, but apparently there is something wrong with the tracking info. If I add -fno-ipa-sra the warning goes away. The new IPA-SRA is too big of a patch to backport, so it looks like this will have to remain unfixed on the gcc-8 and gcc-9 branches. Thanks for looking into this Jim. We have worked around it in glibc master, so that's fine that it can't be back ported. I'm glad it has been fixed in the latest version. Fixed on mainline. Not backporting to gcc-8 or gcc-9 branches. |