>Number: 7895 >Category: c >Synopsis: Bit-field initialization incorrect after padding with :0 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Sep 12 06:46:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Jörg Eckart >Release: Reading specs from /app/unido-inf/sun4_56/gcc/2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specsgcc version 2.95.2 19991024 (release) >Organization: >Environment: SunOS ls12so 5.8 Generic_108528-12 sun4u sparc SUNW,Sun-Blade-1000 >Description: The bit-field A::c in the example code should be initialized with 3 (instead of 0). When omitting the padding field or specifying another padding width than 0, c is initialized correctly. Further accesses to c are also done correctly. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="bitfield.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bitfield.c" I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgQQp7CiAgdW5zaWduZWQgYToxOwogIHVuc2lnbmVk IGI6MjsKICB1bnNpZ25lZCA6MDsKICB1bnNpZ25lZCBjOjM7CiAgdW5zaWduZWQgOjI7CiAgdW5z aWduZWQgZDo0Owp9IGdsb2JBID0geyAxLCAyLCAzLCA0IH07Cgp2b2lkIG91dChzdHJ1Y3QgQSAq YSkKewogIHByaW50ZigiJXUsICV1LCAldSwgJXVcbiIsIGEtPmEsIGEtPmIsIGEtPmMsIGEtPmQp Owp9CgppbnQgbWFpbigpCnsKICAvLyBUZXN0IDE6IExvY2FsIGluaXRpYWxpemF0aW9uOgogIHN0 cnVjdCBBIGxvY0E9eyAxLCAyLCAzLCA0IH07CgogIG91dCgmbG9jQSk7IC8vIDEsIDIsIDMsIDQK CiAgb3V0KCZnbG9iQSk7IC8vIDEsIDIsIDMsIDQKCiAgcmV0dXJuIDA7Cn0K