This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/7559: kdelibs miscompilation
Honza,
since you fixed this bug: Can you add the testcase to the testsuite,
please? Please also remember to close the PR.
Thanks a lot for the quick patch,
Andreas
Jan Hubicka <jh@suse.cz> writes:
>> 3) The last testcase is ultra-reduced to a two eightbytes object, with
>> only one member in each one. That one do fails.
>>
>> extern void abort();
>>
>> struct A {
>> long x;
>> };
>>
>> struct R {
>> struct A a, b;
>> };
>>
>> struct R R = {
>> 100, 200
>> };
>>
>> void f(struct R r) {
>> if (r.a.x != R.a.x || r.b.x != R.b.x)
>> abort();
>> }
>>
>> int main() {
>> f(R);
>> return 0;
>> }
>
> This looks like a bug in code computing offests of nested aggregates. I
> am just checking it.
> Thanks a lot for reducing the testcase! This is really usefull one :)
>
> Honza
>>
>> 4) The <struct.c> testcase won't fail if we add some garbage in struct R,
>> because the size of the object will be > 16 bytes, thus having MEMORY
>> class.
>>
>> HTH,
>> Gwenole.
>
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj