[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #7 from Sami Kantoluoto --- Yes, that seems to fix it: .skipblk: .LFB0: movq_ctype_tab_ptr(%rip), %r8 xorl%eax, %eax .L2: movq(%rdi), %rdx movq(%r8), %rsi movzbl (%rdx), %ecx

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #6 from Andrew Pinski --- Does -fno-strict-aliasing fix this? I suspect the issue is the pointers types "char*" and "unsigned char*" are considered to be different aliasing groups (which is correct) and that is causing gcc to output c

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #5 from Sami Kantoluoto --- When compiled with $ gcc-arm-none-eabi-4_6-2012q4/bin/arm-none-eabi-gcc -v -save-temps -Wall -Werror -Os -c skipblk.c -o skipblk.o The following assembly is generated: skipblk: @ Function support

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #4 from Sami Kantoluoto --- Created attachment 44184 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44184&action=edit generated arm asm code

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #3 from Sami Kantoluoto --- When compiled with: $ gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc -v -save-temps -Wall -Werror -Os -c skipblk.c -o skipblk.o The following assembly is generated: skipblk: @ Function s

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #2 from Sami Kantoluoto --- Created attachment 44183 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44183&action=edit generated x86 asm code

[Bug c/85923] invalid code generation when incrementing pointer referenced by pointer

2018-05-25 Thread sami.kantoluoto at embedtronics dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85923 --- Comment #1 from Sami Kantoluoto --- Created attachment 44182 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44182&action=edit stripped preprocessed source