https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101422

Simon Willcocks <simon.willcocks at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED

--- Comment #2 from Simon Willcocks <simon.willcocks at gmx dot de> ---
That's not an accurate description of the problem; the value of the variable is
being passed, not its address. As a register variable, it doesn't have an
address.

The problem occurred because the declaration of the initialised array is
located after the affected register variables are declared, invalidating their
content with an automatically generated function call to memset.

Moving this line:

  uint32_t cap_and_join_style[5] =  { 0x00000001 };

to the start of the function, before the first register variable declaration,
solves the problem.

Perhaps, if the problem is a common one, a warning could be generated "Unused
local register variable", say?

Reply via email to