Bugzilla – Bug 221
[llvm-gcc] miscompilation of 'X = Y = Z' with aggregate values
Last modified: 2004-02-08 02:33:20
You need to log in before you can comment on or make changes to this bug.
Whoops... I hit enter at the "enter bug" screen instead of tab, thus making my bug's description empty. Sigh. I am going to attach the part of bison that seems to be getting miscompiled. You get two different crashes depending on whether you use -Wa,-disable-opt -Wl,-disable-opt or not, but that doesn't surprise me much if the input code is itself broken.
Created an attachment (id=72) [details] Apparently miscompiled portion of bison's parse-gram.c Preprocessed source.
Cool, I'm looking into it, though I may not get to it until tommorow. Thanks Brian! -Chris
Here's a reduced testcase for the miscompilation: typedef struct { int A; } boundary; boundary X, Y; void func(boundary FOO) { X = Y = FOO; } -Chris
Fixed. Testcase here: (SingleSource/Regression/C/2004-02-03-AggregateCopy.c) http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040202/011095.html Patch here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040202/011096.html Thanks for tracking this down Brian! -Chris
*** Bug 163 has been marked as a duplicate of this bug. ***