[Bug c/87060] Condition check is optimized out for volatile unsigned char / short

2018-08-22 Thread yso at melexis dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87060 --- Comment #1 from Yevheniy Soloshenko --- Ok, my fault. Integer promotion in action. The code below is fine. ``` void test_u8 (void) { if ((unsigned char)(u8 + 1)) { u8 = 1; } } ```

[Bug c/87060] New: Condition check is optimized out for volatile unsigned char / short

2018-08-22 Thread yso at melexis dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: yso at melexis dot com Target Milestone: --- Compilers from http://gcc.godbolt.org/ are used to reproduce the issue. Compiler: x86-64 gcc (trunk); gcc (GCC-Explorer-Build) 9.0.0 20180821

[Bug c/86617] New: Volatile qualifier is ignored sometimes for unsigned char

2018-07-20 Thread yso at melexis dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: yso at melexis dot com Target Milestone: --- I'm using http://gcc.godbolt.org/ to reproduce this issue. Compiler: x86-64 gcc (trunk); gcc (GCC-Explorer-Build) 9.0.0 20180719 Options: -Os