[Bug middle-end/103870] ARM: Wrong branch instruction with optimization O2 and higher

2021-12-30 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103870 --- Comment #1 from Petro Karashchenko --- I would expect "bgt" instruction instead of "bne" in such case.

[Bug middle-end/103870] New: ARM: Wrong branch instruction with optimization O2 and higher

2021-12-30 Thread petro.karashchenko at gmail dot com via Gcc-bugs
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: petro.karashchenko at gmail dot com Target Milestone: --- Code test.c: void f(void) { double a = 2.2204460492503131e-16; int b = 1; int c = 0; while (a > 0) {

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #20 from Petro Karashchenko --- I just checked next case typedef int tolerant_int __attribute__((aligned(1))); tolerant_int var; int foo(void) { return var; } -- arm-none-eabi-gcc -save-temps -Wall

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #19 from Petro Karashchenko --- Sorry my bad again. Just checked with GCC 11 man page When used on a struct, or struct member, the aligned attribute can only increase the alignment; in order to decrease it, the packed attribute must

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #18 from Petro Karashchenko --- Yes. So I just checked GCC man and see that The aligned attribute can only increase the alignment; but you can decrease it by specifying packed as well. See below. Note that the effectiveness of alig

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #16 from Petro Karashchenko --- Again based on your description even if we go with putting "tolerance" on the type should not work because in "typedef int tolerant_int __attribute__((aligned(1)));" the "int" default alignment is 4 an

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #14 from Petro Karashchenko --- Probably I need to fill a ticket to allow "packed" to be applied for variables and not only to a types of structure fields.

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #13 from Petro Karashchenko --- Sorry that I brought some confusion. I was reading some latest comments and didn't fully payed attention to a ticket description. The reason for my comment is https://gcc.gnu.org/bugzilla/show_bug.cgi?

[Bug middle-end/88085] User alignments on var decls not respected if smaller than type alignment

2021-09-02 Thread petro.karashchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 --- Comment #11 from Petro Karashchenko --- Sorry but based on @cindex @code{aligned} variable attribute @item aligned @itemx aligned (@var{alignment}) The @code{aligned} attribute specifies a MINIMUM alignment for the variable or structure fie

[Bug middle-end/94387] Excess read instructions are generated in case of writing to fields of volatile + packed type (structure)

2020-04-19 Thread petro.karashchenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94387 --- Comment #7 from Petro Karashchenko --- Is it still 'UNCONFIRMED'? Or it can be moved to 'CONFIRMED' or 'ASSIGNED' state?

[Bug middle-end/94662] New: __attribute__ aligned is ignored

2020-04-19 Thread petro.karashchenko at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: petro.karashchenko at gmail dot com Target Milestone: --- __attribute__ 'aligned' is ignored. Test case 1: -- int __attribute__((aligned(1))) var; int foo(void) { return var; } -- arm-none-eabi-gcc -

[Bug middle-end/94387] Excess read instructions are generated in case of writing to fields of volatile + packed type (structure)

2020-03-30 Thread petro.karashchenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94387 --- Comment #6 from Petro Karashchenko --- Richard Biener thank you for suggestion, but __attribute__((aligned(..))) is applied only to the base address of the struct, hence to the first field only, so if I'm having other fields tightly packed an

[Bug middle-end/94387] Excess read instructions are generated in case of writing to fields of volatile + packed type (structure)

2020-03-29 Thread petro.karashchenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94387 --- Comment #4 from Petro Karashchenko --- Andrew Pinski could you please share with me requirements needed for strict alignment? Actually I do not understand why read-write cycle is needed if no "read" or "modify" operation is requested (I mean

[Bug middle-end/94387] Excess read instructions are generated in case of writing to fields of volatile + packed type (structure)

2020-03-29 Thread petro.karashchenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94387 --- Comment #1 from Petro Karashchenko --- Also the ambiguity of the issue is that excess read instructions generation depends on type of the field. Excess reads are not generated when 8 bit types are accessed and generated when data types greate

[Bug middle-end/94387] New: Excess read instructions are generated in case of writing to fields of volatile + packed type (structure)

2020-03-29 Thread petro.karashchenko at gmail dot com
Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: petro.karashchenko at gmail dot com Target Milestone: --- Created attachment 48140 --> https://gcc.gnu.org/bugzi