https://llvm.org/bugs/show_bug.cgi?id=31787
Bug ID: 31787 Summary: Incorrect warning about uninitialized variable with `asm` Product: clang Version: 4.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: paulepan...@users.sourceforge.net CC: llvm-bugs@lists.llvm.org Classification: Unclassified Clang 4.0.0-+rc1 shows a warning, which is – as far as I can see – incorrect. ``` $ clang-4.0 --version clang version 4.0.0-+rc1-1 (tags/RELEASE_400/rc1) Target: i686-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin $ git clone https://review.coreboot.org/memtest86plus $ cd memtest86plus $ clang-4.0 -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector -fgnu89-inline -fno-strict-aliasing reloc.c reloc.c:55:10: warning: variable 'got' is uninitialized when used here [-Wuninitialized] return *got; ^~~ reloc.c:54:26: note: initialize the variable 'got' to silence this warning register Elf32_Addr *got asm ("%ebx"); ^ = NULL 1 warning generated. ``` GCC 6.3.0 doesn’t show that warning. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs