[Bug c/99317] Missed warning

2021-03-01 Thread pj at hugeone dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99317 --- Comment #2 from Piotr --- @(In reply to Andrew Pinski from comment #1) > I dont think this is exactly a bug. The warning is a pedantic warning and > with void*, things are implicitly converted by standard c rules. With not `void *` it is exa

[Bug c/99317] New: Missed warning

2021-03-01 Thread pj at hugeone dot co.uk via Gcc-bugs
at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- The code: int *foo(void *v, void *w, int x) { float * f = v; int * i = w; return (x ? f : i); } int *foo1(void *v, void *w, int x) { float * f = v; int * i = w; return (1 ? f : (void

[Bug c/99011] Potentially missed optimization. Arrays are created without need

2021-02-08 Thread pj at hugeone dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99011 Piotr changed: What|Removed |Added Version|10.2.1 |10.2.0 --- Comment #1 from Piotr --- https://go

[Bug c/99011] New: Potentially missed optimization. Arrays are created without need

2021-02-08 Thread pj at hugeone dot co.uk via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- Consider the code: ``` int bar(int N) { return N > 10 ? 14 : 8; } int foo(int N) { return (const int[]){8, 14}[N > 10]; }

[Bug c/92620] New: Ignored -fno-builtin -fno-builtin-memcpy

2019-11-21 Thread pj at hugeone dot co.uk
Assignee: unassigned at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- int main() { printf("%s", (char[]){'H','e','l','l','o',' ','H','e','l','l&#x

[Bug c/86073] New: -O3 arm generates calls to memset even for known at the compile time very small sizes (<=3)

2018-06-06 Thread pj at hugeone dot co.uk
MED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- The test code: void *my_memset1(void *ptr, const int v, size_t size) { size_t rem = size & 3; siz

[Bug c/81774] Volatile - order of reads in generated code

2017-08-08 Thread pj at hugeone dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81774 --- Comment #3 from Piotr --- And what about if volatile variable changes during the multiplications. Mybe not in this example but if y was declared global - it can be interrupted between multiplications. volatile int y; int x3(int x) {

[Bug c/81774] Volatile - order of reads in generated code

2017-08-08 Thread pj at hugeone dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81774 Piotr changed: What|Removed |Added CC||pj at hugeone dot co.uk Version|new

[Bug c/81774] New: Volatile - order of reads in generated code

2017-08-08 Thread pj at hugeone dot co.uk
Assignee: unassigned at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- I do not know if it and bug but it look strange to me. Lets consider a trivial example: int x3(int x) { volatile int y = x; return y * y * y * y; } the code

[Bug middle-end/78824] multiple add should in my opinion be optimized to multiplication

2016-12-16 Thread pj at hugeone dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78824 --- Comment #4 from Piotr --- Freddie it is about avr-gcc not arm-gcc.

[Bug middle-end/78824] multiple add should in my opinion be optimized to multiplication

2016-12-15 Thread pj at hugeone dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78824 --- Comment #2 from Piotr --- avr-gcc actually

[Bug c/78824] New: multiple add should in my opinion be optimized to multiplication

2016-12-15 Thread pj at hugeone dot co.uk
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pj at hugeone dot co.uk Target Milestone: --- Hi Example (-O3) volatile uint16_t y; uint8_t nvx8; int main(void) { y = nvx8 + nvx8 + nvx8 + nvx8 + nvx8 + nvx8 + nvx8 + nvx8