[Bug sanitizer/68099] arm-*-linux-gnueabihf -fsanitize=undefined warning: '<anonymous>' is used uninitialized in this function

yba at tkos dot co.il gcc-bugzilla@gcc.gnu.org
Thu Nov 5 14:35:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68099

--- Comment #12 from Jonathan Ben-Avraham <yba at tkos dot co.il> ---
(In reply to Jonathan Ben-Avraham from comment #10)
> (In reply to Marek Polacek from comment #9)
> > I've built a cross-compiler for arm-linux-gnueabihf target and can't
> > reproduce the issue with GCC trunk:
> > 
> > $ ./cc1plus  -I. /tmp/test.i -quiet -O3 -fsanitize=undefined -Wall -Wextra
> > dog.cpp: In function ‘int main(int, char**)’:
> > dog.cpp:31:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
> > dog.cpp:31:31: warning: unused parameter ‘argv’ [-Wunused-parameter]
> > 
> > so I think this was really fixed in PR66977.
> > 
> > Hence closing, please reopen if you can reproduce with GCC trunk, or if you
> > think I goofed something up, thanks.
> 
> Please post your configure command line for gcc and the svn revision number
> that you used so that I can try to duplicate your success. I was not able to
> build trunk rev 229474 using the same crosstool-ng .config that I used when
> building the the GCC 5.1 for which I reported this bug. The error that I
> received was
> 
> [INFO ]  Installing C library
> [ERROR]    strchrnul.c:72:40: error: result of '2130640638l << 16' requires
> 48 bits to represent, but 'long int' only has 32 bits
> [-Werror=shift-overflow=]
> [ERROR]    strchrnul.c:72:47: error: result of '-16908288l << 16' requires
> 42 bits to represent, but 'long int' only has 32 bits
> [-Werror=shift-overflow=]
> [ERROR]    make[3]: ***
> [/opt/home/yba/gcc/crosstool-ng-gcc-rev-229474/.build/arm-mxs-linux-
> gnueabihf/build/build-libc-final/string/strchrnul.o] Error 1
> [ERROR]    make[2]: *** [string/subdir_lib] Error 2
> [ERROR]    make[1]: *** [all] Error 2
> [ERROR]   
> [ERROR]  >>
> [ERROR]  >>  Build failed in step 'Installing C library'
> [ERROR]  >>        called in step '(top-level)'
> [ERROR]  >>
> [ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
> [ERROR]  >>        called from:
> do_libc_backend_once[scripts/build/libc/glibc.sh@456]
> [ERROR]  >>        called from:
> do_libc_backend[scripts/build/libc/glibc.sh@153]
> [ERROR]  >>        called from: do_libc[scripts/build/libc/glibc.sh@75]
> [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@638]
> [ERROR]  >>
> [ERROR]  >>  For more info on this error, look at the file: 'build.log'
> [ERROR]  >>  There is a list of known issues, some with workarounds, in:
> [ERROR]  >>      'usr/local/share/doc/crosstool-ng//B - Known issues.txt'
> [ERROR]   
> [ERROR]  (elapsed: 8:54.60)
> [08:54] / make: *** [build] Error 2
> 
> Many thanks,
> 
>  - yba

See attached build.tail.xz for build log with failure notice


More information about the Gcc-bugs mailing list