This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43311] missed 'movw' optimization.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43311

Zdenek Sojka <zsojka at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> 2012-01-25 10:35:47 UTC ---
Does the following code have undefined behavior?

typedef struct { unsigned char b1, b2; } __attribute__((aligned(8))) S;
void f( S const* s, unsigned char* b1, unsigned char* b2 )
{
        *b1 = s->b1;
        *b2 = s->b2;
}

int main()
{
  S s = { 1, 2 };
  f(&s, &s.b2, &s.b2);
  return s.b2 != 1;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]