c/9853: gcc 3.2 miscompiles non constant structure initializer

mas@systems.caltech.edu mas@systems.caltech.edu
Wed Feb 26 02:26:00 GMT 2003


>Number:         9853
>Category:       c
>Synopsis:       gcc 3.2 miscompiles non constant structure initializer
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 26 02:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Srinivas Aji
>Release:        gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Organization:
>Environment:
Linux turtle.rainfinity.prv 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
>Description:

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="report"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="report"

VGhlIHByb2dyYW0gbWFpbi5jIHdhcyBjb21waWxlZCB1c2luZyB0aGUgY29tbWFuZDoKZ2NjIC12
IC1zYXZlLXRlbXBzIC1XYWxsIC1vIG1haW5feCBtYWluLmMgMj5nY2MuZXJyCgpUaGUgb3V0cHV0
IG9mIHRoZSBwcm9ncmFtIGlzIHRoZSBmb2xsb3dpbmcgbGluZToKeCBpcyBpZDo1LCBlbGVtMTp7
Niw3LDgsNH0sIGVsZW0xOns1LDYsNyw4fQppbnN0ZWFkIG9mIHRoZSBleHBlY3RlZDoKeCBpcyBp
ZDowLCBlbGVtMTp7MSwyLDMsNH0sIGVsZW0xOns1LDYsNyw4fQoKVGhlIHByb2JsZW0gc2VlbXMg
dG8gYmUgd2l0aCBub24gY29uc3RhbnQgc3RydWN0dXJlIGluaXRpYWxpemVycy4KSWYgZWl0aGVy
IHRoZSBjYWxsIHRvIGZ1bmN0aW9uIG15X3plcm8oKSBpcyByZXBsYWNlZCBieSBhIGNvbnN0YW50
LCBvcgp0aGUgdHlwZSBjYXN0cyB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