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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103870
Bug ID: 103870
Summary: ARM: Wrong branch instruction with optimization O2 and
higher
Product: gcc
Version: 10.3.1
Status: UNCONFIRMED
Severity: normal
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
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
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
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
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.
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?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