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

--- Comment #4 from angelo <angelo70 at gmail dot com> ---
Here what i see when i step into the function:

http://imgur.com/2802Ob5

I build on linux

$ cat /proc/version 
Linux version 4.1.7001 (root@jerusalem) (gcc version 5.2.1 20150911 (Debian
5.2.1-17) ) #1 SMP Sat Sep 19 15:29:17 CEST 2015

Compiling with -Wall -Wextra doesn't show anything wrong.

Same using -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations, no
changes, i still see

0x20000768      linkw %fp,#0
0x2000076c      .short 0x48e7
0x2000076e      movew %d0,%d4
0x20000770      movel %fp@(8),%d2
0x20000774      movel %fp@(12),%d1
0x20000778      movel %fp@(16),%d3
...

-fsanitize=undefined  produces compile time errors intead: 
/home/angelo/archivio/aziende/sysam/u-boot-extras/4.9.0_issue/main.c|30|undefined
reference to `__ubsan_handle_type_mismatch'|


Command line that reproduce the issue:

Running command: make -f makefile
/opt/toolchains/m68k/gcc-5.2.0-nolibc/bin/m68k-linux-gcc -Wall -Wextra -ggdb
-fno-builtin -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations
-ffreestanding -O0 -pipe -mcpu=5307 -c -o main.o main.c
/opt/toolchains/m68k/gcc-5.2.0-nolibc/bin/m68k-linux-ld.bfd -n -Bstatic
-Tram.ld -Map test.map boot.o main.o -o test.bin -L
/opt/toolchains/m68k/gcc-5.2.0-nolibc/lib/gcc/m68k-linux/5.2.0 -lgcc
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Regards

Reply via email to